Getting HTTP Status Code 202 for every REST API request.

skymak
Kilo Contributor

Hi,

We are getting HTTP Status Code 202 for every REST API request. For example: https://xxxxxx.service-now.com/api/now/v1/table/task call returns with 202 and same is the case with other tables. According to the REST API documentation, 202 is not listed as a valid response code. (http://wiki.servicenow.com/index.php?title=REST_API#REST_Response_HTTP_Status_Codes

Thanks,

Malik Lalani.

3 REPLIES 3

henry_cheng
ServiceNow Employee
ServiceNow Employee

Hi Malik,



The HTTP status code 202 means the request is accepted but due to some reason it has not been completed. Please refer to below link for the definition.


https://httpstatuses.com/202


This could happen due to misconfiguration or incorrect parameter in the request header. What method are you using to send out the request?


I recommend you have a check about the ServiceNow REST API specification at below URL.


http://wiki.servicenow.com/index.php?title=REST_API#gsc.tab=0



Cheers


Henry


Hi Henry,



Thanks a lot for your response. I am using GET method to request the data. One thing to mention is that same piece of code is working for other instances but only one instance is giving out 202, others are responding with 200.



Thanks,


Malik Lalani.


henry_cheng
ServiceNow Employee
ServiceNow Employee

Hi Malik,



If this issue only happens on specific instance then please compare the API and environment first to see if any difference.


If you could find anything please login into ServiceNow HI system to log a ticket to support team.


We can reproduce to see what happens.



Cheers


Henry