- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @User739474 ,
Are you using the same URL with the parameters as shown below?
https://devxxxx.service-now.com/api/now/table/incident?sysparm_fields=number%2Csys_id
With above parameters , url will send response body as attach image
If this helps you then mark it as helpful and accept as solution.
Regards,
Aditya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
For GET API with sysId, we are getting below error response:
404 Not found:
{
"error": {
"message": "No Record found",
"detail": "Record doesn't exist or ACL restricts the record retrieval"
},
"status": "failure"
}
Any recent changes in the ACL list/user roles? This was working earlier, now it's not.
