Continuous Integration/Continuous Delivery (CICD) API
-
- UpdatedAug 1, 2024
- 51 minutes to read
- Xanadu
- API reference
The CICD API provides endpoints that enable integration with common DevOps tools for building pipelines. These tools include Jenkins, Azure Pipelines, GitLab, GitHub Actions, Atlassian Bamboo/Pipelines, and more.
It provides integrators with the ability to build CICD pipelines for Now Platform applications driven by pull/merge request workflows typical in source-driven development. It leverages the Source Control, Application Repository, and Automated Test Framework features.
The CI/CD API provides the following product and feature areas:
- Source control
Apply remote changes for an application linked to a remote Git repository through the Source Control feature in Studio, on a specific instance.
Imports an application using the specified repository URL and branch name.
- Application repository: Available for scoped applications, global application,
application customizations for scoped applications on the ServiceNow Store, and
through plugins.
- Publish an application from an instance to the connected application repository.
- Install an application onto an instance from the connected application repository.
- Rollback an application that was installed through rollback context.
- Batch
- Define a JSON manifest file to batch install multiple applications together.
- Rollback the entire batch install through rollback context.
- Returns the results of a batch install based on a specified result identifier.
- Plugins
- Activate a plugin.
- Rollback a plugin through rollback context.
- Automated Test Framework (ATF)
- Start an ATF test suite.
- Obtain the pass/fail result of an ATF test suite.
- Instance scan
- Start an instance scan (full, point scan on table, point scan on record, scoped application, update set, combination of these items.)
- Obtain the pass/fail result of an instance scan run.
- Progress
Obtain the percentage completion on an instance for processes initiated by other endpoint calls. You can use this feature to poll until progress completion before proceeding with the next step.
Pending
, along with a unique identifier and link. Use this information to
obtain additional information about the progress, source, results, and/or findings of the
request. Depending on the function request, you can use one of the following means to obtain
additional information about a request:- Call the /sn_cicd/progress/{progress_id} endpoint using the links.progress.id parameter returned by the initiating endpoint.
- Call the /sn_cicd/testsuite/results/{result_id} endpoint using the links.result.id parameter returned by the initiating endpoint.
- Call the /sn_cicd/instance_scan/result/{progress_id} endpoint using the links.progress.id parameter returned by the initiating endpoint.
- Call the /sn_cicd/sc/apply_stash/{stash_id} endpoint using the links.stash.id parameter returned by the/sn_cicd/progress/{progress_id} endpoint.
- Link out to the links.<progress/result/source/findings>.url parameter returned by the initiating endpoint.
The sn_cicd.sys_ci_automation or admin role is required to use this API.
Beginning in Tokyo, the CICD API endpoints that need to obtain the instance wide lock / mutex to perform their requested operation will use a queue, rather than rejecting requests while the instance wide lock / mutex is occupied. Multiple CICD pipelines simultaneously make requests without detecting the rejection and retrying, and instead, can simply monitor the progress as they would for successful requests previously. This behavior is on by default.
- Continuous Integration and Continuous Delivery (CICD) Spoke
- https://plugins.jenkins.io/servicenow-cicd/
- https://marketplace.visualstudio.com/items?itemName=ServiceNow.vss-services-servicenow-cicd
- https://github.com/marketplace?type=actions&query=servicenow
- https://hub.docker.com/r/servicenowdevx/sncicd-gitlab-docker
CI/CD - GET /sn_cicd/app/batch/results/{result_id}
Returns the results of a batch install based on a specified result identifier.
Call this method after calling the /sn_cicd/app/batch/install endpoint to obtain the results of the batch install. Use the value returned in the links.results.id parameter of the return results of /sn_cicd/app/batch/install endpoint as the result_id for this endpoint. You can also call the /api/sn_cicd/progress/{progress_id} endpoint to obtain information on the progress of the installation if it has not yet completed.
URL format
Versioned URL: /api/sn_cicd/{api_version}/app/batch/results/{result_id}
Default URL: /api/sn_cicd/app/batch/results/{result_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
result_id | Sys_id of the batch installation for which to return results information. This
value is returned in the links.results.id parameter of the
/sn_cicd/app/batch/install endpoint. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
This example checks the status of a batch installation plan called Release 2.0 IT Operations.
CI/CD - GET /sn_cicd/instance_scan/result/{progress_id}
Returns the current progress and status of the CI/CD instance scan function associated with a passed-in progress ID. Call this method after calling one of the other instance scan CI/CD endpoints such as /sn_cicd/instance_scan/full_scan or /sn_cicd/instance_scan/point_scan.
URL format
Versioned URL: /api/sn_cicd/{api_version}/instance_scan/result/{progress_id}
Default URL: /api/sn_cicd/instance_scan/result/{progress_id}
Supported request parameters
Parameter | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
progress_id | Unique identifier of the function for which to return progress information.
This value is returned in the links.progress.id parameter of
the endpoint that initiated the action, such as
/sn_cicd/instance_scan/full_scan or
/sn_cicd/instance_scan/point_scan. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following 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.
Request body
The API accepts these JSON or XML elements in the request body.
Element | Description |
---|---|
None |
Response body
The API returns these JSON or XML elements in the response body.
Example: Sample cURL request
CI/CD - GET /sn_cicd/progress/{progress_id}
Returns the current progress and status of the Continuous Integration and Continuous Delivery (CICD) function associated with a specified progress ID.
Call this method after calling one of the asynchronous CICD endpoints such as /sn_cicd/app_repo/publish, /sn_cicd/app_repo/install, /sn_cicd/testsuite/run, or /sn_cicd/sc/apply_stash.
URL format
Versioned URL: /api/sn_cicd/{api_version}/progress/{progress_id}
Default URL: /api/sn_cicd/progress/{progress_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
progress_id | Unique identifier of the function for which to return progress information.
This value is returned in the links.progress.id parameter of the endpoint that initiated the action, such as /sn_cicd/app_repo/publish, /sn_cicd/app_repo/install, /sn_cicd/testsuite/run, or /sn_cicd/sc/apply_stash. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: Obtain the progress of a test suite run
Progress of the apply changes call.
Example: Obtain the progress of an apply changes call. In this case, there were unsaved/uncommitted changes on the instance in Studio, so a stash was created to hold the unsaved changes
Progress providing information on the created stash.
Example: cURL request
Progress of a test suite run (/sn_cicd/testsuite/run).
CI/CD - GET /sn_cicd/testsuite/results/{result_id}
Returns the results of a test suite run based on a specified results identifier.
Call this endpoint after calling /sn_cicd/progress/{progress_id} to obtain the result of the executed test suite.
URL format
Versioned URL: /api/sn_cicd/{api_version}/testsuite/results/{result_id}
Default URL: /api/sn_cicd/testsuite/results/{result_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
result_id | Unique identifier of the test suite results to retrieve. The corresponding
/sn_cicd/progress/{progress_id} endpoint call returns this
information. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
CI/CD - POST /sn_cicd/app/batch/install
Installs two or more packages in a single specified batch.
- Application:
- Scoped applications in the ServiceNow Store that are not owned by your company
- Scoped or global applications in the application repository that are owned by your company
- Your application customizations for Store applications in the application repository
- ServiceNow plugin:
Application customizations for scoped applications that were packaged in a plugin and were published to the application repository.
URL format
Versioned URL: /api/sn_cicd/{api_version}/app/batch/install
Default URL: /api/sn_cicd/app/batch/install
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
This example initiates a batch installation called Release 2.2 Deployment that contains three packages (one of each type) to install.
CI/CD - POST /sn_cicd/app/batch/rollback/{rollback_id}
Rolls back all of the packages associated with a specific batch installation to their previous versions.
This endpoint works in conjunction with the /sn_cicd/app/batch/install endpoint. The rollback_id is provided in the return results of this endpoint. When this endpoint is called, it rolls back all packages specified in the associated install; you cannot rollback individual packages. If there is no previous version, the endpoint uninstalls the associated package.
URL format
Versioned URL: /api/sn_cicd/{api_version}/app/batch/rollback/{rollback_id}
Default URL: /api/sn_cicd/app/batch/rollback/{rollback_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
rollback_id | Sys_id of the batch installation plan for which to rollback the installed
packages to their previous versions. This value is returned in the
links.rollback.id parameter of the
/sn_cicd/app/batch/install endpoint. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
This example rolls back all the packages within the specified installation batch plan to their previous version.
CI/CD - POST /sn_cicd/app_repo/install
Installs the specified application from the application repository onto the instance making the endpoint call.
Using this endpoint you are able to install both unaltered and customized ServiceNow base system and ServiceNow Store applications, customized ServiceNow plugins, and your own ServiceNow applications.
The following outlines the parameters that you need to pass to implement specific use cases. All parameters that are not specified are not passed in and use the associated defaults.
- To only install the base application and not the corresponding application
customizations.
- sys_id: Sys_id of the base application that has been customized.
- base_app_version: Version of the base application to install.
- To install a specified version of application customizations and automatically install
the recommended base application version. The recommended base application version is
the version of the base application that was installed on the instance at the time that
the customizations were last published. Every version of application customizations has
a corresponding recommended base application version.
- sys_id: Sys_id of the application that has been customized.
- auto_upgrade_base_app: true
- version: Version of the application customizations to install.
- To install the latest version of the application customizations and its corresponding
recommended base application version.
- sys_id: Sys_id of the application that has been customized.
- auto_upgrade_base_app: true
- To install the latest version of the application customizations, but not upgrade the
base application to the application customizations recommended base application
version.
- sys_id: Sys_id of the application that has been customized.
- auto_upgrade_base_app: false
- To install application customizations along with the scoped ServiceNow plugin of the current release.
- scope: Scope of the plugin that has been customized OR
- sys_id: Sys_id of the application that has been customized. This is not the ID of the plugin.
- version: Version of the application customizations to install.
- To install application customizations for an already installed and activated scoped
plugin.
- sys_id: Sys_id of the application that has been customized. This is not the ID of the plugin.
- auto_upgrade_base_app: false
- version: Version of the application customizations to install.
Since base plugins can have only one version per family release, the auto_upgrade_base_app and base_app_version parameters do not apply to application customization installs for plugins. To activate a plugin for the first time on an instance, use the /sn_cicd/plugin/{plugin_id}/activate endpoint instead.
URL format
Versioned URL: /api/sn_cicd/{api_version}/app_repo/install
Default URL: /api/sn_cicd/app_repo/install
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
CI/CD - POST /sn_cicd/app_repo/publish
Publishes the specified application and all of its artifacts to the application repository.
URL format
Versioned URL: /api/sn_cicd/{api_version}/app_repo/publish
Default URL: /api/sn_cicd/app_repo/publish
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example
The following example shows how to publish the application with the specified sys_id and all of its artifacts to the application repository.
CI/CD - POST /sn_cicd/app_repo/rollback
Initiates a rollback of a specified application to a specified version.
URL format
Versioned URL: /api/sn_cicd/{api_version}/app_repo/rollback
Default URL: /api/sn_cicd/app_repo/rollback
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
scope | Required if sys_id is not specified. The scope name of the
application to rollback. Data type: String |
sys_id | Required if scope is not specified. The sys_id of the
application to rollback. Data type: String |
version | Required. Version of the application that is expected after the rollback
operation. If the request is to rollback an App Customization install, then set this
field to the version of the base application that the system is expected to have
after the rollback operation. Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
CI/CD - POST /sn_cicd/instance_scan/full_scan
Runs all active checks present in your instance.
You can run checks that are provided with Instance Scan or you can create your own checks. For more information, see Instance Scan.
URL format
Versioned URL: /api/sn_cicd/{api_version}/instance_scan/full_scan
Default URL: /api/sn_cicd/instance_scan/full_scan
Supported request parameters
Parameter | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Request body
The API accepts these JSON or XML elements in the request body.
Element | Description |
---|---|
None |
Response body
The API returns these JSON or XML elements in the response body.
Example: Sample cURL request
CI/CD - POST /sn_cicd/instance_scan/point_scan
Executes all applicable checks against a specified record.
For example, if you execute a point scan against a Catalog Item, only the checks applicable to the Catalog Item table run, and only the specified record is scanned.
You can run checks that are provided with Instance Scan or you can create your own checks. For more information, see Instance Scan.
URL format
Versioned URL: /api/sn_cicd/{api_version}/instance_scan/point_scan
Default URL: /api/sn_cicd/instance_scan/point_scan
Supported request parameters
Parameter | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
target_table | Required. Name of the table in which the record to scan resides, such as
"Incident." Data type: String |
target_sys_id | Required. The sys_id of the record within the specified table to scan. Data type: String |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following 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.
Request body
The API accepts these JSON or XML elements in the request body.
Element | Description |
---|---|
None |
Response body
The API returns these JSON or XML elements in the response body.
Example: Sample cURL request
CI/CD - POST /sn_cicd/instance_scan/suite_scan/combo/{combo_sys_id}
Runs a scan using a suite and target (scoped apps or update sets) that have already run previously.
Before calling this endpoint, you must call the /sn_cicd/instance_scan/suite_scan/{suite_sys_id}/scoped_apps or /sn_cicd/instance_scan/suite_scan/{suite_sys_id}/update_sets endpoints, or execute a suite scan in the UI.
URL format
Versioned URL: /api/sn_cicd/{api_version}/instance_scan/suite_scan/combo/{combo_sys_id}
Default URL: /api/sn_cicd/instance_scan/suite_scan/combo/{combo_sys_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
combo_sys_id | The sys_id of the scan to run. The scan must be an existing scan that you want
to re-run. Located in the Combo [scan_combo] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Response body - success.
CI/CD - POST /sn_cicd/instance_scan/suite_scan/{suite_sys_id}/scoped_apps
Runs all active checks inside a suite against a list of scoped apps.
URL format
Versioned URL: /api/sn_cicd/{api_version}/instance_scan/suite_scan/{suite_sys_id}/scoped_apps
Default URL: /api/sn_cicd/instance_scan/suite_scan/{suite_sys_id}/scoped_apps
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
suite_sys_id | The sys_id of the suite to run. Located
in the Suite [scan_check_suite] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
app_scope_sys_ids | Required. A list of sys_ids of the scoped applications to scan. Located in the
Application [sys_scope] table. The array can't be an empty array. Data type:
Array |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the request body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
This example runs all active checks inside a suite against one scoped application.
Response body - success.
CI/CD - POST /sn_cicd/instance_scan/suite_scan/{suite_sys_id}/update_sets
Runs all active checks inside a suite against a list of update sets.
URL format
Versioned URL: /api/sn_cicd/{api_version}/instance_scan/suite_scan/{suite_sys_id}/update_sets
Default URL: /api/sn_cicd/instance_scan/suite_scan/{suite_sys_id}/update_sets
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
suite_sys_id | The sys_id of the suite to run. Located
in the Suite [scan_check_suite] table. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
update_set_sys_ids | Required. A list of sys_ids of the update sets to scan. Located in the Update
Set [sys_update_set] table. The array can't be an empty array. Data type:
Array |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the request body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
This example runs all active checks inside a suite against one update set.
Response body - success.
CI/CD - POST /sn_cicd/plugin/{plugin_id}/activate
Activates the specified plugin.
URL format
Versioned URL: /api/sn_cicd/{api_version}/plugin/{plugin_id}/activate
Default URL: /api/sn_cicd/plugin/{plugin_id}/activate
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
plugin_id | Unique identifier of the plugin. You can locate this
identifier on the Plugins page within the card of the desired plugin; identified
with the name "ID". Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
CI/CD - POST /sn_cicd/plugin/{plugin_id}/rollback
Rolls back the specified plugin to the previous installed version. If no prior version has been installed, returns an error.
URL format
Versioned URL: /api/sn_cicd/{api_version}plugin/{plugin_id}/rollback
Default URL: /api/sn_cicd/plugin/{plugin_id}/rollback
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
plugin_id | Unique identifier of the plugin. You can locate this
identifier on the Plugins page within the card of the desired plugin; identified
with the name "ID". Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
CI/CD - POST /sn_cicd/sc/apply_changes
Starts applying changes from a remote source control to a specified local application or application-customization.
URL format
Versioned URL: /api/sn_cicd/{api_version}/sc/apply_changes
Default URL: /api/sn_cicd/sc/apply_changes
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
CI/CD - POST /sn_cicd/sc/apply_stash/{stash_id}
Starts applying a previously generated "stash" of changes from a remote source control to a specified local application or application-customization.
This endpoint works in conjunction with the POST/api/sn_cicd/sc/apply_changes and CI/CD - GET /sn_cicd/progress/{progress_id} endpoints. When the POST /api/sn_cicd/sc/apply_changes endpoint is called, any unsaved or uncommitted changes in App Engine Studio on the associated instance are saved into the database as a stash.
The way to determine whether a stash was created when the changes were initially applied is to call the GET /sn_cicd/progress/{progress_id} endpoint. If a stash was created, the sys_id (stash_id) and URL of the stash are returned. To apply the stashed changes to the associated application, call this apply_stash endpoint using the stash_id returned by the progress endpoint.
URL format
Versioned URL: /api/sn_cicd/{api_version}/sc/apply_stash/{stash_id}
Default URL: /api/sn_cicd/sc/apply_stash/{stash_id}
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
stash_id | Unique identifier of the stash to apply. This value is returned in the links.stash.id parameter in the corresponding CI/CD - GET /sn_cicd/progress/{progress_id} endpoint call. Data type: String |
Name | Description |
---|---|
None |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data format of the
request body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
The following code example shows how to call the apply_stash endpoint for stash_id fc2224e4e0429110f8771827f8fd3634.
The stash is pending, so not yet applied.
CI/CD - POST /sn_cicd/sc/import
Imports an application using the specified repository URL and branch name.
Use this endpoint to import an application from source control in the calling instance so you can then use Continuous Integration and Continuous Delivery (CICD) endpoints, such as /sn_cicd/sc/apply_changes, to deploy the application to upper environments.
URL format
Versioned URL: /api/sn_cicd/{api_version}/sc/import
Default URL: /api/sn_cicd/sc/import
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
The following example shows how to import the application located at
https://code.devsnc.com/some-user/ncRegrApp1.git
in the
main_branch
.
Returns the progress of the import.
CI/CD - POST /sn_cicd/testsuite/run
Starts a specified automated test suite. The test suite runs on the instance from which the endpoint was called.
URL format
Versioned URL: /api/sn_cicd/{api_version}/testsuite/run
Default URL: /api/sn_cicd/testsuite/run
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Failure response:
On this page
- CI/CD - GET /sn_cicd/app/batch/results/{result_id}
- CI/CD - GET /sn_cicd/instance_scan/result/{progress_id}
- CI/CD - GET /sn_cicd/progress/{progress_id}
- URL format
- Supported request parameters
- Headers
- Status codes
- Response body parameters (JSON or XML)
- Example: Obtain the progress of a test suite run
- Example: Obtain the progress of an apply changes call. In this case, there were
unsaved/uncommitted changes on the instance in Studio, so a stash was created to hold the
unsaved changes
- Example: cURL request
- URL format
- CI/CD - GET /sn_cicd/testsuite/results/{result_id}
- CI/CD - POST /sn_cicd/app/batch/install
- CI/CD - POST /sn_cicd/app/batch/rollback/{rollback_id}
- CI/CD - POST /sn_cicd/app_repo/install
- CI/CD - POST /sn_cicd/app_repo/publish
- CI/CD - POST /sn_cicd/app_repo/rollback
- CI/CD - POST /sn_cicd/instance_scan/full_scan
- CI/CD - POST /sn_cicd/instance_scan/point_scan
- CI/CD - POST /sn_cicd/instance_scan/suite_scan/combo/{combo_sys_id}
- CI/CD - POST /sn_cicd/instance_scan/suite_scan/{suite_sys_id}/scoped_apps
- CI/CD - POST /sn_cicd/instance_scan/suite_scan/{suite_sys_id}/update_sets
- CI/CD - POST /sn_cicd/plugin/{plugin_id}/activate
- CI/CD - POST /sn_cicd/plugin/{plugin_id}/rollback
- CI/CD - POST /sn_cicd/sc/apply_changes
- CI/CD - POST /sn_cicd/sc/apply_stash/{stash_id}
- CI/CD - POST /sn_cicd/sc/import
- CI/CD - POST /sn_cicd/testsuite/run