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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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
Highlighted

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 comment
TAGS
Community showcase
Published in Jira Software

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

4,632 views 22 33
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