Change Management API
-
- UpdatedAug 3, 2023
- 133 minutes to read
- Vancouver
- API reference
The Change Management API provides endpoints that enable third-party application integration with the ServiceNow Change Management process.
Use this REST API to integrate your change management process with external applications and when developing ServiceNow client-side applications.
This REST API enables integrators to:
- Initiate a standard change request from a published standard change request template.
- Create a change request of type emergency or normal.
- Update any field that exists in the change request table for any change request.
- Update any field that exists in the change task table and work tasks from creation through closure/cancellation.
- Retrieve a specific change request, standard template, change request task, or change model.
- Retrieve multiple change requests, standard templates, change request tasks using pagination.
- Perform risk evaluation.
- Refresh impacted services.
- Generate and process any related approval activity associated with a change request.
- Identify potential scheduling conflicts and identify periods where conflicts do not exist.
- Delete change requests, change request tasks, and conflict checking processes.
- Create a change request record based on a change model record.
- Retrieves a list of available states for the specified change request, including the current state.
- Traditional ITIL types: Standard, Emergency, and Normal.
- Change model states: New, Scheduled, Implement, Review, and Closed.
You can configure additional change models within your ServiceNow instance and then create change requests based on those change models using endpoints in this API. Use the Change Management - GET /sn_chg_rest/change/model/{sys_id} and Change Management - GET /sn_chg_rest/change/model endpoints to obtain the available change models in an instance. Then use the Change Management - POST /sn_chg_rest/change to create a change request based on a specified change model.
For information on configuring change models, see Configure Change Management.
- DELETE: change_manager or admin
- GET: change_manager, itil, sn_change_read, or admin
- PATCH/POST: change_manager, itil, or admin
In addition, administrators can set change properties to configure Change Management behavior. For a list of these properties and a description of their available functionality, see Change Management properties.
Change Management - DELETE /sn_chg_rest/change/{change_sys_id}/task/{task_sys_id}
Deletes the change request task identified by the specified sys_ids.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{change_sys_id}/task/{task_sys_id}
Default URL: /api/sn_chg_rest/change/{change_sys_id}/task/{task_sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
change_sys_id | Sys_id of the change request to which the task is associated. Located in the
Change Request [change_request] table. Verifies that the task is actually associated
to the specified change request. Data type: String |
task_sys_id | Sys_id of the change request task to delete. Located in the Change Tasks
[change_task] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - DELETE /sn_chg_rest/change/{sys_id}
Deletes the change request associated with the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}
Default URL: /api/sn_chg_rest/change/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request record to delete. Located in the Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Name | Description |
---|---|
result | Change request record that was deleted. Each element in this object corresponds
to a field in the record of the Change Request [change_request] table. Data type: Object |
Example: cURL request
Change Management - DELETE /sn_chg_rest/change/{sys_id}/conflict
Cancels the running conflict checking process for the specified change request (sys_id).
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}/conflict
Default URL: /api/sn_chg_rest/change/{sys_id}/conflict
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request record for which to cancel the running conflict
checking process. Located in the Change Request [change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
None |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Name | Description |
---|---|
None |
Example: cURL request
Change Management - DELETE /sn_chg_rest/change/emergency/{sys_id}
Deletes the emergency change request identified by the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/emergency/{sys_id}
Default URL: /api/sn_chg_rest/change/emergency/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the emergency change request to delete. Located in the Change Request [ change_request] table. |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - DELETE /sn_chg_rest/change/normal/{sys_id}
Deletes the normal change request identified by the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/normal/{sys_id}
Default URL: /api/sn_chg_rest/change/normal/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the normal change request to delete Located in the Change Request [
change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - DELETE /sn_chg_rest/change/standard/{sys_id}
Deletes the standard change request identified by the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/standard/{sys_id}
Default URL: /api/sn_chg_rest/change/standard/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the standard change request to delete. Located in the Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/ci/{cmdb_ci_sys_id}/schedule
Enables retrieving available time slots by configuration item ID and duration, with an option to include planned start time.
Role required: sn_change_writer.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/ci/{cmdb_ci_sys_id}/schedule
Default URL: /api/sn_chg_rest/change/ci/{cmdb_ci_sys_id}/schedule
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
cmdb_ci_sys_id | Sys_id of a record in the Configuration Items [cmdb_ci] table. This endpoint does not require a change request. |
Name | Description |
---|---|
duration_in_seconds | Duration of change in seconds, that is, how much time is required to complete
the change request task. Data type: Integer |
planned_start_time | Optional. Date and time that the change request is planned to start implementation in UTC. Retrieve the available time slot start at or later than this time. If not provided, the system uses the current time as the start time. Time format: yyyy-mm-dd hh:mm:ss Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
202 | System accepted the request. |
400 | Bad Request. A bad request
type or malformed request was detected.
Possible issues:
|
Response body parameters (JSON or XML)
Get available time slots
Use the value provided in the worker.link to get schedule window details. The value is in the following format:
https://instance.service-now.com/api/sn_chg_rest/change/worker/<worker_sys_id>
Use the worker_sys_id in GET /sn_chg_rest/change/worker/{sys_id} to view results.
The response body contains the status and provides results when processing is complete.
- If the provided time slot is available for the change request within the schedule time slot, the worker API lists the available time slots in the payload.spans property. The payload.spans property is not listed in the results otherwise.
- If there are no time slots available for change
request duration provided within the defined scheduling time slot, the
messages.infoMessages states the following:
D
Note: The change request scheduling time slot default value is 90 days. To change this value, modify the change.conflict.next_available.schedule_window property. For more information, see Configure conflict analysis properties.
The following GET /sn_chg_rest/change/worker/{sys_id} example shows output provided using the ID provided in the worker.link detail. The results list open time spans available for the task duration.
Example: cURL request
Results include worker.link details you can use to run the provided sys_id in the GET /sn_chg_rest/change/worker/ endpoint.
Change Management - GET /sn_chg_rest/change
Retrieves one or more change requests based on the specified criteria.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change
Default URL: /api/sn_chg_rest/change
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Request completed successfully. |
401 | Unauthorized. The user credentials are incorrect or haven't been passed. |
500 | Internal Server Error. A logic error on the server-side code occurred. |
Response body parameters (JSON or XML)
Example: cURL request
For brevity, the results only contain a single change request record.
Change Management - GET /sn_chg_rest/change/{change_sys_id}/nextstates
Retrieves a list of available states for the specified change request, including the current state.
If available, it also provides how to transition to the next state based on the version of the implemented Change Management. If the changes are change model driven, the endpoint returns conditions which have passed or not. It also provides information on whether all conditions have passed for a given transition. This information is not available for type driven and legacy change requests.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{change_sys_id}/nextstates
Default URL: /api/sn_chg_rest/change/{change_sys_id}/nextstates
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
change_sys_id | Sys_id of the change request. Located in the Change Request [change_request]
table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
404 | Not found. The requested item wasn't found. |
Response body parameters (JSON or XML)
Example: cURL request
The following code example shows how to call this endpoint.
Return results:
Change Management - GET /sn_chg_rest/change/{change_sys_id}/schedule
Enables retrieving the available time slots for a change request.
Role required: sn_change_writer.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{change_sys_id}/schedule
Default URL: /api/sn_chg_rest/change/{change_sys_id}/schedule
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
change_sys_id | Sys_id of the change request on which to find the next available time slot.
Located in the [change_request] table. The selected change request must have a configuration item (cmdb_ci) with planned start and planned end times. |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
202 | System accepted the request. |
400 | Bad Request. A bad request
type or malformed request was detected.
Possible issues:
|
404 | Not Found. The specified record could not be found.
Possible issues:
|
Response body parameters (JSON or XML)
Get available time slots
Use the value provided in the worker.link to get schedule window details. The value is in the following format:
https://instance.service-now.com/api/sn_chg_rest/change/worker/<worker_sys_id>
Use the worker_sys_id in GET /sn_chg_rest/change/worker/{worker_sys_id} to view results.
The response body contains the status and provides results when processing is complete.
- If the provided time slot is available for the change request within the schedule time slot, the worker API lists the available time slots in the payload.spans property. The payload.spans property is not listed in the results otherwise.
- If there are no time slots available for change
request duration provided within the defined scheduling time slot, the
messages.infoMessages states the following:
D
Note: The change request scheduling time slot default value is 90 days. To change this value, modify the change.conflict.next_available.schedule_window property. For more information, see Configure conflict analysis properties.
The following GET /sn_chg_rest/change/worker/{sys_id} example shows output provided using the ID provided in the worker.link detail. The results list open time spans available for the task duration.
Example: cURL request
Results include worker.link details you can use to run the provided sys_id in the GET /sn_chg_rest/change/worker/ endpoint.
Change Management - GET /sn_chg_rest/change/{change_sys_id}/task
Retrieves one or more tasks associated with a specified change request based on the specified criteria.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{change_sys_id}/task
Default URL: /api/sn_chg_rest/change/{change_sys_id}/task
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
change_sys_id | Sys_id of the change request whose tasks are to be retrieved. Located in the
Change Request [change_request] table. Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/{sys_id}
Retrieves the change request identified by the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}
Default URL: /api/sn_chg_rest/change/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request record to retrieve from Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/{sys_id}/ci
Retrieves multiple configuration items (CIs) associated to a specified change request based on the specified association type.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}/ci
Default URL: /api/sn_chg_rest/change/{sys_id}/ci
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request for which to return the associated CMDB
CIs. Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/{sys_id}/conflict
Retrieves the status of the currently running change request conflict checking process or the results of the last completed conflict checking process for the specified change request.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}/conflict
Default URL: /api/sn_chg_rest/change/{sys_id}/conflict
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request for which to return the status of the
running/completed conflict checking process. Located in the Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Successful response - no conflicts
Example: cURL request
Successful response - with conflicts
Change Management - GET /sn_chg_rest/change/emergency
Retrieves one or more emergency change requests based on the specified criteria.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/emergency
Default URL: /api/sn_chg_rest/change/emergency
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Request completed successfully. |
401 | Unauthorized. The user credentials are incorrect or haven't been passed. |
500 | Internal Server Error. A logic error on the server-side code occurred. |
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/emergency/{sys_id}
Retrieves the emergency change request identified by the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/emergency/{sys_id}
Default URL: /api/sn_chg_rest/change/emergency/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the emergency change request to retrieve from the Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/model
Retrieves one or more change models based on the specified criteria.
Use this endpoint to find a change model that best fits the change request that you are trying to create. For additional information, see Change Models.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/model
Default URL: /api/sn_chg_rest/change/model
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Request completed successfully. |
401 | Unauthorized. The user credentials are incorrect or haven't been passed. |
500 | Internal Server Error. A logic error on the server-side code occurred. |
Response body parameters (JSON or XML)
Example: cURL request
This example shows a request for obtaining all change model records.
For brevity, this response only shows a single change model object.
Change Management - GET /sn_chg_rest/change/model/{sys_id}
Retrieves the change model identified by the specified sys_id.
You can then use this change model to create the desired change request. For additional information on change models, see Change Models.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/model/{sys_id}
Default URL: /api/sn_chg_rest/change/model/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change model record to retrieve from the Change Model [chg_model]
table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/normal
Retrieves one or more normal change requests based on the specified criteria.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/normal
Default URL: /api/sn_chg_rest/change/normal
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Request completed successfully. |
401 | Unauthorized. The user credentials are incorrect or haven't been passed. |
500 | Internal Server Error. A logic error on the server-side code occurred. |
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/normal/{sys_id}
Retrieves the normal change request identified by the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/normal/{sys_id}
Default URL: /api/sn_chg_rest/change/normal/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the normal change request to retrieve from Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/standard
Retrieves one or more standard change requests based on the specified criteria.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/standard
Default URL: /api/sn_chg_rest/change/standard
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
401 | Unauthorized. The user credentials are incorrect or haven't been passed. |
500 | Internal Server Error. A logic error on the server-side code occurred. |
Response body parameters (JSON or XML)
Example: Sample cURL request
Change Management - GET /sn_chg_rest/change/standard/{sys_id}
Retrieves the standard change request identified by the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/standard/{sys_id}
Default URL: /api/sn_chg_rest/change/standard/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the standard change request to retrieve from the Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/standard/template
Retrieves one or more standard change templates based on the specified criteria.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/standard/template
Default URL: /api/sn_chg_rest/change/standard/template
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Request completed successfully. |
401 | Unauthorized. The user credentials are incorrect or haven't been passed. |
500 | Internal Server Error. A logic error on the server-side code occurred. |
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/standard/template/{sys_id}
Retrieves the standard change template identified by the specified sys_id.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/standard/template/{sys_id}
Default URL: /api/sn_chg_rest/change/standard/template/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the standard change template to retrieve from the
[std_change_record_producer] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - GET /sn_chg_rest/change/worker/{sys_id}
Retrieves the current status, information, and errors for the specified asynchronous worker.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/worker/{sys_id}
Default URL: /api/sn_chg_rest/{change/worker/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change management asynchronous worker. Located in the Change
Management Worker [chg_mgt_worker] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - PATCH /sn_chg_rest/change/{sys_id}
Updates the change request identified by the specified sys_id with the key-value pairs in the request body or URL.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}
Default URL: /api/sn_chg_rest/change/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request to modify. Located in the Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
name-value pairs | Name-value pairs representing the fields to update. Request body parameters override URL
parameters. However, required parameters must be specified in the URL.
Data type: String |
encrypted_fields | List of comma-separated fields to encrypt. These fields are encrypted before they are stored in the associated record. When specified, the endpoint calls the GlideRecord
setDisplayValue() method, instead of calling the setValue() method. Because of this, you can also use this parameter to pass display values for non-encrypted fields, such as reference or choice fields, instead of passing sys_ids or values. Data type: String |
Name | Description |
---|---|
data | Name-value pairs
representing the field(s) to update in the associated change request. For example, to update
the short description file, enter a name-value pair similar to the following: --data
"{\"short_description\": \"my short desc\" }" \ .
Data type: String |
encrypted_fields | List of comma-separated fields to encrypt. These fields are encrypted before they are stored in the associated record. When specified, the endpoint calls the GlideRecord
setDisplayValue() method, instead of calling the setValue() method. Because of this, you can also use this parameter to pass display values for non-encrypted fields, such as reference or choice fields, instead of passing sys_ids or values. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Name | Description |
---|---|
result | Updated change request record. Each element in this object corresponds to a
field in the record in the Change Request [change_request] table. All elements contain value and display_value name-value pairs. Some contain display_value_internal name-value pairs. Data type: Object |
Example: cURL request
Example: cURL request
The following example shows how to pass encrypted fields in the request body.
Example: cURL request
The following example shows how to pass encrypted fields as query parameters.
Change Management - PATCH /sn_chg_rest/change/{sys_id}/approvals
Allows the current user to approve or reject a change request approval record for the specified change request.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}/approvals
Default URL: /api/sn_chg_rest/change/{sys_id}/approvals
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request for which the approval/rejection applies. Located
in the Change Request [change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
comments | Required if state is rejected . Reason
that the change was rejected.Data type: String |
state | Required. Approval state. For example: Valid values:
Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - PATCH /sn_chg_rest/change/{change_sys_id}/schedule/first_available
Updates the planned start and end times of a change request using the first available time slot found.
Role required: sn_change_writer.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{change_sys_id}/schedule/first_available
Default URL: /api/sn_chg_rest/change/{change_sys_id}/schedule/first_available
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
change_sys_id | Sys_id of the change request on which to update with the next available time slot. Located in the Change Requests [change_request] table. The selected change request must have a configuration item (cmdb_ci). |
Name | Description |
---|---|
None |
Name | Description |
---|---|
duration_in_seconds | Duration of change in seconds, that is, how much time is required to complete
the change request task. Data type: Integer |
planned_start_time | Optional. Date and time that the change request is planned to start implementation in UTC. Retrieve the available time slot start at or later than this time. If not provided, the system uses the current time as the start time. Time format: yyyy-mm-dd hh:mm:ss Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Get change request schedule status
Use the value provided in the worker.link to determine if the change record has been successfully scheduled for the first available time slot. The value is in the following format:
https://instance.service-now.com/api/sn_chg_rest/change/worker/<worker_sys_id>
Use the worker.link details to run the provided sys_id in GET /sn_chg_rest/change/worker/{sys_id} to view results.
The response body contains the status and provides results when processing is complete.
If an available time slot is found, the system updates the change request with the first available slot. When the state is complete, the messages.infoMessages reveals that the first available time slot has been set.
Change has been updated
– Change requested has been updated for time slot.No slots found for <number> days from now
– No time slots available for change request duration provided within the number of days defined in the schedule window.Note: The change request scheduling time slot default value is 90 days. To change this value, modify the change.conflict.next_available.schedule_window property. For more information, see Configure conflict analysis properties.
The following GET /sn_chg_rest/change/worker/{sys_id} example shows output provided using the ID provided in the worker.link detail. The results indicate that processing is complete and the change request has been updated with the first available time slot.
Example: cURL request
Results include worker.link details you can use to run the provided sys_id in the GET /sn_chg_rest/change/worker/ endpoint.
Change Management - PATCH /sn_chg_rest/change/{change_sys_id}/task/{task_sys_id}
Updates the change request task identified by the specified sys_ids with the key-value pairs in the request body or the URL.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{change_sys_id}/task/{task_sys_id}
Default URL: /api/sn_chg_rest/change/{change_sys_id}/task/{task_sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
change_sys_id | Sys_id of the change request to which the task is associated. Verifies whether
the specified task is associated with the specified change request. Located in the
Change Request [change_request] table. Data type: String |
task_sys_id | Sys_id of the task to modify. Located in the Change Task [change_task]
table. Data type: String |
Name | Description |
---|---|
key-value pairs | Name-value pairs representing the fields to update. Request body parameters override URL
parameters. However, required parameters must be specified in the URL.
Data type: String |
Name | Description |
---|---|
data | Name-value pairs
representing the field(s) to update in the associated change request. For example, to update
the short description file, enter a name-value pair similar to the following: --data
"{\"short_description\": \"my short desc\" }" \ .
Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - PATCH /sn_chg_rest/change/emergency/{sys_id}
Updates the emergency change request identified by the specified sys_id with the key-value pairs in the request body or the URL.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/emergency/{sys_id}
Default URL: /api/sn_chg_rest/change/emergency/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request to modify. Located in the [change_request]
table. Data type: String |
Name | Description |
---|---|
name-value pairs | Name-value pairs representing the fields to update. Request body parameters override URL
parameters. However, required parameters must be specified in the URL.
Data type: String |
Name | Description |
---|---|
data | Name-value pairs
representing the field(s) to update in the associated change request. For example, to update
the short description file, enter a name-value pair similar to the following: --data
"{\"short_description\": \"my short desc\" }" \ .
Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - PATCH /sn_chg_rest/change/normal/{sys_id}
Updates the normal change request identified by the specified sys_id with the parameters in the request body or the URL.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/normal/{sys_id}
Default URL: /api/sn_chg_rest/change/normal/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request to modify. Located in the [change_request]
table. Data type: String |
Name | Description |
---|---|
name-value pairs | Name-value pairs representing the fields to update. Request body parameters override URL
parameters. However, required parameters must be specified in the URL.
Data type: String |
Name | Description |
---|---|
data | Name-value pairs
representing the field(s) to update in the associated change request. For example, to update
the short description file, enter a name-value pair similar to the following: --data
"{\"short_description\": \"my short desc\" }" \ .
Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - PATCH /sn_chg_rest/change/standard/{sys_id}
Updates the standard change request identified by the specified sys_id with the parameters in the request body or in the URL.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/standard/{sys_id}
Default URL: /api/sn_chg_rest/change/standard/{sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request to modify. Located in the [change_request]
table. Data type: String |
Name | Description |
---|---|
name-value pairs | Name-value pairs representing the fields to update. Request body parameters override URL
parameters. However, required parameters must be specified in the URL.
Data type: String |
Name | Description |
---|---|
data | Name-value pairs
representing the field(s) to update in the associated change request. For example, to update
the short description file, enter a name-value pair similar to the following: --data
"{\"short_description\": \"my short desc\" }" \ .
Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - PATCH /sn_chg_rest/change/standard/{sys_id}/risk
Calculates the risk and impact of the specified standard change based on an evaluation of the risk conditions.
If the Change Risk Assessment plugin is installed, it also calculates the cumulative highest risk once the risk assessment is complete.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}/risk
Default URL: /api/sn_chg_rest/change/{sys_id}/risk
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the standard change to evaluate. Located in the Change Request
[change_request] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - POST /sn_chg_rest/change
Creates a change request record based on the change request. Creating multiple change requests within a single call isn’t supported.
You can obtain the list of available change models using the Change Management - GET /sn_chg_rest/change/model or Change Management - GET /sn_chg_rest/change/model/{sys_id} endpoints.
When creating a change request, set the change model (chg_model) or type. If both chg_modeland type are set, the type is simply a categorization of the change. Not providing at least one of these values results in a default setting that is subject to change by release. It is strongly advised to set at least one of these values.
Values can be set either as a query parameter or request body parameter.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change
Default URL: /api/sn_chg_rest/change
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Name | Description |
---|---|
result | New change request record. The elements of this object correspond to the record
format in the Change Request [change_request] table. All values that
are not specified in the request are set to their defaults or are
empty/null. Data type: Object |
Example: cURL request
The following example shows how to create a change request record based on the Standard change model and Standard type. In this example, the Change Request is driven by the model and the type field is only used as a categorization.
Results show that the record was successfully added to the Change Request [change_request] table with the value CHG0030022.
Example: cURL request
The following example shows how to pass encrypted fields in the request body.
Example: cURL request
The following example shows how to pass encrypted fields as query parameters.
Change Management - POST /sn_chg_rest/change/{sys_id}/ci
Creates the association between a change request and Configuration Management Database (CMDB) configuration items (CI).
The creation of the association is done asynchronously, which means that a response is provided immediately and contains details for the worker. The worker does the actual work after the response.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}/ci
Default URL: /api/sn_chg_rest/change/{sys_id}/ci
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request to associate with the CMDB CI. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
association_type | Required. Type of association between the CMDB CI and the change request.
Valid values:
Data type: String |
cmdb_ci_sys_ids | Required. List of CMDB CI sys_ids to associate to the change request. Data type: Array or comma-separated string |
refresh_impacted_services | Flag used when association_type=affected to populate impacted
services based on the list of affected CIs.Valid values:
Data type: Boolean Default: false |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - POST /sn_chg_rest/change/{sys_id}/conflict
Starts a change request conflict checking process for the specified change request (sys_id).
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}/conflict
Default URL: /api/sn_chg_rest/change/{sys_id}/conflict
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change management request for which to start the conflict
checking process. Located in the Change Request [change_request] table. For
additional information on the conflict checking process, see Conflict detection. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Name | Description |
---|---|
result | Sys_id of the change request conflict checking process. Data type: String |
Example: cURL request
Change Management - POST /sn_chg_rest/change/emergency
Creates one emergency change request based on the default emergency change request record. Multiple emergency change request creations within a single call is not supported.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/emergency
Default URL: /api/sn_chg_rest/change/emergency
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Name | Description |
---|---|
key-value pairs | Key-value pairs of fields to modify when creating the request. The key is the
field name within the template and the value is the information to populate in the
field. Fields that cannot be modified and are ignored if passed in:
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - POST /sn_chg_rest/change/normal
Creates one normal change request based on the default normal change request record. Multiple normal change request creations within a single call is not supported.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/normal
Default URL: /api/sn_chg_rest/change/normal
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
Name | Description |
---|---|
key-value pairs | Fields to modify when creating the request. The key is the field name within
the template and the value is the information to populate in the field. Fields
that cannot be modified and are ignored if passed in:
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - POST /sn_chg_rest/change/{sys_id}/refresh_impacted_services
Populates the impacted services/configuration items (CIs) related list based on the primary CI.
The primary CI appears on the change request form and affected CI related list.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{sys_id}/refresh_impacted_services
Default URL: /api/sn_chg_rest/change/{sys_id}/refresh_impacted_services
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
sys_id | Sys_id of the change request to use to refresh the impacted services. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Change Management - POST /sn_chg_rest/change/standard/{standard_change_template_id}
Creates one standard change request based on an existing standard change template as specified by the passed-in template sys_id. Multiple standard change request creations within a single call is not supported.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/standard/{standard_change_template_id}
Default URL: /api/sn_chg_rest/change/standard/{standard_change_template_id}
Supported request parameters
Parameter | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
standard_change_template_id | Sys_id of the standard change template on which to base the new standard change
request. Located in the Standard Change Template [std_change_record_producer]
table. Data type: String |
Parameter | Description |
---|---|
name-value pairs | Fields within the specified standard change template to modify when creating
the request. The key is the field name within the template and the value is the
information to populate in the field. Fields that cannot be modified and are
ignored if passed in:
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Response body
The API returns these JSON or XML elements in the response body.
Example: Sample cURL request
Change Management - POST /sn_chg_rest/change/{change_sys_id}/task
Creates one change request task based on the default change request task record and associates it with the specified change request. Multiple change request task creations within a single call is not supported.
URL format
Versioned URL: /api/sn_chg_rest/{api_version}/change/{change_sys_id}/task
Default URL: /api/sn_chg_rest/change/{change_sys_id}/task
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the
endpoint to access. For example, v1 or
v2. Only specify this value to use an endpoint version
other than the latest.
Data type: String |
change_sys_id | Sys_id of the change request to which to associate this task. Located in the
Change Request [change_request] table. Data type: String |
Name | Description |
---|---|
key-value pairs | Fields to modify when creating the request. The key is the field name within
the template and the value is the information to populate in the field. Fields
that cannot be modified and are ignored if passed in:
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
On this page
- Change Management - DELETE /sn_chg_rest/change/{change_sys_id}/task/{task_sys_id}
- Change Management - DELETE /sn_chg_rest/change/{sys_id}
- Change Management - DELETE /sn_chg_rest/change/{sys_id}/conflict
- Change Management - DELETE /sn_chg_rest/change/emergency/{sys_id}
- Change Management - DELETE /sn_chg_rest/change/normal/{sys_id}
- Change Management - DELETE /sn_chg_rest/change/standard/{sys_id}
- Change Management - GET /sn_chg_rest/change/ci/{cmdb_ci_sys_id}/schedule
- Change Management - GET /sn_chg_rest/change
- Change Management - GET /sn_chg_rest/change/{change_sys_id}/nextstates
- Change Management - GET /sn_chg_rest/change/{change_sys_id}/schedule
- Change Management - GET /sn_chg_rest/change/{change_sys_id}/task
- Change Management - GET /sn_chg_rest/change/{sys_id}
- Change Management - GET /sn_chg_rest/change/{sys_id}/ci
- Change Management - GET /sn_chg_rest/change/{sys_id}/conflict
- Change Management - GET /sn_chg_rest/change/emergency
- Change Management - GET /sn_chg_rest/change/emergency/{sys_id}
- Change Management - GET /sn_chg_rest/change/model
- Change Management - GET /sn_chg_rest/change/model/{sys_id}
- Change Management - GET /sn_chg_rest/change/normal
- Change Management - GET /sn_chg_rest/change/normal/{sys_id}
- Change Management - GET /sn_chg_rest/change/standard
- Change Management - GET /sn_chg_rest/change/standard/{sys_id}
- Change Management - GET /sn_chg_rest/change/standard/template
- Change Management - GET /sn_chg_rest/change/standard/template/{sys_id}
- Change Management - GET /sn_chg_rest/change/worker/{sys_id}
- Change Management - PATCH /sn_chg_rest/change/{sys_id}
- Change Management - PATCH /sn_chg_rest/change/{sys_id}/approvals
- Change Management - PATCH /sn_chg_rest/change/{change_sys_id}/schedule/first_available
- Change Management - PATCH /sn_chg_rest/change/{change_sys_id}/task/{task_sys_id}
- Change Management - PATCH /sn_chg_rest/change/emergency/{sys_id}
- Change Management - PATCH /sn_chg_rest/change/normal/{sys_id}
- Change Management - PATCH /sn_chg_rest/change/standard/{sys_id}
- Change Management - PATCH /sn_chg_rest/change/standard/{sys_id}/risk
- Change Management - POST /sn_chg_rest/change
- Change Management - POST /sn_chg_rest/change/{sys_id}/ci
- Change Management - POST /sn_chg_rest/change/{sys_id}/conflict
- Change Management - POST /sn_chg_rest/change/emergency
- Change Management - POST /sn_chg_rest/change/normal
- Change Management - POST /sn_chg_rest/change/{sys_id}/refresh_impacted_services
- Change Management - POST /sn_chg_rest/change/standard/{standard_change_template_id}
- Change Management - POST /sn_chg_rest/change/{change_sys_id}/task