How to change the state of a change using rest api?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2020 01:45 AM
I have created a standard change using the Standard (POST) api. Now when I try to change the state of the change from New(-5) to Sheduled(-2) using the Standard (PATCH) api with Request Body as {"state":"-2"} it fails with 400 error.
Following is the response body I get.
{
"error": {
"message": "Standard Change Request cannot move to state: -2",
"detail": ""
},
"status": "failure"
}
What exactly am I doing wrong here, also what is the best way to go about debugging such issue because the error msg doesn't really give much to work on
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2020 08:20 AM
Hello Sagar,
It seems their are some business rule is restricting your update. Can you try running it from background script or use try catch block.
Please mark as Correct Answer and Helpful, if applicable.
Thank You!
Abhishek Gardade
Abhishek Gardade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2021 07:22 AM
Abhishek-do you know what business rules those would be? I am having the same issue.