---
sourceDocument: Yokohama API Reference
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/api-reference

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# Continuous Integration and Continuous Delivery (CICD) Update Set API

# Continuous Integration and Continuous Delivery (CICD) Update Set API {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 18 minutes to read

The CICD Update Set API provides methods to create, retrieve, preview, commit, and back-out an update set.
This API is associated with the actions you can perform on [system update sets](https://www.servicenow.com/docs/access?context=system-update-sets&version=yokohama&pubname=yokohama-application-development&ft:locale=en-US) and requires the sn_cicd.sys_ci_automation role and Continuous Integration and Continuous Delivery (CICD) REST API (com.glide.continuousdelivery) plugin to access it.

## CICD Update Set - POST /api/sn_cicd/update_set/retrieve {#ariaid-title2}

Retrieves an update set with a given sys_id and allows you to remove the existing retrieved update set from the instance.

### URL format

Versioned URL: /api/sn_cicd/{api_version}/update_set/retrieve

Default URL: /api/sn_cicd/update_set/retrieve  
Note:  
Available versions are specified in the [REST API Explorer](https://www.servicenow.com/docs/VV5d3pcHRv4pFxM~yEJQZA "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://www.servicenow.com/docs/cpRBis~pwSIJPZVsP8Hkxw "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#cicd-update-set-POST-retrieve__entry__2}{#cicd-update-set-POST-retrieve__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Table 1. Path parameters]

{#cicd-update-set-POST-retrieve__entry__6}

| Name | Description |
|-|-|
| update_set_id | Required. Sys_id of the update set on the source instance from where the update set was retrieved. Table: Update Sets \[sys_update_set\] Data type: String |
| update_source_id | Sys_id of the remote instance record. Table: Remote Instances \[sys_update_set_source\] Data type: String |
| update_source_instance_id | Instance ID of the remote instance. Table: Remote Instances \[sys_update_set_source\] Data type: String |
| auto_preview | Flag that indicates whether to automatically preview the update set after retrieval. Valid values: * true: Preview the update set upon retrieval. * false: Don't preview the update set upon retrieval. {#cicd-update-set-POST-retrieve__ul_flv_lfx_qdc} Data type: Boolean Default: false |
| cleanup_retrieved | Flag that indicates whether to remove the existing retrieved update set from the instance. Valid values: * true: Remove the update set. * false: Don't remove the update set {#cicd-update-set-POST-retrieve__ul_ysn_nfx_qdc} Data type: Boolean Default: false |
[Table 2. Query parameters]

{#cicd-update-set-POST-retrieve__entry__18}

| Name | Description |
|-|-|
| None |   |
[Table 3. Request body parameters (XML or JSON)]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd-update-set-POST-retrieve__table_tq1_qdy_qdc__entry__2}{#cicd-update-set-POST-retrieve__accept-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Table 4. Request headers]

{#cicd-update-set-POST-retrieve__table_tq1_qdy_qdc}

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd-update-set-POST-retrieve__entry__26}{#cicd-update-set-POST-retrieve__entry-200-status-code}{#cicd-update-set-POST-retrieve__entry-400-status-code}{#cicd-update-set-POST-retrieve__entry-401-status-code}{#cicd-update-set-POST-retrieve__entry-403-status-code}{#cicd-update-set-POST-retrieve__entry-404-status-code}{#cicd-update-set-POST-retrieve__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 5. Status codes]

### Response body parameters (JSON or XML)

{#cicd-update-set-POST-retrieve__table_lxy_pbx_qdc__entry__2}{#cicd-update-set-POST-retrieve__entry-error}{#cicd-update-set-POST-retrieve__entry-link}{#cicd-update-set-POST-retrieve__entry-links_progress}{#cicd-update-set-POST-retrieve__entry-progress_id}{#cicd-update-set-POST-retrieve__entry-progress_url}{#cicd-update-set-POST-retrieve__entry-percent_complete}{#cicd-update-set-POST-retrieve__entry-status}{#cicd-update-set-POST-retrieve__entry-status_detail}{#cicd-update-set-POST-retrieve__entry-status_label}{#cicd-update-set-POST-retrieve__entry-status_message}

| Name | Description |
|-|-|
| error | Error message with details about the error. Data type: String |
| links | Information about any links and sys_ids associated with the update set. Data type: Object "links": { "progress": {Object} } |
| links.progress | Progress information about the operation performed on the update set. Data type: Object "progress": { "id": "String", "url": "String" } |
| links.progress.id | Sys_id containing progress details for the operation. You can use this value when calling the endpoint [CI/CD - GET /sn_cicd/progress/{progress_id}](https://www.servicenow.com/docs/k8N5YufePYyF4MVZbJ7Dfg#cicd-GET-progress "Returns the current progress and status of the Continuous Integration and Continuous Delivery (CICD) function associated with a specified progress ID."). Data type: String |
| links.progress.url | URL to use to retrieve the progress details about the operation performed on the update set. Data type: String |
| percent_complete | Percentage of the request that is complete. Data type: Number |
| status | Number representing the execution state of the action performed on the update set. Corresponds with the status_label descriptor. Possible values: * 0: Pending * 1: Running * 2: Successful * 3: Failed * 4: Canceled Data type: String |
| status_detail | Detailed message about the execution status, if available. Corresponds to the detailed_message field in the Execution Tracker \[sys_execution_tracker\] table. Data type: String |
| status_label | Execution status of the update set action. Corresponds with the status number. Possible values: * Canceled * Failed * Pending * Running * Successful Data type: String |
| status_message | Additional description of the action's current state, if available. Data type: String |
[ ]

{#cicd-update-set-POST-retrieve__table_lxy_pbx_qdc}  

### cURL request

The following example retrieves a particular update set with a given sys_id and instance ID.

    curl 
    "https://instance.servicenow.com/api/sn_cicd/update_set/retrieve?update_set_id=2ce715950d619e10f87785462179bd67&update_source_id=e66613a49d011210f877036c70ae59f7" \
    --request POST \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body. Shows details about the update set's current status and execution progress.

    {
      "result": {
        "links": {
          "progress": {
            "id": "e2ea3eedc92dde10f877184664aecd90",
            "url": "https://instance.servicenow.com/api/sn_cicd/progress/e2ea3eedc92dde10f877184664aecd90"
          }
        },
        "status": "0",
        "status_label": "Pending",
        "status_message": "",
        "status_detail": "",
        "error": "",
        "percent_complete": 0
      }
    }   

## CICD Update Set - POST /api/sn_cicd/update_set/commitMultiple {#ariaid-title3}

Commits multiple update sets in a single request according to the order that they're provided.

### URL format

Versioned URL: /api/sn_cicd/{api_version}/update_set/commitMultiple

Default URL: /api/sn_cicd/update_set/commitMultiple  
Note:  
Available versions are specified in the [REST API Explorer](https://www.servicenow.com/docs/VV5d3pcHRv4pFxM~yEJQZA "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://www.servicenow.com/docs/cpRBis~pwSIJPZVsP8Hkxw "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#cicd-update-set-POST-commitMultiple__entry__2}{#cicd-update-set-POST-commitMultiple__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Table 6. Path parameters]

{#cicd-update-set-POST-commitMultiple__entry__6}

| Name | Description |
|-|-|
| remote_update_set_ids | Required. List of sys_ids associated with any update sets to commit. Sys_ids are committed in the order given in the request. Note: You can use the [CI/CD - GET /sn_cicd/progress/{progress_id}](https://www.servicenow.com/docs/k8N5YufePYyF4MVZbJ7Dfg#cicd-GET-progress "Returns the current progress and status of the Continuous Integration and Continuous Delivery (CICD) function associated with a specified progress ID.") endpoint to get the remote update set ID. Data type: String Table: Retrieved Update Sets \[sys_remote_update_set\] |
[Table 7. Query parameters]

{#cicd-update-set-POST-commitMultiple__entry__10}

| Name | Description |
|-|-|
| force_commit | Flag that indicates whether to force commit the update set. This feature is useful when some remote update sets specified in the input are already committed in an earlier operation. This feature also ensures the commit order is obeyed in the order the update sets are provided. Valid values: * true: Force commits the update set. * false: Doesn't force commit the update set. If the commit isn't forced, the commit fails if the commit order isn't obeyed. {#cicd-update-set-POST-commitMultiple__ul_uvd_hjk_12c} Data type: String Default: false |
[Table 8. Request body parameters (XML or JSON)]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd-update-set-POST-commitMultiple__entry__14}{#cicd-update-set-POST-commitMultiple__accept-RESTAPI}{#cicd-update-set-POST-commitMultiple__content_type-RESTAPI}

| 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 |
[Table 9. Request headers]

{#cicd-update-set-POST-commitMultiple__entry__20}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Table 10. Response headers]

### Status codes

{#cicd-update-set-POST-commitMultiple__table_s54_4bx_qdc__entry__2}{#cicd-update-set-POST-commitMultiple__entry-200-status-code}{#cicd-update-set-POST-commitMultiple__entry-400-status-code}{#cicd-update-set-POST-commitMultiple__entry-401-status-code}{#cicd-update-set-POST-commitMultiple__entry-403-status-code}{#cicd-update-set-POST-commitMultiple__entry-404-status-code}{#cicd-update-set-POST-commitMultiple__entry-409-status-code}{#cicd-update-set-POST-commitMultiple__entry-500-status-code}

| Name | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | The user credentials are incorrect. |
| 403 | Forbidden. The user isn't an admin or doesn't have the sn_cicd.sys_ci_automation role. |
| 404 | Not found. The requested item wasn't found. |
| 409 | Conflict. The requested item isn't unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. |
[Table 11. Status codes]

{#cicd-update-set-POST-commitMultiple__table_s54_4bx_qdc}

### Response body parameters (JSON or XML) {#cicd-update-set-POST-commitMultiple__section_kxy_pbx_qdc}

{#cicd-update-set-POST-commitMultiple__table_lxy_pbx_qdc__entry__2}{#cicd-update-set-POST-commitMultiple__entry-error}{#cicd-update-set-POST-commitMultiple__entry-link}{#cicd-update-set-POST-commitMultiple__entry-links_progress}{#cicd-update-set-POST-commitMultiple__entry-progress_id}{#cicd-update-set-POST-commitMultiple__entry-progress_url}{#cicd-update-set-POST-commitMultiple__entry-percent_complete}{#cicd-update-set-POST-commitMultiple__entry-status}{#cicd-update-set-POST-commitMultiple__entry-status_detail}{#cicd-update-set-POST-commitMultiple__entry-status_label}{#cicd-update-set-POST-commitMultiple__entry-status_message}

| Name | Description |
|-|-|
| error | Error message with details about the error. Data type: String |
| links | Information about any links and sys_ids associated with the update set. Data type: Object "links": { "progress": {Object} } |
| links.progress | Progress information about the operation performed on the update set. Data type: Object "progress": { "id": "String", "url": "String" } |
| links.progress.id | Sys_id containing progress details for the operation. You can use this value when calling the endpoint [CI/CD - GET /sn_cicd/progress/{progress_id}](https://www.servicenow.com/docs/k8N5YufePYyF4MVZbJ7Dfg#cicd-GET-progress "Returns the current progress and status of the Continuous Integration and Continuous Delivery (CICD) function associated with a specified progress ID."). Data type: String |
| links.progress.url | URL to use to retrieve the progress details about the operation performed on the update set. Data type: String |
| percent_complete | Percentage of the request that is complete. Data type: Number |
| status | Number representing the execution state of the action performed on the update set. Corresponds with the status_label descriptor. Possible values: * 0: Pending * 1: Running * 2: Successful * 3: Failed * 4: Canceled Data type: String |
| status_detail | Detailed message about the execution status, if available. Corresponds to the detailed_message field in the Execution Tracker \[sys_execution_tracker\] table. Data type: String |
| status_label | Execution status of the update set action. Corresponds with the status number. Possible values: * Canceled * Failed * Pending * Running * Successful Data type: String |
| status_message | Additional description of the action's current state, if available. Data type: String |
[ ]

{#cicd-update-set-POST-commitMultiple__table_lxy_pbx_qdc}  

### cURL request

The following example shows how to commit an update with a given sys_id.

    curl 
    "https://instance.servicenow.com/api/sn_cicd/update_set/commitMultiple?remote_update_set_ids=0a9f45ab9d415e10f877036c70ae5968%2Cc2e89999c9e19e10f877184664aecd40" \
    --request POST \
    --header "Accept:application/json" \
    --header "Content-Type:application/json" \
    --data "{\"force_commit\":\"true\"}" \
    --user 'username':'password'

Response body.

    {
      "result": {
        "links": {
          "progress": {
            "id": "3d174aa1c969de10f877184664aecdc0",
            "url": "https://instance.servicenow.com/api/sn_cicd/progress/3d174aa1c969de10f877184664aecdc0"
          }
        },
        "status": "0",
        "status_label": "Pending",
        "status_message": "",
        "status_detail": "",
        "error": "",
        "percent_complete": 0
      }
    }

## CICD Update Set - POST /api/sn_cicd/update_set/preview/{remote_update_set_id} {#ariaid-title4}

Previews an update set to check for any conflicts and retrieve progress information about the update set operation.
Note:  
If the update set you want to preview doesn't exist on the instance, you must first use the [CICD Update Set - POST /api/sn_cicd/update_set/retrieve](https://www.servicenow.com/docs/D3Q1CC2cmpOnmsyDlw4cdA#cicd-update-set-POST-retrieve "Retrieves an update set with a given sys_id and allows you to remove the existing retrieved update set from the instance.") endpoint to retrieve the update set or manually in the UI.

### URL format

Versioned URL: /api/sn_cicd/{api_version}/update_set/preview/{remote_update_set_id}

Default URL: /api/sn_cicd/update_set/preview/{remote_update_set_id}  
Note:  
Available versions are specified in the [REST API Explorer](https://www.servicenow.com/docs/VV5d3pcHRv4pFxM~yEJQZA "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://www.servicenow.com/docs/cpRBis~pwSIJPZVsP8Hkxw "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#cicd-update-set-POST-preview__entry__2}{#cicd-update-set-POST-preview__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| remote_update_set_id | Sys_id of the update set to preview. Table: Retrieved Update Sets \[sys_remote_update_set\] Data type: String |
[Table 12. Path parameters]

{#cicd-update-set-POST-preview__entry__8}

| Name | Description |
|-|-|
| None |   |
[Table 13. Query parameters]

{#cicd-update-set-POST-preview__entry__12}

| Name | Description |
|-|-|
| None |   |
[Table 14. Request body parameters (XML or JSON)]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd-update-set-POST-preview__table_rbg_n2y_qdc__entry__2}{#cicd-update-set-POST-preview__accept-RESTAPI}{#cicd-update-set-POST-preview__content_type-RESTAPI}

| 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 |
[Table 15. Request headers]

{#cicd-update-set-POST-preview__table_rbg_n2y_qdc} {#cicd-update-set-POST-preview__entry__22}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Table 16. Response headers]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd-update-set-POST-preview__entry__26}{#cicd-update-set-POST-preview__entry-200-status-code}{#cicd-update-set-POST-preview__entry-400-status-code}{#cicd-update-set-POST-preview__entry-401-status-code}{#cicd-update-set-POST-preview__entry-403-status-code}{#cicd-update-set-POST-preview__entry-404-status-code}{#cicd-update-set-POST-preview__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 17. Status codes]

### Response body parameters (JSON or XML)

{#cicd-update-set-POST-preview__table_lxy_pbx_qdc__entry__2}{#cicd-update-set-POST-preview__entry-error}{#cicd-update-set-POST-preview__entry-link}{#cicd-update-set-POST-preview__entry-links_progress}{#cicd-update-set-POST-preview__entry-progress_id}{#cicd-update-set-POST-preview__entry-progress_url}{#cicd-update-set-POST-preview__entry-percent_complete}{#cicd-update-set-POST-preview__entry-status}{#cicd-update-set-POST-preview__entry-status_detail}{#cicd-update-set-POST-preview__entry-status_label}{#cicd-update-set-POST-preview__entry-status_message}

| Name | Description |
|-|-|
| error | Error message with details about the error. Data type: String |
| links | Information about any links and sys_ids associated with the update set. Data type: Object "links": { "progress": {Object} } |
| links.progress | Progress information about the operation performed on the update set. Data type: Object "progress": { "id": "String", "url": "String" } |
| links.progress.id | Sys_id containing progress details for the operation. You can use this value when calling the endpoint [CI/CD - GET /sn_cicd/progress/{progress_id}](https://www.servicenow.com/docs/k8N5YufePYyF4MVZbJ7Dfg#cicd-GET-progress "Returns the current progress and status of the Continuous Integration and Continuous Delivery (CICD) function associated with a specified progress ID."). Data type: String |
| links.progress.url | URL to use to retrieve the progress details about the operation performed on the update set. Data type: String |
| percent_complete | Percentage of the request that is complete. Data type: Number |
| status | Number representing the execution state of the action performed on the update set. Corresponds with the status_label descriptor. Possible values: * 0: Pending * 1: Running * 2: Successful * 3: Failed * 4: Canceled Data type: String |
| status_detail | Detailed message about the execution status, if available. Corresponds to the detailed_message field in the Execution Tracker \[sys_execution_tracker\] table. Data type: String |
| status_label | Execution status of the update set action. Corresponds with the status number. Possible values: * Canceled * Failed * Pending * Running * Successful Data type: String |
| status_message | Additional description of the action's current state, if available. Data type: String |
[ ]

{#cicd-update-set-POST-preview__table_lxy_pbx_qdc}  

### cURL request

The following example shows how to preview a remote update set using a given ID.

    curl 
    curl "https://instance.servicenow.com/api/sn_cicd/update_set/preview/8f4608d39d89da10f877036c70ae5998" \
    --request POST \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
      "result": {
        "links": {
          "progress": {
            "id": "54e9c665c969de10f877184664aecd72",
            "url": "https://instance.servicenow.com/api/sn_cicd/progress/54e9c665c969de10f877184664aecd72"
          }
        },
        "status": "0",
        "status_label": "Pending",
        "status_message": "",
        "status_detail": "",
        "error": "",
        "percent_complete": 0
      }
    }

## CICD Update Set - POST /api/sn_cicd/update_set/back_out {#ariaid-title5}

Backs out an installation operation that was performed on an update set with a given sys_id.
For more information about how the back out operation affects an update set, see [Back out an update set](https://www.servicenow.com/docs/access?context=t_BackOutUpdateSet&version=yokohama&pubname=yokohama-application-development&ft:locale=en-US).

### URL format

Versioned URL: /api/sn_cicd/{api_version}/update_set/back_out

Default URL: /api/sn_cicd/update_set/back_out  
Note:  
Available versions are specified in the [REST API Explorer](https://www.servicenow.com/docs/VV5d3pcHRv4pFxM~yEJQZA "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://www.servicenow.com/docs/cpRBis~pwSIJPZVsP8Hkxw "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#cicd_update_set-POST-back_out__entry__2}{#cicd_update_set-POST-back_out__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Table 18. Path parameters]

{#cicd_update_set-POST-back_out__entry__6}

| Name | Description |
|-|-|
| rollback_installs | Flag that indicates whether to rollback the batch installation performed during the update set commit. Possible values: * true: Rollback the installation. * false: Don't rollback the installation. {#cicd_update_set-POST-back_out__ul_ypf_zdw_qdc} Data type: Boolean Default: true |
| update_set_id | Required. Sys_id of the update set. Table: Update Sets \[sys_update_set\] Data type: String |
[Table 19. Query parameters]

{#cicd_update_set-POST-back_out__entry__12}

| Name | Description |
|-|-|
| None |   |
[Table 20. Request body parameters (XML or JSON)]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd_update_set-POST-back_out__entry__16}{#cicd_update_set-POST-back_out__accept-RESTAPI}{#cicd_update_set-POST-back_out__content_type-RESTAPI}

| 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 |
[Table 21. Request headers]

{#cicd_update_set-POST-back_out__entry__22}{#cicd_update_set-POST-back_out__d2893e144}

| Header | Description |
|-|-|
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Table 22. Response headers]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd_update_set-POST-back_out__entry__26}{#cicd_update_set-POST-back_out__entry-200-status-code}{#cicd_update_set-POST-back_out__entry-400-status-code}{#cicd_update_set-POST-back_out__entry-401-status-code}{#cicd_update_set-POST-back_out__entry-403-status-code}{#cicd_update_set-POST-back_out__entry-404-status-code}{#cicd_update_set-POST-back_out__entry-405-status-code}{#cicd_update_set-POST-back_out__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | The user credentials are incorrect. |
| 403 | Forbidden. The user isn't an admin or doesn't have the sn_cicd.sys_ci_automation role. |
| 404 | Not found. The requested item wasn't found. |
| 405 | Invalid method. The functionality is inactive. |
| 500 | Internal server error. An unexpected error occurred while processing the request. |
[Table 23. Status codes]

### Response body parameters (JSON or XML)

{#cicd_update_set-POST-back_out__entry__42}{#cicd_update_set-POST-back_out__entry-error}{#cicd_update_set-POST-back_out__entry-link}{#cicd_update_set-POST-back_out__entry-links_progress}{#cicd_update_set-POST-back_out__entry-progress_id}{#cicd_update_set-POST-back_out__entry-progress_url}{#cicd_update_set-POST-back_out__entry-percent_complete}{#cicd_update_set-POST-back_out__entry-status}{#cicd_update_set-POST-back_out__entry-status_detail}{#cicd_update_set-POST-back_out__entry-status_label}{#cicd_update_set-POST-back_out__entry-status_message}

| Name | Description |
|-|-|
| error | Error message with details about the error. Data type: String |
| links | Information about any links and sys_ids associated with the update set. Data type: Object "links": { "progress": {Object} } |
| links.progress | Progress information about the operation performed on the update set. Data type: Object "progress": { "id": "String", "url": "String" } |
| links.progress.id | Sys_id containing progress details for the operation. You can use this value when calling the endpoint [CI/CD - GET /sn_cicd/progress/{progress_id}](https://www.servicenow.com/docs/k8N5YufePYyF4MVZbJ7Dfg#cicd-GET-progress "Returns the current progress and status of the Continuous Integration and Continuous Delivery (CICD) function associated with a specified progress ID."). Data type: String |
| links.progress.url | URL to use to retrieve the progress details about the operation performed on the update set. Data type: String |
| percent_complete | Percentage of the request that is complete. Data type: Number |
| status | Number representing the execution state of the action performed on the update set. Corresponds with the status_label descriptor. Possible values: * 0: Pending * 1: Running * 2: Successful * 3: Failed * 4: Canceled Data type: String |
| status_detail | Detailed message about the execution status, if available. Corresponds to the detailed_message field in the Execution Tracker \[sys_execution_tracker\] table. Data type: String |
| status_label | Execution status of the update set action. Corresponds with the status number. Possible values: * Canceled * Failed * Pending * Running * Successful Data type: String |
| status_message | Additional description of the action's current state, if available. Data type: String |
[ ]

### cURL request

The following example shows how to roll back an installation operation on a specific update sys_id.

    curl 
    "https://instance.servicenow.com/api/sn_cicd/update_set/back_out?update_set_id=73dd24e39dcd1e10f877036c70ae59ae&rollback_installs=false" \
    --request POST \
    --header "Accept:application/json" \
    --user 'username':'password'

Response:

    {
      "result": {
        "links": {
          "progress": {
            "id": "036bf811c9619e10f877184664aecdcb",
            "url": "https://instance.servicenow.com/api/sn_cicd/progress/036bf811c9619e10f877184664aecdcb"
          }
        },
        "status": "0",
        "status_label": "Pending",
        "status_message": "",
        "status_detail": "",
        "error": "",
        "percent_complete": 0
      }
    } 

## CICD Update Set - POST /api/sn_cicd/update_set/commit/{remote_update_set_id} {#ariaid-title6}

Commits an update set with a given sys_id.
When you have previewed an update set and have resolved any issues, you can commit the update set using this endpoint. Committing an update set applies all changes to the instance and creates a local copy of the update set that
contains an update record for every change. For more information about committing an update set, see [Commit an update set](https://www.servicenow.com/docs/access?context=t_CommitAnUpdateSet&version=yokohama&pubname=yokohama-application-development&ft:locale=en-US).

### URL format

Versioned URL: /api/sn_cicd/{api_version}/update_set/commit/{remote_update_set_id}

Default URL: /api/sn_cicd/update_set/ commit/{remote_update_set_id}  
Note:  
Available versions are specified in the [REST API Explorer](https://www.servicenow.com/docs/VV5d3pcHRv4pFxM~yEJQZA "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://www.servicenow.com/docs/cpRBis~pwSIJPZVsP8Hkxw "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#cicd_update_set-POST-commit__entry__2}{#cicd_update_set-POST-commit__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| remote_update_set_id | Sys_id of the update set to commit. Note: You can use the [CI/CD - GET /sn_cicd/progress/{progress_id}](https://www.servicenow.com/docs/k8N5YufePYyF4MVZbJ7Dfg#cicd-GET-progress "Returns the current progress and status of the Continuous Integration and Continuous Delivery (CICD) function associated with a specified progress ID.") endpoint to get the remote update set ID. Table: Retrieved Update Sets \[sys_remote_update_set\] Data type: String |
[Table 24. Path parameters]

{#cicd_update_set-POST-commit__entry__8}

| Name | Description |
|-|-|
| None |   |
[Table 25. Query parameters]

{#cicd_update_set-POST-commit__entry__12}

| Name | Description |
|-|-|
| force_commit | Flag that indicates whether to force commit the update set. Valid values: * true: Force commits the update set even if you haven't yet previewed it to check for conflicts. * false: Doesn't force commit the update set. You must preview the update set before proceeding with the commit. {#cicd_update_set-POST-commit__ul_sc4_y3k_12c} Data type: String Default: false |
[Table 26. Request body parameters (XML or JSON)]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd_update_set-POST-commit__entry__16}{#cicd_update_set-POST-commit__accept-RESTAPI}{#cicd_update_set-POST-commit__content_type-RESTAPI}

| 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 |
[Table 27. Request headers]

{#cicd_update_set-POST-commit__entry__22}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Table 28. Response headers]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd_update_set-POST-commit__entry__26}{#cicd_update_set-POST-commit__entry-200-status-code}{#cicd_update_set-POST-commit__entry-400-status-code}{#cicd_update_set-POST-commit__entry-401-status-code}{#cicd_update_set-POST-commit__entry-403-status-code}{#cicd_update_set-POST-commit__entry-404-status-code}{#cicd_update_set-POST-commit__entry-409-status-code}{#cicd_update_set-POST-commit__entry-500-status-code}

| Name | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 401 | The user credentials are incorrect. |
| 403 | Forbidden. The user doesn't have access rights to the specified record. |
| 404 | Not found. The requested item wasn't found. |
| 409 | Conflict. The requested item isn't unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. |
[Table 29. Status codes]

### Response body parameters (JSON or XML)

{#cicd_update_set-POST-commit__entry__42}{#cicd_update_set-POST-commit__entry-error}{#cicd_update_set-POST-commit__entry-link}{#cicd_update_set-POST-commit__entry-links_progress}{#cicd_update_set-POST-commit__entry-progress_id}{#cicd_update_set-POST-commit__entry-progress_url}{#cicd_update_set-POST-commit__entry-percent_complete}{#cicd_update_set-POST-commit__entry-status}{#cicd_update_set-POST-commit__entry-status_detail}{#cicd_update_set-POST-commit__entry-status_label}{#cicd_update_set-POST-commit__entry-status_message}

| Name | Description |
|-|-|
| error | Error message with details about the error. Data type: String |
| links | Information about any links and sys_ids associated with the update set. Data type: Object "links": { "progress": {Object} } |
| links.progress | Progress information about the operation performed on the update set. Data type: Object "progress": { "id": "String", "url": "String" } |
| links.progress.id | Sys_id containing progress details for the operation. You can use this value when calling the endpoint [CI/CD - GET /sn_cicd/progress/{progress_id}](https://www.servicenow.com/docs/k8N5YufePYyF4MVZbJ7Dfg#cicd-GET-progress "Returns the current progress and status of the Continuous Integration and Continuous Delivery (CICD) function associated with a specified progress ID."). Data type: String |
| links.progress.url | URL to use to retrieve the progress details about the operation performed on the update set. Data type: String |
| percent_complete | Percentage of the request that is complete. Data type: Number |
| status | Number representing the execution state of the action performed on the update set. Corresponds with the status_label descriptor. Possible values: * 0: Pending * 1: Running * 2: Successful * 3: Failed * 4: Canceled Data type: String |
| status_detail | Detailed message about the execution status, if available. Corresponds to the detailed_message field in the Execution Tracker \[sys_execution_tracker\] table. Data type: String |
| status_label | Execution status of the update set action. Corresponds with the status number. Possible values: * Canceled * Failed * Pending * Running * Successful Data type: String |
| status_message | Additional description of the action's current state, if available. Data type: String |
[ ]

### cURL request

The following example commits the update set with the associated sys_id.

    curl 
    "https://instance.servicenow.com/api/sn_cicd/update_set/commit/4ee89999c9e19e10f877184664aecd42" \
    --request POST \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
      "result": {
        "links": {
          "progress": {
            "id": "bf380a11c9e59e10f877184664aecd0e",
            "url": "https://instance.servicenow.com/api/sn_cicd/progress/bf380a11c9e59e10f877184664aecd0e"
          }
        },
        "status": "0",
        "status_label": "Pending",
        "status_message": "",
        "status_detail": "",
        "error": "",
        "percent_complete": 0
      }
    }

## CICD Update Set - POST /api/sn_cicd/update_set/create {#ariaid-title7}

Creates a new update set and inserts the new record in the Update Sets \[sys_update_set\] table.

### URL format

Versioned URL: /api/sn_cicd/{api_version}/update_set/create

Default URL: /api/sn_cicd/update_set/create  
Note:  
Available versions are specified in the [REST API Explorer](https://www.servicenow.com/docs/VV5d3pcHRv4pFxM~yEJQZA "In this tutorial you will use the REST API Explorer to test the ServiceNow REST APIs."). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://www.servicenow.com/docs/cpRBis~pwSIJPZVsP8Hkxw "The scripted REST API feature allows application developers to build custom web service APIs.").

### Supported request parameters

{#cicd_update_set-POST-create__entry__2}{#cicd_update_set-POST-create__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
[Table 30. Path parameters]

{#cicd_update_set-POST-create__entry__6}

| Name | Description |
|-|-|
| description | Description of the update set. Data type: String Default: null |
| scope | Required if the sys_id parameter is not passed. The scope name of the application in which to create the new update set. Table: Applications \[sys_scope\] Data type: String |
| sys_id | Required if the scope parameter is not passed. Sys_id of the application in which to create the new update set. Table: Applications \[sys_scope\] Data type: String |
| update_set_name | Required. Name to give the update set. Data type: String |
[Table 31. Query parameters]

{#cicd_update_set-POST-create__entry__16}

| Name | Description |
|-|-|
| None |   |
[Table 32. Request body parameters (XML or JSON)]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd_update_set-POST-create__entry__20}{#cicd_update_set-POST-create__accept-RESTAPI}{#cicd_update_set-POST-create__content_type-RESTAPI}

| 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 |
[Table 33. Request headers]

{#cicd_update_set-POST-create__entry__26}

| Header | Description |
|-|-|
| Content-Type | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
[Table 34. Response headers]

### 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](https://www.servicenow.com/docs/aXidvjgEVmS~V~ZL0h85lQ "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#cicd_update_set-POST-create__table_n5q_tn2_rdc__entry__2}{#cicd_update_set-POST-create__entry-403-status-code}{#cicd_update_set-POST-create__entry-409-status-code}{#cicd_update_set-POST-create__entry-500-status-code}

|   |   |
|-|-|
| 201 | The update set was created successfully. |
| 400 | Bad request. The update set name is null or empty, or both input sys_id and scope are null or empty. |
| 403 | Forbidden. The user isn't an admin or doesn't have the sn_cicd.sys_ci_automation role. |
| 409 | Conflict. The requested item isn't unique. |
| 500 | Internal server error. An unexpected error occurred while processing the request. |
[ ]

{#cicd_update_set-POST-create__table_n5q_tn2_rdc}

### Response body parameters (JSON or XML)

{#cicd_update_set-POST-create__entry__42}{#cicd_update_set-POST-create__entry-error}{#cicd_update_set-POST-create__entry-status}{#cicd_update_set-POST-create__entry-status_detail}{#cicd_update_set-POST-create__entry-status_label}{#cicd_update_set-POST-create__entry-status_message}

| Name | Description |
|-|-|
| error | Error message with details about the error. Data type: String |
| status | Number representing the execution state of the action performed on the update set. Corresponds with the status_label descriptor. Possible values: * 0: Pending * 1: Running * 2: Successful * 3: Failed * 4: Canceled Data type: String |
| status_detail | Detailed message about the execution status, if available. Corresponds to the detailed_message field in the Execution Tracker \[sys_execution_tracker\] table. Data type: String |
| status_label | Execution status of the update set action. Corresponds with the status number. Possible values: * Canceled * Failed * Pending * Running * Successful Data type: String |
| status_message | Additional description of the action's current state, if available. Data type: String |
| update_set_id | Sys_id of the created update set. Table: Update Sets \[sys_update_set\] Data type: String |
[ ]

### cURL request

The following example demonstrates how to create a new update set with the name `Testupdateset` and the scope set to `sn_test`.

    curl 
    "https://instance.servicenow.com/api/sn_cicd/update_set/create?update_set_name=Testupdateset&scope=sn_test" \
    --request POST \
    --header "Accept:application/json" \
    --user 'username':'password'

Response body.

    {
      "result": {
        "status": "2",
        "status_label": "",
        "status_message": "Successfully created update set: Test update set 1",
        "status_detail": "",
        "error": "",
        "update_set_id": "a9a485d1c9a19e10f877184664aecd11"
      }
    }


