{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":489,"path":"api-reference/rest-apis/cicd-update-set-api.md","title":"Continuous Integration and Continuous Delivery \\(CICD\\) Update Set API","bundle":null,"doc_type":null,"release":"australia","body":"\n# Continuous Integration and Continuous Delivery \\(CICD\\) Update Set API\n\nThe CICD Update Set API provides methods to create, retrieve, preview, commit, and back-out an update set.\n\nThis API is associated with the actions you can perform on [system update sets](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/system-update-sets.md) 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.\n\n**Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md)\n\n## CICD Update Set - POST /api/sn\\_cicd/update\\_set/retrieve\n\nRetrieves an update set with a given sys\\_id and allows you to remove the existing retrieved update set from the instance.\n\n### URL format\n\nVersioned URL: `/api/sn_cicd/{api_version}/update_set/retrieve`\n\nDefault URL: `/api/sn_cicd/update_set/retrieve`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. 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\n\n</td></tr></tbody>\n</table><table class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nupdate\\_set\\_id\n\n</td><td>\n\nRequired. Sys\\_id of the update set on the source instance from where the update set was retrieved.Table: Update Sets \\[sys\\_update\\_set\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nupdate\\_source\\_id\n\n</td><td>\n\nSys\\_id of the remote instance record.Table: Remote Instances \\[sys\\_update\\_set\\_source\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nupdate\\_source\\_instance\\_id\n\n</td><td>\n\nInstance ID of the remote instance.Table: Remote Instances \\[sys\\_update\\_set\\_source\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nauto\\_preview\n\n</td><td>\n\nFlag that indicates whether to automatically preview the update set after retrieval.Valid values:\n\n-   true: Preview the update set upon retrieval.\n-   false: Don't preview the update set upon retrieval.\n\nData type: Boolean\n\nDefault: false\n\n</td></tr><tr><td>\n\ncleanup\\_retrieved\n\n</td><td>\n\nFlag that indicates whether to remove the existing retrieved update set from the instance.Valid values:\n\n-   true: Remove the update set.\n-   false: Don't remove the update set\n\nData type: Boolean\n\nDefault: false\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table id=\"table_tq1_qdy_qdc\" class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>### Status codes\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or have not been passed.|\n|403|Forbidden. The user doesn't have access rights to the specified record.|\n|404|Not found. The requested item wasn't found.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table id=\"table_lxy_pbx_qdc\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nerror\n\n</td><td id=\"entry-error\">\n\nError message with details about the error.Data type: String\n\n</td></tr><tr><td>\n\nlinks\n\n</td><td id=\"entry-link\">\n\nInformation about any links and sys\\_ids associated with the update set.Data type: Object\n\n```\n\"links\": {\n  \"progress\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress\n\n</td><td id=\"entry-links_progress\">\n\nProgress information about the operation performed on the update set.Data type: Object\n\n```\n\"progress\": {\n  \"id\": \"String\",\n  \"url\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress.id\n\n</td><td id=\"entry-progress_id\">\n\nSys\\_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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cicd-api.md).Data type: String\n\n</td></tr><tr><td>\n\nlinks.progress.url\n\n</td><td id=\"entry-progress_url\">\n\nURL to use to retrieve the progress details about the operation performed on the update set.Data type: String\n\n</td></tr><tr><td>\n\npercent\\_complete\n\n</td><td id=\"entry-percent_complete\">\n\nPercentage of the request that is complete.Data type: Number\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td id=\"entry-status\">\n\nNumber representing the execution state of the action performed on the update set. Corresponds with the **status\\_label** descriptor.Possible values:\n\n-   0: Pending\n-   1: Running\n-   2: Successful\n-   3: Failed\n-   4: Canceled\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_detail\n\n</td><td id=\"entry-status_detail\">\n\nDetailed message about the execution status, if available. Corresponds to the detailed\\_message field in the Execution Tracker \\[sys\\_execution\\_tracker\\] table.Data type: String\n\n</td></tr><tr><td>\n\nstatus\\_label\n\n</td><td id=\"entry-status_label\">\n\nExecution status of the update set action. Corresponds with the **status** number.Possible values:\n\n-   Canceled\n-   Failed\n-   Pending\n-   Running\n-   Successful\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_message\n\n</td><td id=\"entry-status_message\">\n\nAdditional description of the action's current state, if available.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example retrieves a particular update set with a given sys\\_id and instance ID.\n\n```\ncurl \n\"https://instance.servicenow.com/api/sn_cicd/update_set/retrieve?update_set_id=2ce715950d619e10f87785462179bd67&update_source_id=e66613a49d011210f877036c70ae59f7\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n\n```\n\nResponse body. Shows details about the update set's current status and execution progress.\n\n```\n{\n  \"result\": {\n    \"links\": {\n      \"progress\": {\n        \"id\": \"e2ea3eedc92dde10f877184664aecd90\",\n        \"url\": \"https://instance.servicenow.com/api/sn_cicd/progress/e2ea3eedc92dde10f877184664aecd90\"\n      }\n    },\n    \"status\": \"0\",\n    \"status_label\": \"Pending\",\n    \"status_message\": \"\",\n    \"status_detail\": \"\",\n    \"error\": \"\",\n    \"percent_complete\": 0\n  }\n}   \n\n```\n\n## CICD Update Set - POST /api/sn\\_cicd/update\\_set/commitMultiple\n\nCommits multiple update sets in a single request according to the order that they're provided.\n\n### URL format\n\nVersioned URL: `/api/sn_cicd/{api_version}/update_set/commitMultiple`\n\nDefault URL: `/api/sn_cicd/update_set/commitMultiple`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. 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\n\n</td></tr></tbody>\n</table><table class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nremote\\_update\\_set\\_ids\n\n</td><td>\n\nRequired. 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cicd-api.md) endpoint to get the remote update set ID.\n\nData type: String\n\nTable: Retrieved Update Sets \\[sys\\_remote\\_update\\_set\\]\n\n</td></tr></tbody>\n</table><table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nforce\\_commit\n\n</td><td>\n\nFlag 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:\n\n-   true: Force commits the update set.\n-   false: Doesn't force commit the update set. If the commit isn't forced, the commit fails if the commit order isn't obeyed.\n\nData type: String\n\nDefault: false\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr><tr><td>\n\nContent-Type\n\n</td><td id=\"content_type-entry-RESTAPI\">\n\nData format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table><table class=\"rest_api_response_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nContent-Type\n\n</td><td>\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>### Status codes\n\n|Name|Description|\n|----|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|The user credentials are incorrect.|\n|403|Forbidden. The user isn’t an admin or doesn’t have the sn\\_cicd.sys\\_ci\\_automation role.|\n|404|Not found. The requested item wasn’t found.|\n|409|Conflict. The requested item isn’t unique.|\n|500|Internal server error. An unexpected error occurred while processing the request.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table id=\"table_lxy_pbx_qdc\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nerror\n\n</td><td id=\"entry-error\">\n\nError message with details about the error.Data type: String\n\n</td></tr><tr><td>\n\nlinks\n\n</td><td id=\"entry-link\">\n\nInformation about any links and sys\\_ids associated with the update set.Data type: Object\n\n```\n\"links\": {\n  \"progress\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress\n\n</td><td id=\"entry-links_progress\">\n\nProgress information about the operation performed on the update set.Data type: Object\n\n```\n\"progress\": {\n  \"id\": \"String\",\n  \"url\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress.id\n\n</td><td id=\"entry-progress_id\">\n\nSys\\_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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cicd-api.md).Data type: String\n\n</td></tr><tr><td>\n\nlinks.progress.url\n\n</td><td id=\"entry-progress_url\">\n\nURL to use to retrieve the progress details about the operation performed on the update set.Data type: String\n\n</td></tr><tr><td>\n\npercent\\_complete\n\n</td><td id=\"entry-percent_complete\">\n\nPercentage of the request that is complete.Data type: Number\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td id=\"entry-status\">\n\nNumber representing the execution state of the action performed on the update set. Corresponds with the **status\\_label** descriptor.Possible values:\n\n-   0: Pending\n-   1: Running\n-   2: Successful\n-   3: Failed\n-   4: Canceled\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_detail\n\n</td><td id=\"entry-status_detail\">\n\nDetailed message about the execution status, if available. Corresponds to the detailed\\_message field in the Execution Tracker \\[sys\\_execution\\_tracker\\] table.Data type: String\n\n</td></tr><tr><td>\n\nstatus\\_label\n\n</td><td id=\"entry-status_label\">\n\nExecution status of the update set action. Corresponds with the **status** number.Possible values:\n\n-   Canceled\n-   Failed\n-   Pending\n-   Running\n-   Successful\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_message\n\n</td><td id=\"entry-status_message\">\n\nAdditional description of the action's current state, if available.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to commit an update with a given sys\\_id.\n\n```\ncurl \n\"https://instance.servicenow.com/api/sn_cicd/update_set/commitMultiple?remote_update_set_ids=0a9f45ab9d415e10f877036c70ae5968%2Cc2e89999c9e19e10f877184664aecd40\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--header \"Content-Type:application/json\" \\\n--data \"{\\\"force_commit\\\":\\\"true\\\"}\" \\\n--user 'username':'password'\n\n```\n\nResponse body.\n\n```\n{\n  \"result\": {\n    \"links\": {\n      \"progress\": {\n        \"id\": \"3d174aa1c969de10f877184664aecdc0\",\n        \"url\": \"https://instance.servicenow.com/api/sn_cicd/progress/3d174aa1c969de10f877184664aecdc0\"\n      }\n    },\n    \"status\": \"0\",\n    \"status_label\": \"Pending\",\n    \"status_message\": \"\",\n    \"status_detail\": \"\",\n    \"error\": \"\",\n    \"percent_complete\": 0\n  }\n}\n```\n\n## CICD Update Set - POST /api/sn\\_cicd/update\\_set/preview/\\{remote\\_update\\_set\\_id\\}\n\nPreviews an update set to check for any conflicts and retrieve progress information about the update set operation.\n\n**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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cicd-update-set-api.md) endpoint to retrieve the update set or manually in the UI.\n\n### URL format\n\nVersioned URL: `/api/sn_cicd/{api_version}/update_set/preview/{remote_update_set_id}`\n\nDefault URL: `/api/sn_cicd/update_set/preview/{remote_update_set_id}`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. 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\n\n</td></tr><tr><td>\n\nremote\\_update\\_set\\_id\n\n</td><td>\n\nSys\\_id of the update set to preview.Table: Retrieved Update Sets \\[sys\\_remote\\_update\\_set\\]\n\nData type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table id=\"table_rbg_n2y_qdc\" class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr><tr><td>\n\nContent-Type\n\n</td><td id=\"content_type-entry-RESTAPI\">\n\nData format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table><table class=\"rest_api_response_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nContent-Type\n\n</td><td>\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>### Status codes\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|Unauthorized. The user credentials are incorrect or have not been passed.|\n|403|Forbidden. The user doesn't have access rights to the specified record.|\n|404|Not found. The requested item wasn't found.|\n|500|Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table id=\"table_lxy_pbx_qdc\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nerror\n\n</td><td id=\"entry-error\">\n\nError message with details about the error.Data type: String\n\n</td></tr><tr><td>\n\nlinks\n\n</td><td id=\"entry-link\">\n\nInformation about any links and sys\\_ids associated with the update set.Data type: Object\n\n```\n\"links\": {\n  \"progress\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress\n\n</td><td id=\"entry-links_progress\">\n\nProgress information about the operation performed on the update set.Data type: Object\n\n```\n\"progress\": {\n  \"id\": \"String\",\n  \"url\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress.id\n\n</td><td id=\"entry-progress_id\">\n\nSys\\_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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cicd-api.md).Data type: String\n\n</td></tr><tr><td>\n\nlinks.progress.url\n\n</td><td id=\"entry-progress_url\">\n\nURL to use to retrieve the progress details about the operation performed on the update set.Data type: String\n\n</td></tr><tr><td>\n\npercent\\_complete\n\n</td><td id=\"entry-percent_complete\">\n\nPercentage of the request that is complete.Data type: Number\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td id=\"entry-status\">\n\nNumber representing the execution state of the action performed on the update set. Corresponds with the **status\\_label** descriptor.Possible values:\n\n-   0: Pending\n-   1: Running\n-   2: Successful\n-   3: Failed\n-   4: Canceled\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_detail\n\n</td><td id=\"entry-status_detail\">\n\nDetailed message about the execution status, if available. Corresponds to the detailed\\_message field in the Execution Tracker \\[sys\\_execution\\_tracker\\] table.Data type: String\n\n</td></tr><tr><td>\n\nstatus\\_label\n\n</td><td id=\"entry-status_label\">\n\nExecution status of the update set action. Corresponds with the **status** number.Possible values:\n\n-   Canceled\n-   Failed\n-   Pending\n-   Running\n-   Successful\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_message\n\n</td><td id=\"entry-status_message\">\n\nAdditional description of the action's current state, if available.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to preview a remote update set using a given ID.\n\n```\ncurl \ncurl \"https://instance.servicenow.com/api/sn_cicd/update_set/preview/8f4608d39d89da10f877036c70ae5998\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nResponse body.\n\n```\n{\n  \"result\": {\n    \"links\": {\n      \"progress\": {\n        \"id\": \"54e9c665c969de10f877184664aecd72\",\n        \"url\": \"https://instance.servicenow.com/api/sn_cicd/progress/54e9c665c969de10f877184664aecd72\"\n      }\n    },\n    \"status\": \"0\",\n    \"status_label\": \"Pending\",\n    \"status_message\": \"\",\n    \"status_detail\": \"\",\n    \"error\": \"\",\n    \"percent_complete\": 0\n  }\n}\n```\n\n## CICD Update Set - POST /api/sn\\_cicd/update\\_set/back\\_out\n\nBacks out an installation operation that was performed on an update set with a given sys\\_id.\n\nFor more information about how the back out operation affects an update set, see [Back out an update set](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/t_BackOutUpdateSet.md).\n\n### URL format\n\nVersioned URL: `/api/sn_cicd/{api_version}/update_set/back_out`\n\nDefault URL: `/api/sn_cicd/update_set/back_out`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. 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\n\n</td></tr></tbody>\n</table><table class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nrollback\\_installs\n\n</td><td>\n\nFlag that indicates whether to rollback the batch installation performed during the update set commit.Possible values:\n\n-   true: Rollback the installation.\n-   false: Don't rollback the installation.\n\nData type: Boolean\n\nDefault: true\n\n</td></tr><tr><td>\n\nupdate\\_set\\_id\n\n</td><td>\n\nRequired. Sys\\_id of the update set. Table: Update Sets \\[sys\\_update\\_set\\]\n\nData type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr><tr><td>\n\nContent-Type\n\n</td><td id=\"content_type-entry-RESTAPI\">\n\nData format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table><table class=\"rest_api_response_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nContent-Type\n\n</td><td id=\"d2936e172\">\n\nData format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>### Status codes\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Status code|Description|\n|-----------|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|The user credentials are incorrect.|\n|403|Forbidden. The user isn’t an admin or doesn’t have the sn\\_cicd.sys\\_ci\\_automation role.|\n|404|Not found. The requested item wasn’t found.|\n|405|Invalid method. The functionality is inactive.|\n|500|Internal server error. An unexpected error occurred while processing the request.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nerror\n\n</td><td id=\"entry-error\">\n\nError message with details about the error.Data type: String\n\n</td></tr><tr><td>\n\nlinks\n\n</td><td id=\"entry-link\">\n\nInformation about any links and sys\\_ids associated with the update set.Data type: Object\n\n```\n\"links\": {\n  \"progress\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress\n\n</td><td id=\"entry-links_progress\">\n\nProgress information about the operation performed on the update set.Data type: Object\n\n```\n\"progress\": {\n  \"id\": \"String\",\n  \"url\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress.id\n\n</td><td id=\"entry-progress_id\">\n\nSys\\_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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cicd-api.md).Data type: String\n\n</td></tr><tr><td>\n\nlinks.progress.url\n\n</td><td id=\"entry-progress_url\">\n\nURL to use to retrieve the progress details about the operation performed on the update set.Data type: String\n\n</td></tr><tr><td>\n\npercent\\_complete\n\n</td><td id=\"entry-percent_complete\">\n\nPercentage of the request that is complete.Data type: Number\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td id=\"entry-status\">\n\nNumber representing the execution state of the action performed on the update set. Corresponds with the **status\\_label** descriptor.Possible values:\n\n-   0: Pending\n-   1: Running\n-   2: Successful\n-   3: Failed\n-   4: Canceled\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_detail\n\n</td><td id=\"entry-status_detail\">\n\nDetailed message about the execution status, if available. Corresponds to the detailed\\_message field in the Execution Tracker \\[sys\\_execution\\_tracker\\] table.Data type: String\n\n</td></tr><tr><td>\n\nstatus\\_label\n\n</td><td id=\"entry-status_label\">\n\nExecution status of the update set action. Corresponds with the **status** number.Possible values:\n\n-   Canceled\n-   Failed\n-   Pending\n-   Running\n-   Successful\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_message\n\n</td><td id=\"entry-status_message\">\n\nAdditional description of the action's current state, if available.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example shows how to roll back an installation operation on a specific update sys\\_id.\n\n```\ncurl \n\"https://instance.servicenow.com/api/sn_cicd/update_set/back_out?update_set_id=73dd24e39dcd1e10f877036c70ae59ae&rollback_installs=false\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nResponse:\n\n```\n{\n  \"result\": {\n    \"links\": {\n      \"progress\": {\n        \"id\": \"036bf811c9619e10f877184664aecdcb\",\n        \"url\": \"https://instance.servicenow.com/api/sn_cicd/progress/036bf811c9619e10f877184664aecdcb\"\n      }\n    },\n    \"status\": \"0\",\n    \"status_label\": \"Pending\",\n    \"status_message\": \"\",\n    \"status_detail\": \"\",\n    \"error\": \"\",\n    \"percent_complete\": 0\n  }\n} \n```\n\n## CICD Update Set - POST /api/sn\\_cicd/update\\_set/commit/\\{remote\\_update\\_set\\_id\\}\n\nCommits an update set with a given sys\\_id.\n\nWhen 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/t_CommitAnUpdateSet.md).\n\n### URL format\n\nVersioned URL: `/api/sn_cicd/{api_version}/update_set/commit/{remote_update_set_id}`\n\nDefault URL: `/api/sn_cicd/update_set/ commit/{remote_update_set_id}`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. 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\n\n</td></tr><tr><td>\n\nremote\\_update\\_set\\_id\n\n</td><td>\n\nSys\\_id of the update set to commit.**Note:** You can use the [CI/CD - GET /sn\\_cicd/progress/\\{progress\\_id\\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cicd-api.md) endpoint to get the remote update set ID.\n\nTable: Retrieved Update Sets \\[sys\\_remote\\_update\\_set\\]\n\nData type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n<table class=\"rest_api_request_body\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nforce\\_commit\n\n</td><td>\n\nFlag that indicates whether to force commit the update set.Valid values:\n\n-   true: Force commits the update set even if you haven't yet previewed it to check for conflicts.\n-   false: Doesn't force commit the update set. You must preview the update set before proceeding with the commit.\n\nData type: String\n\nDefault: false\n\n</td></tr></tbody>\n</table>### Headers\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr><tr><td>\n\nContent-Type\n\n</td><td id=\"content_type-entry-RESTAPI\">\n\nData format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table><table class=\"rest_api_response_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nContent-Type\n\n</td><td>\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>### Status codes\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n|Name|Description|\n|----|-----------|\n|200|Successful. The request was successfully processed.|\n|400|Bad Request. A bad request type or malformed request was detected.|\n|401|The user credentials are incorrect.|\n|403|Forbidden. The user doesn't have access rights to the specified record.|\n|404|Not found. The requested item wasn’t found.|\n|409|Conflict. The requested item isn’t unique.|\n|500|Internal server error. An unexpected error occurred while processing the request.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nerror\n\n</td><td id=\"entry-error\">\n\nError message with details about the error.Data type: String\n\n</td></tr><tr><td>\n\nlinks\n\n</td><td id=\"entry-link\">\n\nInformation about any links and sys\\_ids associated with the update set.Data type: Object\n\n```\n\"links\": {\n  \"progress\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress\n\n</td><td id=\"entry-links_progress\">\n\nProgress information about the operation performed on the update set.Data type: Object\n\n```\n\"progress\": {\n  \"id\": \"String\",\n  \"url\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nlinks.progress.id\n\n</td><td id=\"entry-progress_id\">\n\nSys\\_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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/cicd-api.md).Data type: String\n\n</td></tr><tr><td>\n\nlinks.progress.url\n\n</td><td id=\"entry-progress_url\">\n\nURL to use to retrieve the progress details about the operation performed on the update set.Data type: String\n\n</td></tr><tr><td>\n\npercent\\_complete\n\n</td><td id=\"entry-percent_complete\">\n\nPercentage of the request that is complete.Data type: Number\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td id=\"entry-status\">\n\nNumber representing the execution state of the action performed on the update set. Corresponds with the **status\\_label** descriptor.Possible values:\n\n-   0: Pending\n-   1: Running\n-   2: Successful\n-   3: Failed\n-   4: Canceled\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_detail\n\n</td><td id=\"entry-status_detail\">\n\nDetailed message about the execution status, if available. Corresponds to the detailed\\_message field in the Execution Tracker \\[sys\\_execution\\_tracker\\] table.Data type: String\n\n</td></tr><tr><td>\n\nstatus\\_label\n\n</td><td id=\"entry-status_label\">\n\nExecution status of the update set action. Corresponds with the **status** number.Possible values:\n\n-   Canceled\n-   Failed\n-   Pending\n-   Running\n-   Successful\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_message\n\n</td><td id=\"entry-status_message\">\n\nAdditional description of the action's current state, if available.Data type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example commits the update set with the associated sys\\_id.\n\n```\ncurl \n\"https://instance.servicenow.com/api/sn_cicd/update_set/commit/4ee89999c9e19e10f877184664aecd42\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nResponse body.\n\n```\n{\n  \"result\": {\n    \"links\": {\n      \"progress\": {\n        \"id\": \"bf380a11c9e59e10f877184664aecd0e\",\n        \"url\": \"https://instance.servicenow.com/api/sn_cicd/progress/bf380a11c9e59e10f877184664aecd0e\"\n      }\n    },\n    \"status\": \"0\",\n    \"status_label\": \"Pending\",\n    \"status_message\": \"\",\n    \"status_detail\": \"\",\n    \"error\": \"\",\n    \"percent_complete\": 0\n  }\n}\n```\n\n## CICD Update Set - POST /api/sn\\_cicd/update\\_set/create\n\nCreates a new update set and inserts the new record in the Update Sets \\[sys\\_update\\_set\\] table.\n\n### URL format\n\nVersioned URL: `/api/sn_cicd/{api_version}/update_set/create`\n\nDefault URL: `/api/sn_cicd/update_set/create`\n\n**Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md).\n\n### Supported request parameters\n\n<table class=\"rest_api_path_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\napi\\_version\n\n</td><td id=\"version-entry-RESTAPI\">\n\nOptional. 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\n\n</td></tr></tbody>\n</table><table class=\"rest_api_query_parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndescription\n\n</td><td>\n\nDescription of the update set.Data type: String\n\nDefault: null\n\n</td></tr><tr><td>\n\nscope\n\n</td><td>\n\nRequired 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\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nsys\\_id\n\n</td><td>\n\nRequired if the **scope** parameter is not passed. Sys\\_id of the application in which to create the new update set.Table: Applications \\[sys\\_scope\\]\n\nData type: String\n\n</td></tr><tr><td>\n\nupdate\\_set\\_name\n\n</td><td>\n\nRequired. Name to give the update set.Data type: String\n\n</td></tr></tbody>\n</table>|Name|Description|\n|----|-----------|\n|None| |\n\n### Headers\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n<table class=\"rest_api_request_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAccept\n\n</td><td id=\"accept-entry-RESTAPI\">\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr><tr><td>\n\nContent-Type\n\n</td><td id=\"content_type-entry-RESTAPI\">\n\nData format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table><table class=\"rest_api_response_headers\"><thead><tr><th>\n\nHeader\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nContent-Type\n\n</td><td>\n\nData format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json**\n\n</td></tr></tbody>\n</table>### Status codes\n\nThe 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://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_RESTAPI.md).\n\n| | |\n|---|---|\n|201|The update set was created successfully.|\n|400|Bad request. The update set name is null or empty, or both input sys\\_id and scope are null or empty.|\n|403|Forbidden. The user isn’t an admin or doesn’t have the sn\\_cicd.sys\\_ci\\_automation role.|\n|409|Conflict. The requested item isn’t unique.|\n|500|Internal server error. An unexpected error occurred while processing the request.|\n\n### Response body parameters \\(JSON or XML\\)\n\n<table><thead><tr><th>\n\nName\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nerror\n\n</td><td id=\"entry-error\">\n\nError message with details about the error.Data type: String\n\n</td></tr><tr><td>\n\nstatus\n\n</td><td id=\"entry-status\">\n\nNumber representing the execution state of the action performed on the update set. Corresponds with the **status\\_label** descriptor.Possible values:\n\n-   0: Pending\n-   1: Running\n-   2: Successful\n-   3: Failed\n-   4: Canceled\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_detail\n\n</td><td id=\"entry-status_detail\">\n\nDetailed message about the execution status, if available. Corresponds to the detailed\\_message field in the Execution Tracker \\[sys\\_execution\\_tracker\\] table.Data type: String\n\n</td></tr><tr><td>\n\nstatus\\_label\n\n</td><td id=\"entry-status_label\">\n\nExecution status of the update set action. Corresponds with the **status** number.Possible values:\n\n-   Canceled\n-   Failed\n-   Pending\n-   Running\n-   Successful\n\nData type: String\n\n</td></tr><tr><td>\n\nstatus\\_message\n\n</td><td id=\"entry-status_message\">\n\nAdditional description of the action's current state, if available.Data type: String\n\n</td></tr><tr><td>\n\nupdate\\_set\\_id\n\n</td><td>\n\nSys\\_id of the created update set. Table: Update Sets \\[sys\\_update\\_set\\]\n\nData type: String\n\n</td></tr></tbody>\n</table>### cURL request\n\nThe following example demonstrates how to create a new update set with the name `Testupdateset` and the scope set to `sn_test`.\n\n```\ncurl \n\"https://instance.servicenow.com/api/sn_cicd/update_set/create?update_set_name=Testupdateset&scope=sn_test\" \\\n--request POST \\\n--header \"Accept:application/json\" \\\n--user 'username':'password'\n```\n\nResponse body.\n\n```\n{\n  \"result\": {\n    \"status\": \"2\",\n    \"status_label\": \"\",\n    \"status_message\": \"Successfully created update set: Test update set 1\",\n    \"status_detail\": \"\",\n    \"error\": \"\",\n    \"update_set_id\": \"a9a485d1c9a19e10f877184664aecd11\"\n  }\n}\n```\n\n"}}