Scripted REST API Error response detail
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 02:28 AM
Hi,
Can anyone provide all the error response codes for rest api ?
Do we have any service now document or url for this?
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 03:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 03:05 AM
Hi,
For any of the ServiceNow APIs, the stats response codes are listed on the API documentation here (I've linked to the TableAPI as an example): https://developer.servicenow.com/dev.do#!/reference/api/rome/rest/c_TableAPI
For a scripted REST API, if the developer that created it hasn't created any documentation, you'll need to review the code to see the status codes it can respond with.
Mike

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 03:12 AM
Hi Lucky,
Please go through below links for more info.
https://developer.servicenow.com/dev.do#!/reference/api/rome/rest
Please mark my answer ✅ Correct/helpful,
Regards
Sanjay Bagri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-16-2022 03:13 AM
Hi, Please refer below response codes. The following codes are most frequently affecting.
Please mark as correct answer if it helped.
ID |
Code |
Reason |
Meaning |
Example Body |
1 |
201 |
Success |
The successful JSON Response |
HTTP/1.1 200 OK Content-Length: xxx Keep-Alive: timeout= xx, max=xxx Connection: Keep-Alive
|
2 |
401 |
Unauthorised |
The request header does not contain basic authentication details. The request has been refused |
HTTP/1.1 401 Unauthorised Request Content-Length: xxx Content-Type: application/vnd.api+json
|
3 |
403 |
Forbidden |
Request contains invalid parameters. |
HTTP/1.1 403 Input Request errors
Server: TBD Content-Length: 230 Content-Type: application/vnd.api+json |
4 |
500 |
Internal Server Error |
There is a problem in ServiceNow Infrastructure |
HTTP/1.1 Internal server error
Server: TBD Content-Length: xxx Content-Type: application/vnd.api+json |
5 |
503 |
Service unavailable |
Service is temporarily unavailable and should be retried later. This API will not re-try to send the response! |
HTTP/1.1 503 Service Unavailable Request Server: TBD Content-Length: xxx Content-Type: application/vnd.api+json
|
Suresh.