Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Statuschange not working via API call from monitoring system

Jeroen Gouma
Contributor
March 7, 2023

When our monitoring system raises an alert, an issue is created in Jira Service Management via API call. This works fine, the key is also returned to the monitoring system.

When an alert is cleared, a status change of the issue should be send to JSM. If I manually execute the API-call via curl it works as designed.

However, when executing the similar status change from the monitoring system it failes with this error:

{
"errorMessages": [
"Issue does not exist or you do not have permission to see it."
],
"errors": {}
}

I'm using the same credential (even making the user admin does not allow me to change the status of the issue).

 I'm using the following call to change the status:

curl --request POST \
--url 'https://xxxxxxx.atlassian.net/rest/api/3/issue/KEY-yyyy/transitions' \
-H "Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxx=" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '
{
"transition": {
"id": "161"
}
}'

 

Any idea how to further investigate/debug what is going wrong here?

 

1 answer

1 accepted

1 vote
Answer accepted
Tuncay Senturk
Community Champion
March 7, 2023

Hi @Jeroen Gouma 

That's weird!

Are you sure that you're using the same credentials and the API call works when executed manually? Or are you sure that the system uses the same credentials and the correct issue key? You can try adding some logs to your monitoring system code to print out the issue key being passed to the API call.

Additionally, please make sure that the user being used in the API call has the necessary permissions to transition the issue status, and that there are no workflow conditions or validators preventing the transition.

Jeroen Gouma
Contributor
March 7, 2023

Hi @Tuncay Senturk 

Thanks for your reply. In order to add extra logging I recreated the whole integration again making sure all the proper keys where used.

Surprisingly enough know it is working, so most likely there was some kind of error in the authenticaion header (or something similar). I'm happy, only have to delete the extra logging :-).

Kind regards,

Jeroen

Tuncay Senturk
Community Champion
March 7, 2023

Haha! I'm glad you sorted it out. Logging is very important and it always helps :D 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events