I have created a personal 'API token with scopes' with the following scopes.
read:issue:jira
read:project:jira
read:user:jira
read:user.property:jira
read:user-configuration:jira
read:issue.watcher:jira
write:issue:jira
write:project:jira
write:issue.watcher:jira
export JIRA_EMAIL="<jira user email id>"
export JIRA_TOKEN="<persona API token with scopes>"
export JIRA_SITE_SCOPED="api.atlassian.com/ex/jira/<cloud id>"
With this curl command, I am getting error:
"error":"Not Found","message":"No message available","path":"/ex/jira/<cloud id>/rest/api/3/issue"
Curl command :
curl -v -u "$JIRA_EMAIL:$JIRA_TOKEN" \
-X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
"https://$JIRA_SITE_SCOPED/rest/api/3/issue" \
--data '{
"fields": {
"project": {
"key": "BSAC"
},
"summary": "Sample issue created via curl",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "This issue was created using Jira REST API."
}
]
}
]
},
"issuetype": {
"name": "New Hire"
}
}
}'
Hi,
You need to pass your jira id and not the org id here :
export JIRA_SITE_SCOPED="api.atlassian.com/ex/jira/<my org id>"
it should be
https://api.atlassian.com/ex/jira/<jira cloud id>/
Thank you. Found that there was type in the Cloud Id. Corrected it and its working as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please accept the answers from community members if they helped you out. This is useful for other users on the forum as well.
Thank you.
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.
Hello @Das Chebattina
As @Mohamed Benziane mentioned that 404 Not Found almost always means the <cloud id> in the URL is not your Jira cloudId (people often paste an orgId / directoryId / something else).You want the ID that belongs to your Jira site (tenant), not your Atlassian org.
Have a great Day and soon Weekend 🤠☀️
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.