CdmApplicationsApi
-
- UpdatedJan 30, 2025
- 63 minutes to read
- Yokohama
- API reference
The CdmApplicationsApi provides endpoints that enable you to uploadzoominsoftware.io/utah-devops/ configuration data to the component, collection, deployable, and component variable folders found in the DevOps Config Workspace UI. It also has endpoints that enable you to export deployable configuration data to your DevOps pipeline and manage shared components and shared applications.
The export and upload endpoints use an asynchronous queuing implementation. With this type of implementation, you first call the desired export or upload request endpoint. These endpoints queue your request and return a request identifier. You then use this request identifier to call the appropriate status endpoint, one for uploads and a different one for exports, to obtain the status of the upload/export. For export requests, once the export is complete, you can also request the content of the export.
This API does not provide endpoints that perform simple retrieval of application records. To retrieve these records, use the Table API.
- Scripted REST CDM View ACL (sn_cdm.cdm.viewer)
- Scripted REST CDM Editor ACL (sn_cdm.cdm_editor)
In addition, the Configuration Data Management (CDM) plugin must be activated for this API to be available in an instance.
For additional information on Configuration Data Management and the DevOps Config Workspace UI, see Uploading your config data.
For additional information on shared components and shared libraries, see Sharing components among applications — Component libraries.
CdmApplicationsApi - DELETE /sn_cdm/applications/deployables
Deletes a specified Configuration Data Management (CDM) deployable.
The caller of this endpoint must have the CDM Admin role.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/deployables
Default URL: /api/sn_cdm/applications/deployables
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 |
---|---|
appName | Required. Name of the CDM application to which the deployable is associated. Data type: String Table: CDM Deployable [sn_cdm_deployable] |
name | Name of the deployable to delete. Data type: String Table: CDM Deployable [sn_cdm_deployable] |
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. 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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Name | Description |
---|---|
None |
Example: cURL request
The following code example shows how to remove a deployable.
For a successful deletion of the deployable, no response is returned other than the HTTP status code.
CdmApplicationsApi - DELETE /sn_cdm/applications/shared_components
Removes the shared component usage reference from a specified Configuration Data Management (CDM) application.
Supported request parameters
Name | Description |
---|---|
api_version | Data type: String |
Name | Description |
---|---|
appName | Required. Name of the application from which to remove the specified shared component association. The specified application must have the type field set to "shared_library". Data type: String Table: CDM Application [sn_cdm_application] |
changesetNumber | Required. |
sharedComponentName | Required. Unique name of the shared component to remove from the specified application. Data type: String Table: CDM Shared Component [sn_cdm_shared_component] |
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 | Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
The following code example shows how to delete the "paymentService-V1.1" shared component from the "App1" application.
Response:
CdmApplicationsApi - GET /sn_cdm/applications/deployables/exports/{export_id}/content
Returns the content associated with a specified configuration data export request.
Only call this endpoint once you have received a complete response from the CdmApplicationsApi - GET /sn_cdm/applications/deployables/exports/{export_id}/status endpoint. If you call this endpoint before the export is complete, a 400 status error is returned.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/deployables/exports/{export_id}/content
Default URL: /api/sn_cdm/applications/deployables/exports/{export_id}/content
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 |
export_id | Unique identifier for the export request whose configuration data to return. This value is returned by the CdmApplicationsApi - POST /sn_cdm/applications/deployables/exports endpoint. |
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. 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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following example requests the configuration data of an export request with the ID of 3ab14a7d53b1301096edddeeff7b12f.
The following shows the possible return results.
CdmApplicationsApi - GET /sn_cdm/applications/deployables/exports/{export_id}/status
Returns the current status of the specified configuration data export request.
Use the CdmApplicationsApi - POST /sn_cdm/applications/deployables/exports endpoint to make an export request.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/deployables/exports/{export_id}/status
Default URL: /api/sn_cdm/applications/deployables/exports/{export_id}/status
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 |
export_id | Sys_id of the export request whose status to return. This value is returned by the CdmApplicationsApi - POST /sn_cdm/applications/deployables/exports endpoint. |
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. 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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following example requests the status of an export with the ID of 3ab14a7d53b1301096edddeeff7b12f.
The following are the possible return results.
CdmApplicationsApi - GET /sn_cdm/applications/shared_components
Returns the list of shared components used by a specified application. You can also specify to only return those shared components that have a new version available.
The CDM Admin role is required to access this endpoint.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/shared_components
Default URL: /api/sn_cdm/applications/shared_components
Supported request parameters
Name | Description |
---|---|
api_version | Data type: String |
Name | Description |
---|---|
appName | Required. Name of the application whose list of shared components you want returned. The type field of the application must be set to shared_library. Data type: String Table: CDM Application [sn_cdm_application] |
withUpdatesOnly | Flag that indicates whether to only return shared components that have a new updated version available. Valid values:
Default: false |
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 | Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
The following code example shows how to call this endpoint to retrieve the shared components that have a new version used by "App1".
Response:
CdmApplicationsApi - GET /sn_cdm/applications/shared_libraries/components/applications
Returns a map of shared components and the applications that use them that are within a specified library.
The CDM Admin role is required to access this endpoint.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/shared_libraries/components/applications
Default URL: /api/sn_cdm/applications/shared_libraries/components/applications
Supported request parameters
Name | Description |
---|---|
api_version | Data type: String |
Name | Description |
---|---|
sharedComponentName | Required. Name of the shared component to include in the map. Data type: String Table: CDM Shared Component [sn_cdm_shared_component] |
sharedLibraryName | Required. Name of the shared library to include in the map. The specified application must have the type field set to "shared_library". Data type: String Table: CDM Application [sn_cdm_application] |
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 | Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
The following code example shows how to call this endpoint to retrieve the map that shows the applications in the "OracleG-Library-10" shared library that use the "paymentService-V1.1" shared component.
Response:
CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}
Returns the current status of the specified configuration data upload request.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/upload-status/{upload_id}
Default URL: /api/sn_cdm/applications/upload-status/{upload_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 |
upload_id | Sys_id of the upload request whose status to return. This value is returned by the various CdmApplications upload request endpoints. |
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. 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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following example show requesting the status for an upload with the ID of 5560a6895326301096edddeeff7b1230.
The following are the possible return results.
CdmApplicationsApi - POST /sn_cdm/applications/deployables
Creates a new deployable and automatically connects it to a specified Configuration Data Management (CDM) application.
You can create a deployable for any one of three environment types: Development, Test, or Production.
To access this endpoint the caller must have the CDM Admin role.
If you need to create multiple deployables, use the CdmApplicationsApi - POST /sn_cdm/applications/deployables/create endpoint.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/deployables
Default URL: /api/sn_cdm/applications/deployables
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. Only supports 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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
The following code example shows how to create and associate a deployable to a CDM application.
Return results:
CdmApplicationsApi - POST /sn_cdm/applications/deployables/create
Creates one or more new deployables.
- Deployables that must be manually connected to an Application Model (CI Service).
- Deployables that are automatically connected to new, dynamically created Application Models (CI Services).
You can create a deployable for any one of three
environment types: Development, Test, or Production. When
creating multiple deployables, the auto-generated names of the deployables follow the
pattern: DeployableType_Number
, where Number
is a running
sequence number based on the creation of a new deployable. For example, if you create three
deployables of type Test
in an endpoint call, they are named Test_1,
Test_2, and Test_3. If you then call the endpoint again, and create a different Test
deployable, its auto-gen'd name is Test_4. These numbers are never reused, even if a
deployable is deleted.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/deployables/create
Default URL: /api/sn_cdm/applications/deployables/create
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. Only supports 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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
The following example shows how to create a single deployable and associate it with and existing CDM application.
The following shows the possible responses to this call, both as a success and an error.
CdmApplicationsApi - POST /sn_cdm/applications/deployables/exports
Submits a request to export the current snapshot for a specified application and one or more deployables into the CDM Exporter Cache [sn_cdm_exporter_cache] table.
This endpoint returns a unique identifier for the request, which you then use to call the CdmApplicationsApi - GET /sn_cdm/applications/deployables/exports/{export_id}/status endpoint to retrieve the status of the export. Once the export is complete, you can use the CdmApplicationsApi - GET /sn_cdm/applications/deployables/exports/{export_id}/content endpoint to retrieve the associated application's configuration data.
A snapshot is the complete data model of a deployable at the time a configuration change is committed. This includes any included components, collections, and vars, as well as deployable-specific vars and overrides. For additional information on deployables, see Create and update a deployable.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/deployables/exports
Default URL: /api/sn_cdm/applications/deployables/exports
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. Only supports 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.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. Possible
error messages:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
The following example requests the export of the configuration data for the following: application name = TestAppA, deployable name = DEP, using the exporter = exporter-1-primary_deployable.
Returns the unique identifier of the export request.
CdmApplicationsApi - POST /sn_cdm/applications/shared_components
Associates the specified shared component to the application within a specified changeset.
The CDM Admin role is required to access this endpoint.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/shared_components
Default URL: /api/sn_cdm/applications/shared_components
Supported request parameters
Name | Description |
---|---|
api_version | 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 | Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. The passed changeset doesn't exist. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
The response fields depend on what fields were specified in the returnFields parameter in the request. The following describes some of the more important fields.
Example: cURL request
The following example shows how to call this endpoint to associate the application "App1" with the shared component "paymentService-V1.1" under the shared library "OracleG-Library-10" within the "Chset-20" changeset.
Response:
CdmApplicationsApi - POST /sn_cdm/applications/uploads/components
Submits a request to upload the passed-in configuration data for a specific component, within the system components folder, for the specified application.
The following image shows an example of where the component configuration data is uploaded in reference to the ServiceNow DevOps Config UI. Assumes the component is dbComponent and the application is paymentSvc.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/uploads/components
Default URL: /api/sn_cdm/applications/uploads/components
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 |
---|---|
Variable upload data | Configuration data to upload. This can be any data in the format defined by the dataFormat parameter of the query parameters. |
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. Only supports application/json. |
Content-Type | Data format of the request body. Supported types:
text/plain and
application/x-www-form-urlencoded. Default: text/plain |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad request. Upload request has been rejected. Possible issues:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following example shows an upload request for the application Demo_App1631126164773.
The following return results show both a successful and an error response for this request.
CdmApplicationsApi - POST sn_cdm/applications/uploads/components/file
Uploads files as part of the Configuration Data Model (CDM) to the components folder.
Use this method to upload to a components file node.
URL format
Versioned URL: POST /api/sn_cdm/{api_version}/applications/uploads/components/file
Default URL: POST /api/sn_cdm/applications/uploads/components/file
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 |
---|---|
Variable upload data | Configuration data to upload. By default, file size uploads are limited to 5 MB. For information about how to adjust your upload file sizes and type, see this Now Support article. Data type: String/stream |
Headers
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data type of the file to be uploaded. Supported types: application/zip, text/plain, application/json. Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad request. Upload request has been rejected. Possible issues:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following example shows how to upload a content to a text file.
The following return results show both a successful and an error response for this request.
CdmApplicationsApi - POST /sn_cdm/applications/uploads/components/vars
Submits a request to upload the passed-in configuration data under the vars folder, within the system components folder, for the specified application.
The following image shows an example of where the component's vars configuration data is uploaded in reference to the ServiceNow DevOps Config Workspace UI. Assumes the application is paymentSvc.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/uploads/components/vars
Default URL: /api/sn_cdm/applications/uploads/components/vars
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 |
---|---|
Variable upload data | Configuration data to upload. This can be any data in the format defined by the dataFormat parameter of the query parameters. |
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. Only supports application/json. |
Content-Type | Data format of the request body. Supported types:
text/plain and
application/x-www-form-urlencoded. Default: text/plain |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad request. Upload request has been rejected. Possible issues:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following example shows a vars upload request for the application Demo_App1631126164773.
The following return results show both a successful and an error response for this request.
CdmApplicationsApi - POST /sn_cdm/applications/uploads/collections
Submits a request to upload the passed-in configuration data for a specific collection, within the system collections folder, for the specified application.
The following image shows an example of where the configuration data is uploaded in reference to the ServiceNow DevOps Config Workspace UI. Assumes the collection is db0Release1.0 and the application is paymentSvc.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/uploads/collections
Default URL: /api/sn_cdm/applications/uploads/collections
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 |
---|---|
Variable upload data | Configuration data to upload. This can be any data in the format defined by the dataFormat parameter of the query parameters. |
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. Only supports application/json. |
Content-Type | Data format of the request body. Supported types:
text/plain and
application/x-www-form-urlencoded. Default: text/plain |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad request. Upload request has been rejected. Possible issues:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
This example shows how to upload JSON-formatted dbSettings configuration date into the collections folder for the application Demo_App1631126164773.
The following shows the possible responses to this call, both as a success and an error.
CdmApplicationsApi - POST /sn_cdm/applications/uploads/collections/file
Uploads a file to the collections folder in the Configuration Data Model (CDM).
URL format
Versioned URL: POST /api/sn_cdm/{api_version}/applications/uploads/collections/file
Default URL: POST /api/sn_cdm/applications/uploads/collections/file
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 |
---|---|
Variable upload data | Configuration data to upload. By default, file size uploads are limited to 5 MB. For information about how to adjust your upload file sizes and type, see this Now Support article. Data type: String/stream |
Headers
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Content Type of the file to be uploaded. Examples: application/zip, text/plain, application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad request. Upload request has been rejected. Possible issues:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following call uploads a plain text file to the CDM collections folder.
The following return results show both a successful and an error response to this request.
CdmApplicationsApi - POST /sn_cdm/applications/uploads/deployables
Submits a request to upload the configuration content for a specific deployable within the deployables system folder of a specified application.
The following image shows an example of where the deployable configuration data is uploaded in reference to the ServiceNow DevOps Config UI. Assumes the deployable is Development_1 and the application is paymentSvc.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/uploads/deployables
Default URL: /api/sn_cdm/applications/uploads/deployables
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 |
---|---|
Variable upload data | Configuration data to upload. This can be any data in the format defined by the dataFormat parameter of the query parameters. |
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. Only supports application/json. |
Content-Type | Data format of the request body. Supported types:
text/plain and
application/x-www-form-urlencoded. Default: text/plain |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad request. Upload request has been rejected. Possible issues:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following example shows an upload request for the application Demo_App1631126164773.
The following return results show both a successful and an error response for this request.
CdmApplicationsApi - POST /sn_cdm/applications/uploads/deployables/file
Uploads files to the deployables folder in the Configuration Data Model (CDM).
URL format
Versioned URL: POST /api/sn_cdm/{api_version}/applications/uploads/deployables/file
Default URL: POST /api/sn_cdm/applications/uploads/deployables/file
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 |
---|---|
Variable upload data | Configuration data to upload. By default, file size uploads are limited to 5 MB. For information about how to adjust your upload file sizes and type, see this Now Support article. Data type: String/stream |
Headers
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Content-Type | Data type of the file to be uploaded. Supported types: application/zip, text/plain, application/json. Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad request. Upload request has been rejected. Possible issues:
|
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
The following request uploads a plain text file to the deployables folder of the CDM application.
The following return results show both a successful and an error response to this request.
CdmApplicationsApi - PUT /sn_cdm/applications/deployables
Updates the specified shared component in an application within a specified changeset.
- Name
- Description
- Application Service\Dynamic CI Group
- Deployable identifier
The CDM Admin role is required to access this endpoint.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/deployables
Default URL: /api/sn_cdm/applications/deployables
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 |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad request. A bad request type or malformed request was detected. |
500 | Internal Server Error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters (JSON or XML)
Example: cURL request
Output:
CdmApplicationsApi - PUT /sn_cdm/applications/shared_components
Updates the specified shared component in an application within a specified changeset.
The CDM Admin role is required to access this endpoint.
URL format
Versioned URL: /api/sn_cdm/{api_version}/applications/shared_components
Default URL: /api/sn_cdm/applications/shared_components
Supported request parameters
Name | Description |
---|---|
api_version | 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 | Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. The passed changeset does not exist. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
The response fields depend on what fields were specified in the returnFields parameter in the request. The following describes some of the more important fields.
Example: cURL request
The following example shows how to call this endpoint to update the application "App1" with the shared component "paymentService-V1.1" under the shared library "OracleG-Library-10" within the "Chset-20" changeset.
Response:
On this page
- CdmApplicationsApi - DELETE /sn_cdm/applications/deployables
- CdmApplicationsApi - DELETE /sn_cdm/applications/shared_components
- CdmApplicationsApi - GET /sn_cdm/applications/deployables/exports/{export_id}/content
- CdmApplicationsApi - GET /sn_cdm/applications/deployables/exports/{export_id}/status
- CdmApplicationsApi - GET /sn_cdm/applications/shared_components
- CdmApplicationsApi - GET /sn_cdm/applications/shared_libraries/components/applications
- CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}
- CdmApplicationsApi - POST /sn_cdm/applications/deployables
- CdmApplicationsApi - POST /sn_cdm/applications/deployables/create
- CdmApplicationsApi - POST /sn_cdm/applications/deployables/exports
- CdmApplicationsApi - POST /sn_cdm/applications/shared_components
- CdmApplicationsApi - POST /sn_cdm/applications/uploads/components
- CdmApplicationsApi - POST sn_cdm/applications/uploads/components/file
- CdmApplicationsApi - POST /sn_cdm/applications/uploads/components/vars
- CdmApplicationsApi - POST /sn_cdm/applications/uploads/collections
- CdmApplicationsApi - POST /sn_cdm/applications/uploads/collections/file
- CdmApplicationsApi - POST /sn_cdm/applications/uploads/deployables
- CdmApplicationsApi - POST /sn_cdm/applications/uploads/deployables/file
- CdmApplicationsApi - PUT /sn_cdm/applications/deployables
- CdmApplicationsApi - PUT /sn_cdm/applications/shared_components