Hi team , I am interacting with JIRA through its REST API v2
and there are some unexpected behaviors compare to official developer document
JIRA software version: 8.8.1
Cases:
I found 2 REST API references: Jira Server platform REST API reference(Jira 8.8.1) vs Jira Cloud platform Developer REST API v2 Reference.
Both of these references support the “/rest/api/2”, and I compared these 2 references, some APIs in Jira Server platform REST API reference are missing in the Jira Cloud platform Developer REST API v2 Reference, would you please show me which reference should I follow for this Jira software v8.8.1?
According to the example in creating an issue in both references, there is an field “assignee” in the Body Parameters with user’s account id / name. I think the ‘Create Issue’ REST API mentions in both references should support creating an issue with “assignee” which is offered in the request body.
Example in Jira Cloud platform Developer REST API v2 Reference
Create issue and provide assignee with accountId
Example in Jira Server platform REST API reference(Jira 8.8.1)
Create issue and provide assignee with name
However, I encounter 2 issues in creating an issue with “assignee”:
Right now when I want to create an issue with “assignee”, I have to call 2 APIs:
This make me worry that, I am not sure whether some other fields would cause the same issue as the field “assignee” does in creating an issue. If yes, then it would be a very bad user experience.
Again, while I am trying to creating an issue, I would like to retrieve values from my custom field under project which user selected.
I try the REST API mentions in both references, but the result is not expected, would you please advise me how to retrieve the options/value from my customField?
Here are the details:
There isn’t any REST API to list the options by customFieldId, only has an Get custom field option API to get the option with specific option id (GET /rest/api/2/customFieldOption/{id})
Unfortunately, it response 404 when I try to lookup contextId by customFieldId.
Here are the steps:
Response:
Get ContextId by customFeildId: https://gbm-bds-jira.systems.uk.hsbc:8443/rest/api/2/field/customfield_10200/context
Response:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tom Lister
Let me summarize the issues I got when I'm interacting with REST API v2:
I'm now calling the REST endpoint v2 on Jira-v8.8.1
I found 2 references: Jira Server platform REST API reference(Jira 8.8.1) and Jira Cloud platform Developer REST API v2 Reference.
Both references support the REST API v2, but there are some differences on the REST API v2 between these 2 references. Which one should I follow when I am interacting with jira-v8.8.1?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tom Lister
You can check the details posted by @Mengmeng Yu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mengmeng Yu @Wing S C Chen
Please bear in mind that this is a community not the Atlassian support desk.
Re API reference - the Cloud and Server API's are different so the latest published version for your platform is the one to use.
Server/Data Centre = https://docs.atlassian.com/software/jira/docs/api/REST/8.5.12/
Is the username an existing user?
the response /rest/api/2/user?key=xxx}'s response does not contain a field "accountId". suggest it does not
double check the name value.
Does it work if you create an issue manually?
Does your user have 'Assignable User' permissions in the project?
I recommend this plugin for testing
https://marketplace.atlassian.com/apps/1211542/atlassian-rest-api-browser?hosting=server&tab=overview
I'll checkback later
Best
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.