Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot Create Issue via rest api after tokenAPI adoption Edited

I have integrated ServiceNow with JIRA.

I have defined an integration dedicated JIRA user (SN_SI_USER) that call JIRA via rest API.

After the adoption of TokenApi when create an issue with SN_SI_USER via rest API  I am reciving this error:

HTTP/1.1 400 Bad Request

{"errorMessages":[],"errors":{"summary":"Field 'summary' cannot be set. It is not on the appropriate screen, o
r unknown.","customfield_10600":"Field 'customfield_10600' cannot be set. It is not on the appropriate screen,
or unknown.","customfield_10900":"Field 'customfield_10900' cannot be set. It is not on the appropriate scree
n, or unknown.","description":"Field 'description' cannot be set. It is not on the appropriate screen, or unkn
own.","assignee":"Field 'assignee' cannot be set. It is not on the appropriate screen, or unknown.","customfie
ld_11100":"Field 'customfield_11100' cannot be set. It is not on the appropriate screen, or unknown.","priorit
y":"Field 'priority' cannot be set. It is not on the appropriate screen, or unknown."}}

 

To bypass all software layer i do the test with curl.

If I use an admin user account with the same Token and the same request I have no error, issue is created.

If I grant admin permissions/role to SN_SI_USER i have an error (400 Bad Request).

 

Any idea?

 

POST request:

{

"fields": {

"project":

{

"key": "PROJECT00"

},

"assignee": {

"name": "USER2"

},

"summary": "REST EXAMPLE - DO NOT CARE - IT WILL BE DELETED BEFORE U CAN READ IT",

"description": "Creating an issue via REST API",

"issuetype": {

"name": "Bug"

},

"priority": {

"id": "1"

},

"customfield_11100": "Service_me_id",

"customfield_10600": {

"id" : "10301"

},

"customfield_10900": "USER1"

}

}

 

 

Solved:

Log in to Jira with the same user (SN_SI_USER) with which you want to execute the REST API request, then generate the TOKEN key and use this key with that user (SN_SI_USER) to execute the REQUEST API.

Jira software must generate a TOKEN key per user, not per application, so a key generated by userA does not work with userB.

0 comments

Comment

Log in or Sign up to
This widget could not be displayed.
TAGS
Community showcase
Published in Marketplace Apps & Integrations

The origin of Dashboard Hub: Atlasboard

First of all, I'm going to introduce myself. My name is Gorka, I work as product manager in Appfire Although this is my first public article in the community, I've been around since 2013. I starte...

232 views 4 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you