- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2020 11:56 PM
HI,
We are building multiple integrations for our client.
We had this query, are Scripted REST APIs used only for inbound communication in to ServiceNow. Can we use Scripted REST API for Outbound integrations from ServiceNow on to different third party systems ?
Thanks,
Gopi
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2020 12:05 AM
Hi Gopi,
Scripted REST APIs are being used in ServiceNow so that an endpoint can be given to 3rd party team.
This endpoint when consumed by 3rd party would perform some operation as defined in the scripted rest API.
It is used for inbound communication to ServiceNow only.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2020 04:50 AM
Hi Gopi,
that's correct; you need to share the endpoint and the sample request format
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2020 04:58 AM
Thank you.
But how do we create an incident ticket in our instance ?
Do you have any script which can be used for the same.
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2023 11:01 PM
Hi @Gopi22
That's correct, you can get from 'Explore REST API'.
Your rest endpoint should look like below:
https://<instance.service-now.com>/api/<name_space>/<version>/<api_id>/<relative_path>
In this URI:
- <instance.service-now.com>: Path to the ServiceNow instance where users access the scripted REST API.
- <name_space>: For web services in the global scope, the name space is the value of the property glide.appcreator.company.code. For web services in a scoped application, the name space is the scope name, such as x_company_appname. For additional information on name spaces, see Application scope.
- <version>: Optional. Version of the endpoint to access if the API uses versioning, such as v1. You can access the default version of a versioned API by specifying the URI without a version number.
- <api_id>: Value of the API ID field on the Scripted REST Service form. By default this value is based on the service name.
- <relative_path>: Relative path defined for the resource in the Scripted REST Service form. Specifying a relative resource path allows you to have multiple resources using the same HTTP method, such as GET, in one web service. For example, a resource may specify the path /{id} when the web service has only one GET resource, or /user/{id} and /message/{id} when the web service has different resources for requesting user and message records.
Though you can get the details of your resource path from resource path field of your scripted rest api.
Please refer below ServiceNow product doc and youtube link for better understanding:
NOTE: Please mark helpful if this helps you in any way to make your understanding better.
Thanks
Abhishek Pandey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 09:34 AM
Hi @Gopi22
That's correct, you can get from 'Explore REST API'.
Your rest endpoint should look like below:
https://<instance.service-now.com>/api/<name_space>/<version>/<api_id>/<relative_path>
In this URI:
- <instance.service-now.com>: Path to the ServiceNow instance where users access the scripted REST API.
- <name_space>: For web services in the global scope, the name space is the value of the property glide.appcreator.company.code. For web services in a scoped application, the name space is the scope name, such as x_company_appname. For additional information on name spaces, see Application scope.
- <version>: Optional. Version of the endpoint to access if the API uses versioning, such as v1. You can access the default version of a versioned API by specifying the URI without a version number.
- <api_id>: Value of the API ID field on the Scripted REST Service form. By default this value is based on the service name.
- <relative_path>: Relative path defined for the resource in the Scripted REST Service form. Specifying a relative resource path allows you to have multiple resources using the same HTTP method, such as GET, in one web service. For example, a resource may specify the path /{id} when the web service has only one GET resource, or /user/{id} and /message/{id} when the web service has different resources for requesting user and message records.
Though you can get the details of your resource path from resource path field of your scripted rest api.
Please refer below ServiceNow product doc and youtube link for better understanding:
NOTE: Please mark helpful if this helps you in any way to make your understanding better.
Thanks
Abhishek Pandey