Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

SNOW Table POST API now not returning INC number and SYSID in response, it's just giving 201 status

User739474
Tera Contributor

SNOW Table POST API now not returning INC number and SYSID in response, it's just giving 201 status. 

It was working earlier, but now response body is empty. Any reason this is stopped ? Not finding in SNOW docs also. Please help.

 

User739474_0-1788616911895.png

 

2 ACCEPTED SOLUTIONS

IbrarA
Tera Guru

Hi @User739474

A 201 with an empty body usually points at read access rather than the API itself. The create succeeds because the write side passes, but the record is echoed back through a read, and when that fails you get the status with nothing in it.

Quickest way to confirm is to run the same call with an admin account. If the body comes back, it's access on the integration user.

Since it was working before, check what changed for that user, a role removed, a new ACL on incident, or a before query business rule limiting what they can read. Worth checking the Accept header is set to application/json too.

Same behaviour discussed here: https://www.servicenow.com/community/developer-forum/api-post-create-not-returning-a-response-in-bod...

 

 

Thanks

ibrar

View solution in original post

vaishali231
Kilo Sage

hey @User739474 

201 Created means the Incident is being created successfully. If the response body has suddenly become empty, first check whether X-no-response-body: true is being sent in the request.

If not, check the *.sys_id write ACL and test with the integration user vs. admin. Also verify that sys_id is not being sent in the POST payload.

The Location response header can also be checked to get the newly created record's sys_id.

*************************************************************************************************************************************

If this response helps, please mark it as Accept as Solution and Helpful.

Doing so helps others in the community and encourages me to keep contributing.

Regards

Vaishali Singh
Linkedin - https://www.linkedin.com/in/vaishali-singh-2273361bb





View solution in original post

5 REPLIES 5

User739474
Tera Contributor

After adding the right ACLs, started getting the response body.