Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Unable to modify change request task state via REST API

Philip Mihaylov
Kilo Contributor

Hello,

I'm trying to modify the state of change management task via the following call

Request: PATCH call on /sn_chg_rest/change/<requestID>/task/<TaskID>

Body: {"work_notes":"updating", "state":"In Progress"}

The call is successful, new work notes are added to the task, but the state remains open.

I also tried with "state":"in progress", "state":2.0. Nothing works...

 

Thanks and Best Regards,

Philip

1 ACCEPTED SOLUTION

@Philip Mihaylov was you able to achieve what was required? Please let me know if you need more help.

View solution in original post

5 REPLIES 5

Thanks for the hint ,Pavlo,

I manage to change the state via:

PUT 

https://{instance_name}.service-now.com/api/now/table/task/{task_sys_id}

{"state":"2","work_notes":"Updating to in progress"}