The create screen of a Jira issue type, for a bug
const url = 'https://beta-api.plune.ai/v1/bugs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/jira-create/fields?project=ACME&issueType=10001';const options = {method: 'GET', headers: {cookie: 'plune_session=<plune_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Header Parameters
Section titled “Header Parameters ”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.
Query Parameters
Section titled “Query Parameters ”Example
ACMEExample
10001Responses
Section titled “ Responses ”The screen
object
object
Jira’s field id - the key of fields in POST …/jira-create.
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.
Jira requires it and has no default of its own for it.
The allowed values of a select, a priority or components; null for the others.
object
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).
object
Jira’s schema type of the field - of its items, for a list (a multi-user picker is user); null when Jira gives none.
The project in Jira.
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
object
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
object
Example generated
{ "error": "example"}No / invalid session — a CLI token is refused here, as on the routes of the Jira connection
object
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
object
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
object
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
object
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
object
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"}The IP allowlist refused Plune
{ "error": "your company’s Jira accepts requests only from a list of addresses — add Plune’s address to it", "code": "jira_ip_blocked"}Jira asked Plune to slow down
{ "error": "Jira asked Plune to slow down — try again in 30 seconds", "code": "jira_rate_limited", "retryAfterSec": 30}Jira did not answer
{ "error": "Jira did not answer — try again in a few minutes", "code": "jira_unreachable"}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.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over
The server has no key to keep Jira tokens under; Jira was not asked
object
Example
{ "error": "Jira is not configured on this server — contact your operator"}