HI Team,
We are trying to access JIRA using the below API using Basic Auth. How every i am getting 401 Unauthorized error
COuld you please help me how can i troubleshoot this issue
https://balajichandrashekar.atlassian.net/jira/agile/latest/issue/AT-1
Hi @dushyanth.pamala ,
Based on the URL you have posted, it seems you are attempting on running the REST API endpoint described on https://developer.atlassian.com/cloud/jira/software/rest/#api-rest-agile-1-0-issue-issueIdOrKey-get
Under the Examples section you shall find different ways of calling the HTTP Request GET method (e.g cURL, Node.js, Java, Python, PHP).
As @DPKJ suggested, you will require an API Token to authenticate your user when calling the REST API endpoint mentioned, for that visit https://confluence.atlassian.com/cloud/api-tokens-938839638.html as mentioned on this post.
Kind regards,
Rafael
@dushyanth.pamalaCan you share curl/script that you using?
Also you need to specify, <email>:<api_token> in basic auth not <username>:<password> if you are doing that mistake.
Read this for API Tokens - https://confluence.atlassian.com/cloud/api-tokens-938839638.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is first time we are trying something with JIRA API, hence we are not using any scripts.
I ready some documents, based on the documents i framed this API and used it.
Could you help me with some basic GET operation to get of a project and Tasks please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is an example using curl to get issue,
curl -D- -u <EMAIL>:<API_TOKEN> -X GET -H "Content-Type: application/json" https://<SITE_NAME>.atlassian.net/rest/api/3/issue/<ISSUE_ID_OR_KEY>
To get list of project
curl -D- -u <EMAIL>:<API_TOKEN> -X GET -H "Content-Type: application/json" https://<SITE_NAME>.atlassian.net/rest/api/3/project/<PROJECT_ID_OR_KEY>
To find more api look here - https://developer.atlassian.com/cloud/jira/platform/rest/v3/
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.