I 'm trying to hit a create issue request using docs here :
Jira REST API examples (atlassian.com)
SO far I'm able to get project ID and key then issue type ID succesfully.
But as soon as I'm trying to create an issue using below JSON body
{
"fields": {
"project":
{
"id": "TER"
},
"summary": "No REST for the Wicked.",
"description": "Creating of an issue using IDs for projects and issue types using the REST API",
"issuetype": {
"id": "11112"
}
}
}
I'm getting a response saying "XSRF check failed"
As per the documentation available here : XSRF check failed when calling Cloud APIs | Atlassian Cloud | Atlassian Documentation
I have added the header
X-Atlassian-Token: no-check
but the issue remained same
URL - POST : http://<mydomain>.atlassian.net/rest/api/2/issue/
Authorization is basic - Username and API key as password
Headers - Content-Type" : "application/json"
Please note : I'm using postman for the testing.
Am I missing something ? I have a site admin and project administrator permissions.
Can you please share the Post man screen shot with request data and headers, regarding the above JSON which you shared , I found one issue there, please fix it.
If you use "Id" then provide the project id eg. 10001,1003
if you use "Key" then you can use project key
In above JSON you are using Id Param but the value is project key, it should be the project id.
Thanks @Muhammad Ramzan_Atlassian Certified Master_ for replyiing
So below is a snapshot of my postman headers :
Thanks for your suggestion , I have changed the JSON as below :
{
"fields": {
"project":
{
"id": "14215"
},
"summary": "No REST for the Wicked.",
"description": "Creating of an issue using IDs for projects and issue types using the REST API",
"issuetype": {
"id": "11112"
}
}
}
But it's still same
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing the image, can you please replace http with https and then try
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.
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.