Skip to content

The create screen of a Jira issue type, for a bug

GET
/v1/bugs/{id}/jira-create/fields
curl --request GET \
--url 'https://beta-api.plune.ai/v1/bugs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/jira-create/fields?project=ACME&issueType=10001' \
--cookie plune_session=<plune_session>

The third step (#1072): Jira’s GET /rest/api/3/issue/createmeta/{project}/issuetypes/{issueType}, every page, as Plune fills it - the fields of the types it knows (fields), and those Jira requires with no default that it does not know (unsupported: the issue is then made in Jira, jiraUrl). project and issueType are Plune’s to set and are not listed; a required field with a default of Jira’s is not required here. prefill is the bug’s own summary, description and files. First mypermissions with the project key: a permission the create needs that the account lacks is the 403 jira_no_permission. A bug of Plune’s that is open and live: a mirror is 409 not_plune, a closed one 409 not_open. The owner’s alone, by the session cookie alone, refused as POST /v1/bugs/jira/find is. At most 60 calls a minute from you.

id
required
string format: uuid
X-Plune-Project
string

Which of your projects to act in — an id from GET /v1/projects. Absent, your default project. A project you are not a member of answers 404, the same as one that does not exist. Ignored under a bearer token, which is bound to the project it was minted in.

project
required
string
Example
ACME
issueType
required
string
Example
10001

The screen

Media type application/json
object
project
required
string
issueType
required
string
fields
required
Array<object>
object
id
required

Jira’s field id - the key of fields in POST …/jira-create.

string
name
required
string
type
required

What the field takes: text a line (≤ 255 characters), textarea text (sent as Atlassian Document Format), number, date (YYYY-MM-DD), labels a list without spaces, select and priority the id of an option (a list of ids when multiple), components a list of ids.

string
Allowed values: text textarea select labels components priority number date
required
required

Jira requires it and has no default of its own for it.

boolean
multiple
required
boolean
options
required

The allowed values of a select, a priority or components; null for the others.

Array<object>
nullable
object
id
required
string
name
required
string
unsupported
required

Fields the screen requires with no default that Plune does not fill (a user, a security level, time tracking…): while any is here the create is refused, and the issue is made in Jira (jiraUrl).

Array<object>
object
id
required
string
name
required
string
type
required

Jira’s schema type of the field - of its items, for a list (a multi-user picker is user); null when Jira gives none.

string
nullable
jiraUrl
required

The project in Jira.

string format: uri
prefill
required

The bug’s own: the summary and the description the create sends when none is given, and the files it can send to the issue (those Plune keeps in the database, and those in a bucket - the project’s or Plune’s own - of at most 2 MiB; one over that is not listed) - all of them unless attachments picks.

object
summary
required
string
description
required
string
nullable
attachments
required
Array<object>
object
id
required
string
name
required
string
size
required
integer
Example
{
"project": "ACME",
"issueType": "10001",
"fields": [
{
"id": "summary",
"name": "Summary",
"type": "text",
"required": true,
"multiple": false,
"options": null
},
{
"id": "description",
"name": "Description",
"type": "textarea",
"required": false,
"multiple": false,
"options": null
},
{
"id": "priority",
"name": "Priority",
"type": "priority",
"required": false,
"multiple": false,
"options": [
{
"id": "2",
"name": "High"
},
{
"id": "3",
"name": "Medium"
}
]
},
{
"id": "labels",
"name": "Labels",
"type": "labels",
"required": false,
"multiple": true,
"options": null
}
],
"unsupported": [],
"jiraUrl": "https://acme.atlassian.net/browse/ACME",
"prefill": {
"summary": "Login loops after password reset",
"description": null,
"attachments": []
}
}

Not the key of a Jira project, or not the id of an issue type; Jira was not asked

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid session — a CLI token is refused here, as on the routes of the Jira connection

Media type application/json
object
error
required
string
Example
{
"error": "sign in required"
}

You are in the project as a reader, or not as its owner; a tier without issue_trackers (with TIER_LIMITS_ENFORCE=true); or the account of the connection lacks a permission Jira asks of the create in that project (code: jira_no_permission, with missing - of BROWSE_PROJECTS, CREATE_ISSUES, CREATE_ATTACHMENTS; CREATE_ATTACHMENTS only for a bug with files), as mypermissions with the project key says it

Media type application/json
object
error
required
string
Example
{
"error": "the account of the connection may not CREATE_ISSUES in Jira project ACME",
"code": "jira_no_permission",
"missing": [
"CREATE_ISSUES"
]
}

Jira does not give the project or its issue type - it does not exist, or the account may not create there (jira_project_unavailable, with project); the bug is not one of the project’s live bugs; or the project of X-Plune-Project is not one of yours

Media type application/json
object
error
required
string
Example
{
"error": "Jira did not give project NOPE or its issue type: it does not exist, or the account of the connection may not create issues there",
"code": "jira_project_unavailable",
"project": "NOPE"
}

not_plune or not_open; or, as for the import, bugs_disabled and jira_not_working

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Jira did not give the issue for a reason of its own; what Jira wrote is never passed on. jira_token_rejected — a 401: the connection becomes rejected and its token is not sent again until the owner connects anew; jira_ip_blocked — Jira’s IP allowlist refused Plune: the connection becomes ip_blocked; jira_rate_limited — a 429, with retryAfterSec (Jira’s Retry-After, else 30); jira_unreachable — a 5xx, the network, the 15 s deadline, a redirect, an answer over 1 MB or one Plune cannot read. A 424 and not a 502/504: a proxy replaces the body of those

Media type application/json
object
error
required
string
Examples

Jira rejected the token

{
"error": "Jira rejected the token of the project’s connection — its owner connects it again with a new token",
"code": "jira_token_rejected"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over

The server has no key to keep Jira tokens under; Jira was not asked

Media type application/json
object
error
required
string
Example
{
"error": "Jira is not configured on this server — contact your operator"
}