You are currently viewing ServiceNow REST API Version Differences

ServiceNow REST API Version Differences

Hello,

Welcome to ServiceNow Spectaculars.

This article focuses on the difference between versions of the REST API, i.e., REST V1 and REST V2.

While using RESTful web services in ServiceNow, we have the option to use any of the versions. However, version V2 was available starting with the Geneva release. What are the main differences in use, structure, and implementation? These will be witnessed in this article.

Stay Tuned & Subscribe To The Blog.

ServiceNow Spectaculars

Difference between V1 and V2?

Version V1Version V2
In case GET query retrieves multiple records and matches no records,
the response is the error No Record Found with status code 404
In case GET query to retrieve multiple records matches no records,
the response is an empty array with status code 200
Other table methods, such as POST and DELETE, DELETE the same for V1 and V2Other table methods, such as POST and DELETE, DELETE the same for V1 and V2

Example OF V1

QueryResponse
https://dev95794.service-now.com/api/now/v1/table/incident?sysparm_query=short_descriptionLIKEdescription_randomStatus Code: 404 Not Found
Response body:
{
  "error": {
    "message": "No Record found",
    "detail": "Records matching query not found. Check query parameter or offset parameter"
  },
  "status": "failure"
}

Example of V2

QueryResponse
https://dev95794.service-now.com/api/now/v2/table/incident?sysparm_query=short_descriptionLIKEdescription_randomStatus Code: 200 OK
Response body:

{
  "result": []
}
end footer

Leave a Reply