-
Type:
Suggestion
-
Resolution: Unresolved
-
None
-
Component/s: Assets - Core experiences
-
0
-
2
Problem Definition
The Jira REST API on api/2/issue returns inconsistent information on the Insight custom field in GET as compared to POST request - the JSON data for GET request includes the object's "label / name + object key" but the POST request only requires the "object key". The expectation for the REST API would be a consistent data.
- Following this guide, create an issue via Jira REST API and include the key attribute to define the Insight object key(s). For example:
{ "fields": { "project": { "key": "ITSD" }, "summary": "REST ye merry gentlemen.", "description": "Creating of an issue using project keys and issue type names using the REST API", "issuetype": { "name": "Task" }, "customfield_10300" : [{"key" : "IAS-1"}] } }
This will create an issue in project ITSD and associate object IAS-1 in an Insight custom field
- Run the GET request to retrieve the data. For example:
{ "expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations", "id": "10501", "self": "http://localhost:48133/j8133/rest/api/2/issue/10501", "key": "ITSD-44", ... "customfield_10300": [ "iPhone 7 (IAS-1)" ],
Notice the object name is included in the JSON data
Specifically, the difference is at:
POST
"customfield_10300" : [{"key" : "IAS-1"}]
GET
"customfield_10300": ["iPhone 7 (IAS-1)"],
Suggested Solution
Return the same data format for both GET and POST.
Workaround
No workaround available at this point of time.
- links to