Rest VS Scripted Rest APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 12:30 AM
Hello expert,
I need to understand the difference between Rest and Scripted Rest APIs in terms of servicenow ?
I have to integrate ServiceNow CMDB with 3rd party(Solarwinds, Ipsoft) CMDB. Which API is recommended and why?
Thanks in Advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 12:34 AM
Hi Neeraj,
Please refer the below link.
difference between REST message and scripted RESTAPI?
PS: Hit like, Helpful or Correct depending on the impact of the response
Regards,
Parvinder

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 12:37 AM
Please check this blog for more info on scripted REST APIs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2018 04:32 PM
Hello,
I need to create a Webservice API where input is: Sys ID of any record and output is: all *related* active records to that sys id. The relationships between the tables is maintained in Relationships under system definition.
Could you please guide me how to implement this? Sample code would be great.
Input: Sys ID of the record
Output: All *RELATED* active records from *VARIOUS* tables (in the following JSON format):
{
"result": [
{
"Sys ID": "5520267",
"CI Name": "Record 1",
"Table Name": "u_table_a"
},
{
"Sys ID": "5520367",
"CI Name": "Record 2",
"Table Name": "u_table_a"
},
{
"Sys ID": "8331210",
"CI Name": "Record 1",
"Table Name": "u_table_b"
},
{
"Sys ID": "8321210",
"CI Name": "Record 2",
"Table Name": "u_table_b"
},
{
"Sys ID": "3042006",
"CI Name": "Record 3",
"Table Name": "u_table_b"
},
{
"Sys ID": "4509847",
"CI Name": "Record 1",
"Table Name": ""u_table_c"
}
{
"Sys ID": "4509247",
"CI Name": "Record 2",
"Table Name": ""u_table_c"
}
]
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 12:45 AM
Hi Neeraj,
Rest API: To become familiar with ServiceNow REST APIs, review this scenario which assumes that you are an integration consultant who wants to see how easily you can integrate with the Incident [incident] table using the REST Table API. The REST Table API is active by default in all instances, starting with the Eureka release.
The tasks you will perform are:
-View available resources.
-Query existing incident records.
-Create a new incident record.
-Retrieve the record you created.
-Update the record.
-Delete the record.
Scripted Rest API: The Scripted REST APIs feature allows application developers to build web service APIs.You can define service endpoints, query parameters, and headers for a scripted web service API, as well as scripts to manage the request and response.Scripted REST APIs generally follow the REST architecture, but may be customized to use different conventions.The following podcast offers additional information on the use of Scripted REST APIs.
Testing REST web services through Firefox RESTClient or POSTMAN
Real-time CMDB: Mapping as a Service
Ask the Expert : Geneva - Scripted REST APIs