Hi
I'm trying to access JIRA resources using Rest APIs
Its a JIRA Server where SSO is enabled
the end point I have used is : https://[siteURL]/jira/rest/api/latest
I have used basic authentication and I see a 404 error
can someone please help me if there are any additional steps needed to be done like creating any API tokens or as an administrator enable Rest APIs.
Thanks in Advance
Hi @Sai Segu
if the most basic endpoints that Hana mentioned
GET /rest/api/2/project (or GET /rest/api/latest/project)
fail in your scenario you need to work out on how SSO is implemented in your Jira instance.
Installations which I have seen and which make use of SSO integrations allow REST API access without any trouble - meaning without any 404 pages coming up.
In first step I would try to find out which implementation of SSO is in use (there are several apps as well as open source solutions), then to determine how it is configured, if REST API access is possible in general.
In case you did not install it yourself getting in contact which subject matter experts on the authentication/SSO setup.
Cheers,
Daniel
hi @Sei
This is what I did.
1. Installed Postman
2. Create a "New Request" in postman
3. Generate the GET API URL.
- Basically I am trying to get the issue details from JIRA Cloud. So, here is how I generated the url.
- First part of URL is my JIRA link (https://<company>.atlassian.net/) or the domain url that you are using to access your tickets.
- Build the rest of URL based on the need. Refer to this page for the more details on the second part of url. https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-search/#api-rest-api-2-search-get
- So now the URL Is https://<<company>>.atlassian.net/rest/api/2/search
- I am using my JQL to complete the remaining part of URL as below. After the word 'search', enter "?jql=<your JQL>".
- Now the whole URL is
https://<<company>>.atlassian.net/rest/api/2/search/?jql=project = "<<proj_name>>" AND issuekey in (<<issueid1,issueid2..>>) ORDER BY status DESC
4. Now in Postman, enter this URL for "GET"
5. Click on Authorization > Select "Basic Auth"
5. Enter your username under "Username".
6. For password, you will need to actually enter your API token. See below steps to generate the API Token.
- In JIRA Cloud, Click on your picture/icon > Profle > Manage Your Account > Security > Create and Manage API Tokens (https://id.atlassian.com/manage-profile/security/api-tokens) > Create API Token > Copy the token. Make sure you copy the token to a notepad, because you can never see the token again.
7. In postman, Enter this APIToken in your password,, and click on Send to see the response.
This should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Sai Segu
You can use the add-on mO API Token/OAuth Authentication for Jira to use either OAuth 2.0 or API Tokens to authenticate your REST APIs.
It's really easy to set up with any other provider which you might be using for SSO. You can use the guides provided on the link below to set it up.
https://plugins.miniorange.com/jira-rest-api-setup-guides
Also, if you have any questions regarding it, you can reach out to info@xecurify.com
PS: I work for miniOrange, Top Atlassian SSO Vendor!
I hope this helps you! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Mahima_miniOrange_SSO . But I'm looking for some solutions that costs nothing. Not sure if that is doable.
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.
Thanks for the answer.. Right now I want to start off with just being able to authenticate to the SSO enabled JIRA Server and I have no success so far.
I have tried:
http://host:port/context/rest/api-name/api-version/resource-name which in my case I assumed is https://[siteURL]/jira/rest/api/latest and also https://[siteURL]/jira/rest/auth/latest. None of them worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sai Segu ,
if you want to do some sort of test like this, try getting all projects which are visible for your user:
GET /rest/api/2/project (or GET /rest/api/latest/project)
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.