Modify Sysapproal_approver record using API

Donald Small1
Tera Expert

I am trying to do a simple API call to update an approval record on the sysapproval_approver table.  Using API Explorer, I have 

PUT https://*******.service-now.com/api/now/table/sysapproval_approver/8f0cc504873ecd109d87ba6f8bbb3575?sysparm_fields=state&sysparm_input_display_value=approved

It is returning a 200 OK Status, but the response is:

{
  "result": {
    "state": "requested"
  }
}

What am I missing?  Why can I not update the state via API?

 

1 ACCEPTED SOLUTION

If it's field level WRITE ACL, you can use debug security rules to find out why this ACL is not allowing REST API updates.

You can give required roles.

Also, check if state column is not read only at dictionary level. You won't be to update field which is read only at dictionary level.

 

 

Regards,

Sachin

View solution in original post

5 REPLIES 5

sachin_namjoshi
Kilo Patron
Kilo Patron

I just used same method using below and this updated state to approved.

 

https://****.service-now.com/api/now/table/sysapproval_approver/00e9c07adba52200a6a2b31be0b8f5ae

 

I used below payload

 

find_real_file.png

 

Regards,

Sachin

 

 

So I can do it in my PDI, but not my live instance. If the state field is read-only on the form, I should still be able to update via API, right? I will have to see if I some some sort of BR or ACL in place.

If it's field level WRITE ACL, you can use debug security rules to find out why this ACL is not allowing REST API updates.

You can give required roles.

Also, check if state column is not read only at dictionary level. You won't be to update field which is read only at dictionary level.

 

 

Regards,

Sachin

That was it.  We have it read only at the dictionary level.  Once I remove that attribute, I was able to approve via API.  Thank you!