Hi,
I'm trying to create a rest api app to interact between a jira board and a third party website using a scoped api key.
The api needs to do the following tasks:
- Create/Read tickets
- Read/Write fields
- Find issues via JQL
- Read/write comments
- Update ticket status
For this I've currently given the key the following scopes:
- write:issue:jira
- read:issue:jira
- write:field:jira
- read:field:jira
- read:jql:jira
- write:comment:jira
- read:comment:jira
- write:request.status:jira-service-management (less sure about this one)
Initially I tried the following command:
curl -u account.email:[REDACTED] -X GET https://our_domain.atlassian.net/rest/agile/1.0/board/1243/issue?maxResults=50 -H "Accept: application/json"
And it was returning:
Client must be authenticated to access this resource.
Doing a little reading from similar questions here I thought the issue was the different endpoint when using a scoped api key, and it should be in the form of https://api.atlassian.com/ex/jira/<cloudid>/rest/api, as such I then tried the following:
curl -H "Authorization: Basic [REDACTED]" -H "Accept: application/json" "https://api.atlassian.com/ex/jira/<cloudid>/api/3/myself" -v --compressed
however this then returned:
{"code":401,"message":"Unauthorized"}* Connection #0 to host api.atlassian.com left intact
If someone could help shed some light on this for what I'm missing, either being incorrect scopes or if there is something else I am missing that would be greatly appreciated. Thank you.