Hello folks!
We are trying to get options for custom field as described here:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302#api-rest-api-3-customField-fieldId-option-get
but seems like this works with login\password credentials only and for OAuth flow it says "OAuth 2.0 is not enabled for this method."
Are there any plans to support OAuth 2.0 for this particular endpoint? Such a limitation is quite disappointing ...
Would appreciate any suggestions \ workarounds
Hi!
I'd like to let you know that I have enabled
/customField/{fieldId}/option
endpoints for OAuth and now you can use it in 3LO apps.
Do not hesitate to reach us when you are facing any other issues.
Enjoy!
Hello @Volodymyr OSTAPIV ,
Welcome to the Atlassian community!
If I understand correctly, you are able to call the Get options for field REST API endpoint (GET /rest/api/3/customField/{fieldId}/option) using Basic Authentication with email address and API Token, but this is not working when using Oauth 2.
This looks similar to what is discussed in the below thread:
In there the issue was caused by the bug tracked as: [JRACLOUD-72126] Using Latest API reports OAuth is not enabled
Can you kindly check if this is the same issue?
In case it is not, please call the REST API endpoint again using Curl making sure to include the -D- flag to print the whole header and paste the response in your reply, making sure to remove/hide the sensitive data (e.g. token, instance name, etc.) .
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dario!
Here https://jira.atlassian.com/browse/JRACLOUD-72126 people are able to hit `V3` endpoint and issue appears for the `latest` only.
In my case it doesn't work for V3 either (when using OAuth 2.0), but the same mechanism allows to access almost all the endpoints. I think its a Jira API limitation because all the doc pages but this have OAuth scopes required mentioned.
I will try to figure out request details follow up. But could you please check maybe its documented limitation.
Regards, Volodymyr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here are request details:
HttpRequest{method=GET, uri=https://api.atlassian.com/ex/jira/91d237d6-0c68-47c8-a8f6-885f45dfc126/rest/api/3/customField/10036/options, headers=[Pair{Authorization=Bearer ey#REDACTED#mg}, Pair{ATL-TraceId=1364dd31-19a5-4530-85be-547c914ca5f0}], body=null}
Nothing special...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Headers from curl:
HTTP/2 403
vary: Accept-Encoding,Accept-Encoding
content-type: application/json;charset=UTF-8
strict-transport-security: max-age=315360000; includeSubDomains; preload
date: Sat, 11 Apr 2020 06:21:06 GMT
x-request-id: c60dabe49804393f
x-arequestid: 816a81bb-5842-4a19-b00a-282a665e39f9
x-application-context: Stargate:prod,prod-euwest:8080
x-xss-protection: 1; mode=block
timing-allow-origin: *
x-content-type-options: nosniff
micros-issuer: micros/edge-authenticator
x-frame-options: SameOrigin
expect-ct: report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/global-proxy", enforce, max-age=86400
Response:
{"errorMessages":["OAuth 2.0 is not enabled for this method."]}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Volodymyr OSTAPIV ,
I have checked with DEV and I got confirmation that those endpoints are indeed not enabled for Oauth2 and that you should use the ones for apps instead:
These endpoints are not enabled for 3LO apps.
Instead use this ones:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302#api-group-Issue-custom-field-options--apps-
Can you kindly confirm above endpoints are working for you?
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dario.
1. The documentation says that endpoint is used for custom fields created by Connected Apps and this is not a case.
2. Tried to GET from rest/api/3/customfield_10035/option (customfield_10035 is my custom field key) and got 404
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Volodymyr OSTAPIV ,
As mentioned in the documentation:
fieldKey REQUIRED
string
The field key is specified in the following format: $(app-key)__$(field-key). For example, example-add-on__example-issue-field. To determine the
fieldKey
value, do one of the following:
- open the app's plugin descriptor, then app-key is the key at the top and field-key is the key in the
jiraIssueFields
module. app-key can also be found in the app listing in the Atlassian Universal Plugin Manager.- run Get fields and in the field details the value is returned in
key
. For example,"key": "teams-add-on__team-issue-field"
Also, still according to the documentation, Oauth 2 is only supported for apps (see below):
Which authentication method should I use?
- Connect apps: Use JWT. You can also use OAuth 2.0 user impersonation.
- Other apps: Use OAuth 2.0 (3LO) for authentication and authorization.
- Not using an app: Use OAuth 1.0a. See OAuth for REST APIs (Jira platform), OAuth for REST APIs (Jira Service Desk), or OAuth for REST APIs (Confluence).
Therefore, I have asked DEV to clarify:
In the meanwhile, can you le me know:
For further details, you might want to see the below post on the developers community:
Finally, for the future, please notice that this is not the best place to get help on development related questions. The right resources are listed in https://developer.atlassian.com/resources.
Specifically:
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dario,
1. Field was created by the user from the Jira UI itself, it's not created by application.
2. We use https://developer.atlassian.com/cloud/jira/platform/oauth-2-authorization-code-grants-3lo-for-apps/ but we are not building Connected App, what we are going to build matches Other apps
3. I was able to hit that endpoint using login\password auth but we'd like to use OAuth 2.0 and it was actually the reason to ask.
Just to know if its really not supported and if it's going to be supported in the future
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your quick reply @Volodymyr OSTAPIV ,
By reviewing the documentation, it definitely looks like:
I am waiting for DEV to confirm this is the case and/or provide more details on plans to have this implemented.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Volodymyr OSTAPIV ,
After further discussing this with dev, I have been advised to open the below feature request to have those endpoints enabled for 3LO apps:
You may want to vote and watch the above feature request so that you will get notified in case of any update. The feature will be addressed according to the Implementation of New Features Policy.
Also, for the future, please notice that this is not the best place to get help on development related questions. The best resources are the ones listed in https://developer.atlassian.com/resources.
Specifically:
Have a nice weekend.
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are very welcome @Volodymyr OSTAPIV ! :)
Also, I am accepting the answer so that this thread will be marked as answered.
Cheers,
Dario
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.