Commit fcaec81
authored
Scripted rest api retrieve incident (#53)
* Add Scripted REST API for Incident Data Retrieval
This commit implements a new Scripted REST API in ServiceNow to allow external applications to retrieve specific incident data based on query parameters.
Key Features:
- API Endpoint: `/api/incident/retrieve`
- Supports query parameters such as `sys_id` and `state` to filter incidents.
Script Logic:
- Utilizes GlideRecord to query the `incident` table.
- If `sys_id` is provided, retrieves the specific incident; otherwise, queries based on the `state`.
Response Formatting:
- The response is structured in JSON format, providing incident details like `sys_id`, `short_description`, and `state`.
Testing:
- Instructions for testing the API and documentation for developers on how to use it have been included.
* Rename scripted_rest_api_incident_retrieve.js to Scripted Rest API Retrieve Incident.js
This commit implements a new Scripted REST API in ServiceNow to allow external applications to retrieve specific incident data based on query parameters.1 parent 8454dc8 commit fcaec81
1 file changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments