---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# CdmApplicationsApi

# CdmApplicationsApi {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 77 minutes to read

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](https://servicenow-prod.fluidtopics.net/1Gay5St9NtFuJYW7wnnCrg#c_TableAPI "The Table API provides endpoints that allow you to perform create, read, update, and delete (CRUD) operations on existing tables.") API.  
You must have one of the following roles to access this 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](https://www.servicenow.com/docs/access?context=cdm-upload-process&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US).

For additional information on shared components and shared libraries, see [Sharing components among applications ---
Component libraries](https://www.servicenow.com/docs/access?context=cdm-component-libraries&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US).

## CdmApplicationsApi - DELETE /sn_cdm/applications/deployables {#ariaid-title2}

Deletes a specified Configuration Data Management (CDM) deployable.
The caller of this endpoint must have the CDM Admin role.

### URL format {#apps-DELETE-applications-deploys__section_tqf_h2n_qtb}

Versioned URL:
/api/sn_cdm/{api_version}/applications/deployables

Default URL:
/api/sn_cdm/applications/deployables

### Supported request parameters

{#apps-DELETE-applications-deploys__entry__2}{#apps-DELETE-applications-deploys__version-not_optional-RESTAPI}

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

{#apps-DELETE-applications-deploys__entry__6}

| Name | Description |
|-|-|
| appName | Required. Name of the CDM application to which the deployable is associated. Located in the CDM Deployable \[sn_cdm_deployable\] table. Data type: String |
| name | Name of the deployable to delete. Located in the CDM Deployable \[sn_cdm_deployable\] table. Data type: String |
[Table 2. Query parameters]

{#apps-DELETE-applications-deploys__entry__12}

| Name | Description |
|-|-|
| None |   |
[Table 3. Request body 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](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-DELETE-applications-deploys__entry__16}{#apps-DELETE-applications-deploys__accept-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
[Table 4. Request headers]

{#apps-DELETE-applications-deploys__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 5. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-DELETE-applications-deploys__entry__24}{#apps-DELETE-applications-deploys__entry-200-status-code}{#apps-DELETE-applications-deploys__entry-400-status-code}{#apps-DELETE-applications-deploys__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 6. Status codes]

### Response body parameters

{#apps-DELETE-applications-deploys__entry__32}

| Name | Description |
|-|-|
| None |   |
[ ]

### cURL request

The following code example shows how to remove a deployable.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/deployables?appName=testApp&name=Dep-1" \ 
    --request DELETE \ 
    --header "Accept:application/json" \ 
    --user 'username':'password1' 

For a successful deletion of the deployable, no response is returned other than the HTTP
status code.

    None - results defined by the HTTP status code

## CdmApplicationsApi - DELETE /sn_cdm/applications/shared_components {#ariaid-title3}

Removes the shared component usage reference from a specified Configuration Data Management (CDM) application.
The CDM Admin role is required to access this endpoint.

### URL format {#apps-DELETE-shared_components__section_lbh_bp1_fwb}

Versioned URL:
/api/sn_cdm/{api_version}/applications/shared_components

Default URL:
/api/sn_cdm/applications/shared_components

### Supported request parameters

{#apps-DELETE-shared_components__entry__2}{#apps-DELETE-shared_components__version-not_optional-RESTAPI}

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

{#apps-DELETE-shared_components__entry__6}{#apps-DELETE-shared_components__changesetNumber-changeset-entry}

| Name | Description |
|-|-|
| appName | Required. Name of the application from which to remove the specified shared component association. Located in the CDM Application \[sn_cdm_application\] table. The specified application must have the type field set to "shared_library". Data type: String |
| changesetNumber | Required. Unique identifier of the associated changeset, such as "Chset-10". Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String |
| sharedComponentName | Required. Unique name of the shared component to remove from the specified application. Located in the CDM Shared Component \[sn_cdm_shared_component\] table. Data type: String |
[Table 8. Query parameters]

{#apps-DELETE-shared_components__entry__14}

| Name | Description |
|-|-|
| None |   |
[Table 9. Request body 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](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-DELETE-shared_components__entry__18}{#apps-DELETE-shared_components__accept-RESTAPI}

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

{#apps-DELETE-shared_components__entry__22}

| Header | Description |
|-|-|
| None |   |
[Table 11. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-DELETE-shared_components__entry__26}{#apps-DELETE-shared_components__entry-200-status-code}{#apps-DELETE-shared_components__entry-400-status-code}{#apps-DELETE-shared_components__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 12. Status codes]

### Response body parameters

{#apps-DELETE-shared_components__entry__34}

| Name | Description |
|-|-|
| result | Empty. The HTTP status code indicates the result of the call. |
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
[ ]

### cURL request

The following code example shows how to delete the "paymentService-V1.1" shared component
from the "App1" application.

    curl "https://instance-name.service-now.com/api/sn_cdm/applications/shared_components?appName=App1&sharedComponentName=paymentService-V1.1&changesetNumber=Chset-25" \ 
    --request DELETE \ 
    --header "Accept:application/json" \ 
    --user 'username':'password' 

Response:

    ""

## CdmApplicationsApi - GET
/sn_cdm/applications/deployables/exports/{export_id}/content {#ariaid-title4}

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](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-deploy-exports-status "Returns the current status of the specified configuration data export request.") 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

{#apps-GET-deploy-exports-content__entry__2}{#apps-GET-deploy-exports-content__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| 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](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-POST-deploy-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.") endpoint. |
[Table 13. Path parameters]

{#apps-GET-deploy-exports-content__entry__8}

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

{#apps-GET-deploy-exports-content__entry__12}

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

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-deploy-exports-content__entry__16}{#apps-GET-deploy-exports-content__accept-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
[Table 16. Request headers]

{#apps-GET-deploy-exports-content__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 17. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-deploy-exports-content__entry__24}{#apps-GET-deploy-exports-content__entry-200-status-code}{#apps-GET-deploy-exports-content__entry-400-status-code}{#apps-GET-deploy-exports-content__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 18. Status codes]

### Response body parameters (JSON or XML)

{#apps-GET-deploy-exports-content__entry__32}

| Name | Description |
|-|-|
| errors | Description of the errors encountered during export. Data type: String |
| export_id | Export request ID. Same as that passed into the endpoint. Data type: String |
| exporter_result | Content of the specified configuration data export. Data type: * JSON object: If the request was to export data in JSON format. * String: If the request was to export data in any other format. {#apps-GET-deploy-exports-content__ul_xk1_2j1_psb} |
| request_id | Export request ID. Same as that passed into the endpoint. Data type: String |
| state | Current state of the specified export. Value from state column in the CDM Request Queue \[sn_cdm_request_queue\] table. Possible values: * completed * error * in_progress * new * ready Data type: String |
[ ]

### cURL request

The following example requests the configuration data of an export request with the ID of
3ab14a7d53b1301096edddeeff7b12f.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/deployables/exports/3ab14a7d53b1301096edddeeff7b12f/content" \ 
    --request GET \ 
    --header "Accept:application/json" \
    --user 'username':'password' 

The following shows the possible return results.

    // Successful completion of the export request
    { 
      "result": { 
        "export_id": "3ab14a7d53b1301096edddeeff7b12f" 
        "exporter_result": "DEP1.COMP.cdi_1=cdi-1-value" 
      } 
    }

    // Response when an incorrect export_id is passed. Note: Status code is 200.
    { 
      "result": { 
        "request_id": "3ab14a7d53b1301096edddeeff7b12e", 
        "state": "error", 
        "errors": "Invalid requestId '3ab14a7d53b1301096edddeeff7b12fe'", 
        "export_id": "3ab14a7d53b1301096edddeeff7b12e" 
      } 
    }

## CdmApplicationsApi - GET
/sn_cdm/applications/deployables/exports/{export_id}/status {#ariaid-title5}

Returns the current status of the specified configuration data export
request.
Use the [CdmApplicationsApi - POST /sn_cdm/applications/deployables/exports](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-POST-deploy-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.") 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

{#apps-GET-deploy-exports-status__entry__2}{#apps-GET-deploy-exports-status__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| 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](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-POST-deploy-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.") endpoint. |
[Table 19. Path parameters]

{#apps-GET-deploy-exports-status__entry__8}

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

{#apps-GET-deploy-exports-status__entry__12}

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

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-deploy-exports-status__entry__16}{#apps-GET-deploy-exports-status__accept-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
[Table 22. Request headers]

{#apps-GET-deploy-exports-status__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 23. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-deploy-exports-status__entry__24}{#apps-GET-deploy-exports-status__entry-200-status-code}{#apps-GET-deploy-exports-status__entry-400-status-code}{#apps-GET-deploy-exports-status__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 24. Status codes]

### Response body parameters (JSON or XML)

{#apps-GET-deploy-exports-status__entry__32}

| Name | Description |
|-|-|
| errors | Description of the errors encountered during export. Data type: String |
| export_id | Export request ID. Same as that passed into the endpoint. Data type: String |
| exporter_result | Details about the associated error. Data type: Object |
| exporter_result.errors | Description of the error(s) encountered during export. Data type: Array |
| exporter_result.execution_id | Unique identifier for the exporter execution record. Located in the sn_cdm_exporter_execution table. Data type: String |
| exporter_result.state | Current state of the specified export. Located in the sn_cdm_exporter_execution table. Possible values: * complete * error * in_progress * new {#apps-GET-deploy-exports-status__ul_k3z_32r_ssb} Data type: String |
| request_id | Export request ID. Same as that passed into the endpoint. Data type: String |
| state | Current state of the specified export. Value from state column in the CDM Request Queue \[sn_cdm_request_queue\] table. Possible values: * completed * error * in_progress * new * ready Data type: String |
[ ]

### cURL request

The following example requests the status of an export with the ID of
3ab14a7d53b1301096edddeeff7b12f.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/deployables/exports/3ab14a7d53b1301096edddeeff7b12f/status" \ 
    --request GET \ 
    --header "Accept:application/json" \
    --user 'username':'password' 

The following are the possible return results.

    // Successful completion of the export request
    { 
      "result": { 
        "state": "completed", 
        "export_id": "3ab14a7d53b1301096edddeeff7b12f0" 
      } 
    }

    // Response when an incorrect export_id is passed. Note: Status code is 200.
    { 
      "result": { 
        "request_id": "3ac8e1b05311301096edddeeff7b123c", 
        "state": "error", 
        "errors": "Invalid requestId '3ac8e1b05311301096edddeeff7b123c'", 
        "export_id": "3ac8e1b05311301096edddeeff7b123c" 
      } 
    } 

    // Response when the export encounters an error. The exporter_result array contains the error information. Note: Status code is 200.
    { 
      "result": { 
        "state": "completed", 
        "export_id": "24536c3353f9301096edddeeff7b12b1", 
        "exporter_result": { 
          "execution_id": "81536c3353f9301096edddeeff7b129e", 
          "state": "failure", 
          "errors": [ 
            "Snapshot 'SNA-001-published-non_compliant' has not passed validation. All snapshots of deployable '/ApplicationA/deployables/DEP3' are required to pass validation" 
          ] 
        } 
      } 
    }

## CdmApplicationsApi - GET /sn_cdm/applications/shared_components {#ariaid-title6}

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

{#apps-GET-shared_components__entry__2}{#apps-GET-shared_components__version-not_optional-RESTAPI}

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

{#apps-GET-shared_components__entry__6}

| Name | Description |
|-|-|
| appName | Required. Name of the application whose list of shared components you want returned. Located in the CDM Application \[sn_cdm_application\] table. The type field of the application must be set to shared_library. Data type: String |
| withUpdatesOnly | Flag that indicates whether to only return shared components that have a new updated version available. Valid values: * true: Only return shared components that have a new updated version available. * false: Return all shared components used by the specified application. Default: false |
[Table 26. Query parameters]

{#apps-GET-shared_components__entry__12}

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

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-shared_components__entry__16}{#apps-GET-shared_components__accept-RESTAPI}

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

{#apps-GET-shared_components__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 29. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-shared_components__entry__24}{#apps-GET-shared_components__entry-200-status-code}{#apps-GET-shared_components__entry-400-status-code}{#apps-GET-shared_components__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 30. Status codes]

### Response body parameters

{#apps-GET-shared_components__entry__32}

| Name | Description |
|-|-|
| currentVersion | Current version of the CDM application. Data type: Integer |
| currentVersionName | Name of shared component version currently in use. Data type: String |
| description | Description of shared component. Data type: String |
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| name | Unique name of the shared component. Data type: String |
| sharedLibraryName | Name of shared library to which the shared component belongs. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| updateVersionName | Name of shared component version available for update. Data type: String |
[ ]

### 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".

    curl "https://instance-name.service-now.com/api/sn_cdm/applications/shared_components?updatesOnly=true&appName=App1" \ 
    --request GET \ 
    --header "Accept:application/json" \ 
    --user 'username':'password' 

Response:

    { 
      "result": [
        {
          "name": "Component_Name",
          "description": "",
          "sharedLibraryName": "Shared Library",
          "currentVersion": "2",
          "currentVersionName": "Component_A-v2.shc",
          "updateVersionName": "Component_A-v3.shc"
        } 
      ]
    }

## CdmApplicationsApi - GET
/sn_cdm/applications/shared_libraries/components/applications {#ariaid-title7}

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

{#apps-GET-shared_libs-comp-apps__entry__2}{#apps-GET-shared_libs-comp-apps__version-not_optional-RESTAPI}

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

{#apps-GET-shared_libs-comp-apps__entry__6}

| Name | Description |
|-|-|
| sharedComponentName | Required. Name of the shared component to include in the map. Located in the CDM Shared Component \[sn_cdm_shared_component\] table. Data type: String |
| sharedLibraryName | Required. Name of the shared library to include in the map. Located in the CDM Application \[sn_cdm_application\] table. The specified application must have the type field set to "shared_library". Data type: String |
[Table 32. Query parameters]

{#apps-GET-shared_libs-comp-apps__entry__12}

| Name | Description |
|-|-|
| None |   |
[Table 33. Request body 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](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-shared_libs-comp-apps__entry__16}{#apps-GET-shared_libs-comp-apps__accept-RESTAPI}

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

{#apps-GET-shared_libs-comp-apps__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 35. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-shared_libs-comp-apps__entry__24}{#apps-GET-shared_libs-comp-apps__entry-200-status-code}{#apps-GET-shared_libs-comp-apps__entry-400-status-code}{#apps-GET-shared_libs-comp-apps__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 36. Status codes]

### Response body parameters

{#apps-GET-shared_libs-comp-apps__entry__32}

| Name | Description |
|-|-|
| description | Description of application using shared component Data type: String |
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| managed_by_group | Comma-separated list of sys_ids of the groups that can manage the application. Data type: String |
| name | Unique name of the application using the component. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| sys_id | Sys_id of the application utilizing the shared component. Data type: String |
[ ]

### 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.

    curl "https://instance-name.service-now.com/api/sn_cdm/applications/shared_libraries/components/applications?sharedLibraryName=OracleG-Library-10&sharedComponentName=paymentService-V1.1" \ 
    --request GET \ 
    --header "Accept:application/json" \ 
    --user 'username':'password'

Response:

    {
      "result": {
        "component_name": [
          { 
            "name": "App Name",
            "description": "desc",
            "managed_by_group": null,
            "sys_id": "4e7808bb1b371110636e0fe0604bcb08"
          }, 
          {
            "name": "Config App",
            "description": "desc",
            "managed_by_group": null,
            "sys_id": "55a75cfb1b771110636e0fe0604bcb5c"
          },
          {
            "name": "Database App",
            "description": "desc",
            "managed_by_group": null,
            "sys_id": "2eb7503f1b771110636e0fe0604bcb06"
          }
        ]
      } 
    }

## CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id} {#ariaid-title8}

Returns the current status of the specified configuration data upload
request.

### URL format {#apps-GET-upload-status__section_isc_fy3_psb}

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

{#apps-GET-upload-status__entry__2}{#apps-GET-upload-status__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| upload_id | Sys_id of the upload request whose status to return. This value is returned by the various CdmApplications upload request endpoints. |
[Table 37. Path parameters]

{#apps-GET-upload-status__entry__8}

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

{#apps-GET-upload-status__entry__12}

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

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-upload-status__entry__16}{#apps-GET-upload-status__accept-JSON-only-entry-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Only supports application/json. |
[Table 40. Request headers]

{#apps-GET-upload-status__entry__20}

| Header | Description |
|-|-|
| None |   |
[Table 41. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-GET-upload-status__entry__24}{#apps-GET-upload-status__entry-200-status-code}{#apps-GET-upload-status__entry-400-status-code}{#apps-GET-upload-status__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 42. Status codes]

### Response body parameters (JSON or XML)

{#apps-GET-upload-status__entry__32}

| Name | Description |
|-|-|
| errors | Description of the error(s) encountered during upload. Data type: String |
| output | Description of the uploaded data or if an error occurred during the upload, an error message describing the error that was encountered. Data type: Array of String "output": { "auto_validate": "String", "cdm_application": "String", "committed_at": "String", "committed_by": "String", "description": "String", "last_conflict_detection_time": "String", "number": "String", "publish_option": "String", "snapshot_description": "String", "snapshot_name": "String", "state": "String", "sys_created_by": "String", "sys_id": "String", "title": "String" } |
| output.auto_validate | Indicates whether to invoke validation after the commit. Data type: String |
| output.cdm_application | Name of application under which the upload was performed. Data type: String |
| output.committed_at | Date and time that the uploaded content was committed. Data type: String |
| output.committed_by | Sys_id of the record of the entity that performed the commit. Data type: String |
| output.description | Not currently used. Data type: String |
| output.last_conflict_detection_time | Date and time conflict detection invocation. Data type: String |
| output.number | Unique number of the changeset. Data type: String |
| output.publish_option | Publish option for the associated configured snapshots. Valid values: * publish_none: Don't publish any snapshots. * publish_valid: Publish only those snapshots that pass validation after the commit. For additional information on publishing snapshots, see [Publish or unpublish a snapshot](https://www.servicenow.com/docs/access?context=cdm-snapshot-publish&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: String Default: publish_none Note: This option is only available if the value for the autoCommit parameter is true. |
| output.snapshot_description | Description of the associated snapshot. Data type: String |
| output.snapshot_name | Name of the associated snapshot. Data type: String |
| output.state | State of the upload content. Possible values: * blocked * checking_for_conflict * commit_failed * commit_in_progress * committed * open {#apps-GET-upload-status__ul_qhn_w4p_psb} Data type: String |
| output.sys_created_by | Sys_id of the entity that created the record. Data type: String |
| output.sys_id | Sys_id of the record containing the changeset. Data type: String |
| output.title | Title of changeset created as part of the upload. Data type: String |
| processing_state | Current processing state of the upload request. Possible values: * NOT_PROCESSED * PROCESSED {#apps-GET-upload-status__ul_gmt_2pp_psb} Data type: String |
| state | Current state of the upload request. Possible values: * completed * error * in_progress * new * ready {#apps-GET-upload-status__ul_ozn_bv5_xsb} |
| type | Type of upload request. Possible values: * commit * upload_and_commit {#apps-GET-upload-status__ul_l5m_x55_xsb} Data type: String |
| upload_id | Sys_id of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload. Data type: String |
[ ]

### cURL request

The following example show requesting the status for an upload with the ID of
5560a6895326301096edddeeff7b1230.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/upload-status/5560a6895326301096edddeeff7b1230" \ 
    --request GET \ 
    --header "Accept:application/json" \
    --user 'username':'password' 

The following are the possible return results.

    // Successful completion of the upload request
    { 
      "result": { 
        "type": "upload_and_commit", 
        "state": "completed", 
        "output": { 
          "sys_id": "be681dc95362301096edddeeff7b12ba", 
          "number": "Chset-102", 
          "title": "admin2021-09-10 08:09:07", 
          "description": null, 
          "committed_at": "2021-09-10 20:23:37", 
          "committed_by": "6816f79cc0a8016401c5a33be04be441", 
          "sys_created_by": "admin", 
          "state": "committed", 
          "publish_option": "publish_none", 
          "auto_validate": false, 
          "snapshot_name": null, 
          "snapshot_description": null, 
          "cdm_application": "Demo_App1631126164773", 
          "last_conflict_detection_time": "1631305417894" 
        }, 
        "processing_state": "PROCESSED", 
        "upload_id": "5560a6895326301096edddeeff7b1230"
      } 
    }

    // Response when an incorrect upload_id is passed. Note: Status code is 200.
    { 
      "result": { 
        "state": "error", 
        "errors": "Invalid requestId '5560a6895326301096edddeeff7b1240'", 
        "upload_id": "5560a6895326301096edddeeff7b1240" 
      } 
    } 

    // Response when the upload encounters an error. The exporter_result array contains the error information. Note: Status code is 200.
    { 
      "result": { 
        "type": "upload_and_commit", 
        "state": "error", 
        "output": "Error encountered during execution of request.\nError: Node 'dbSettings' of type 'sg_cdm_node_component' cannot create child 'dbSettings' of type 'sg_cdm_node_folder'", 
        "processing_state": "PROCESSED", 
        "upload_id": "272f8a415326301096edddeeff7b1232" 
      } 
    }

## CdmApplicationsApi - POST /sn_cdm/applications/deployables {#ariaid-title9}

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](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-POST-deploy-create "Creates one or more new deployables.") endpoint.

### URL format

Versioned URL:
/api/sn_cdm/{api_version}/applications/deployables

Default URL:
/api/sn_cdm/applications/deployables

### Supported request parameters

{#apps-POST-applications-deploys__entry__2}{#apps-POST-applications-deploys__version-not_optional-RESTAPI}

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

{#apps-POST-applications-deploys__entry__6}{#apps-POST-applications-deploys__cdm_apps-envType-entry}{#apps-POST-applications-deploys__cdm_apps-returnFields-entry}

| Name | Description |
|-|-|
| appName | Required. Name of an existing, active CDM application to associate with the deployable. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| envType | Required. Environment type for the deployable. Valid values (case-sensitive): * Development * Production * Test Note: The deployable environment type can't be changed after creation. Data type: String |
| name | Required. Name of the CDM deployable. Should not be more than 255 chars. Default allowed characters are 0-9, A-Z, a-z, _,-,., %, $, whitespace, :, #. Data type: String Maximum length: 255 characters Allowable characters: 0-9, A-Z, a-z, _, -, ., %, $, whitespace, :, and # |
| returnFields | List of fields to return as part of the response. Pass the record column names such as sys_id, sys_updated_by, or state. Data type: Array Default: All fields as determined by the endpoint |
[Table 44. Query parameters]

{#apps-POST-applications-deploys__entry__16}

| Name | Description |
|-|-|
| None |   |
[Table 45. Request body 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](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-applications-deploys__entry__20}{#apps-POST-applications-deploys__accept-JSON-only-entry-RESTAPI}{#apps-POST-applications-deploys__content_type-JSON-only-entry-RESTAPI}

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

{#apps-POST-applications-deploys__entry__26}

| Header | Description |
|-|-|
| None |   |
[Table 47. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-applications-deploys__entry__30}{#apps-POST-applications-deploys__entry-200-status-code}{#apps-POST-applications-deploys__entry-400-status-code}{#apps-POST-applications-deploys__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 48. Status codes]

### Response body parameters

{#apps-POST-applications-deploys__id_dkr_tdn_qtb__entry__2}{#apps-POST-applications-deploys__cdm_app_link-app-entry}{#apps-POST-applications-deploys__cdm_app_value-app-entry}{#apps-POST-applications-deploys__cdm_apps-error-entry}{#apps-POST-applications-deploys__cdm_dep-sys_created_by-row}{#apps-POST-applications-deploys__cdm_deps-sys_created_on-row}{#apps-POST-applications-deploys__cdm_dep-sys_updated_by-row}{#apps-POST-applications-deploys__cdm_dep-sys_updated_on-row}

| Name | Description |
|-|-|
| cdi_count | Number of configuration data items (CDIs) contained in the associated CDM application. Data type: Integer |
| cdi_usage | Percentage of the CDIs used by the deployable. Data type: Integer |
| cdm_app | CDM application object associated with the deployable. Data type: Object "cdm_app": { "link": "String", "value": "String" } |
| cdm_app.link | Call to use to access the CDM application record using the REST Table API. Data type: String |
| cdm_app.value | Sys_id of the associated CDM application record. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| cdm_ci | Application service object associated with the deployable. Data type: Object "cdm_ci": { "link": "String", "value": "String" } |
| cdm_ci.link | Call to use to access the application service record using the REST Table API. Data type: String |
| cdm_ci.value | Sys_id of the associated application service record. Located in the Configuration Item \[cmdb_ci\] table. Data type: String |
| description | Description of the generated CDM deployable. Data type: String |
| environment_type | Environment type of the deployable. Possible values: * Development * Production * Test Data type: String |
| error | Only returned if an error occurred during processing. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| name | Name of the CDM deployable. Data type: String |
| node | Details about the deployable node. Data type: Object "node": { "link": "String", "value": "String" } |
| node.link | Call to use to access the deployable node record using the REST Table API. Data type: String |
| node.value | Sys_id of the deployable node record. Located in the CDM Deployable \[sn_cdm_deployable\] table. Data type: String |
| snapshot_version_counter | Number of snapshots created for the deployable. Data type: Integer |
| state | Current state of the deployable. Possible values: * active * deleted Data type: String |
| sys_created_by | User name of the user that created the CDM deployable. For example, able.tuter. Data type: String |
| sys_created_on | Date and time when the CDM deployable was created. Format: YYYY-mm-DD hh:mm:ss Data type: String |
| sys_id | Sys_id of the created deployable. Located in the CDM Deployable \[sn_cdm_deployable\] table. Data type: String |
| sys_updated_by | User name of the user that last updated the CDM deployable. For example, able.tuter. Data type: String |
| sys_updated_on | Date and time when the CDM deployable was last updated. Format: YYYY-mm-DD hh:mm:ss Data type: String |
[ ]

{#apps-POST-applications-deploys__id_dkr_tdn_qtb}  

### cURL
request

The following code example shows how to create and associate a deployable to a CDM
application.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/deployables?name=Dep-1&returnFields=name%2Csys_id%2Cstate&appName=testApp&envType=Test" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --user 'username':'password1' 

Return results:

    { 
      "result": [ 
        { 
          "cmdb_ci": { 
            "value": "f5b9e00b53901110a1d3ddeeff7b12b8", 
            "link": "http://192.168.0.233:8080/api/now/table/cmdb_ci_service_auto/f5b9e00b53901110a1d3ddeeff7b12b8" 
          }, 
          "cdi_count": "0", 
          "snapshot_version_counter": "0", 
          "description": null, 
          "sys_updated_on": "2022-06-29 12:53:57", 
          "environment_type": "Test", 
          "node": { 
            "value": "7db9e00b53901110a1d3ddeeff7b12b6", 
            "link": "http://192.168.0.233:8080/api/now/table/sn_cdm_node/7db9e00b53901110a1d3ddeeff7b12b6" 
          }, 
          "sys_id": "39b9e00b53901110a1d3ddeeff7b12b7", 
          "sys_updated_by": "admin", 
          "cdm_app": { 
            "value": "62b517a953b70110a1d3ddeeff7b128c", 
            "link": "http://192.168.0.233:8080/api/now/table/sn_cdm_application/62b517a953b70110a1d3ddeeff7b128c" 
          }, 
          "sys_created_on": "2022-06-29 12:53:57", 
          "cdi_usage": "0", 
          "name": "Dep-2", 
          "state": "active", 
          "sys_created_by": "admin" 
        } 
      ] 
    }

## CdmApplicationsApi - POST /sn_cdm/applications/deployables/create {#ariaid-title10}

Creates one or more new deployables.
You can create one of two types of 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

{#apps-POST-deploy-create__entry__2}{#apps-POST-deploy-create__version-not_optional-RESTAPI}

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

{#apps-POST-deploy-create__entry__6}{#apps-POST-deploy-create__cdm_apps-envType-entry}

| Name | Description |
|-|-|
| appSysId | Required. Sys_id of an active CDM Application to associate with the deployables. Data type: String |
| autoConnect | Required. Flag that determines whether to automatically connect the newly created deployables to dynamically generated Application Models. Valid values: * true: Connect the newly created deployables to dynamically generated Application Models. * false: Just create the deployables. These deployables must be manually mapped to Application Models using the UI. {#apps-POST-deploy-create__ul_gdp_vwr_xsb} Data type: Boolean |
| envType | Required. Environment type for the deployable. Valid values (case-sensitive): * Development * Production * Test Note: The deployable environment type can't be changed after creation. Data type: String |
| quantity | Required. Number of deployables to create. Data type: Number |
[Table 50. Query parameters]

{#apps-POST-deploy-create__entry__16}

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

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-deploy-create__entry__20}{#apps-POST-deploy-create__accept-JSON-only-entry-RESTAPI}{#apps-POST-deploy-create__content_type-JSON-only-entry-RESTAPI}

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

{#apps-POST-deploy-create__entry__26}

| Header | Description |
|-|-|
| None |   |
[Table 53. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-deploy-create__entry__30}{#apps-POST-deploy-create__entry-200-status-code}{#apps-POST-deploy-create__entry-500-status-code}

| 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. |
[Table 54. Status codes]

### Response body parameters

{#apps-POST-deploy-create__entry__36}

| Name | Description |
|-|-|
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| result | Sys_ids of the created deployables. Data type: Array |
| status | Error status of the request. Possible values: failure Data type: String |
[ ]

### cURL request

The following example shows how to create a single deployable and associate it with and
existing CDM application.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/deployables/create?envType=Production&appSysId=5e118055b712011054c1e5a6ce11a9d4&quantity=5&autoConnect=true" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:application/json" \
    --user 'username':'password' 

The following shows the possible responses to this call, both as a success and an
error.

    // Successful completion of the upload request
    {
      "result": [
        "8ba43a3db7d6011054c1e5a6ce11a9a4",
        "93a47a3db7d6011054c1e5a6ce11a90d",
        "dba47a3db7d6011054c1e5a6ce11a91d",
        "6fa47a3db7d6011054c1e5a6ce11a921",
        "efa47a3db7d6011054c1e5a6ce11a925"
      ]
    } 

    // Error response
    {
      "error": {
        "message": "Error: CDM Application with SysID 5e118055b712011054c1e5a6ce11a9d1 was not found. (sys_script_include.8cf0fbf453626010a1d3ddeeff7b12fe.script; line 211)",
        "detail": ""
      },
      "status": "failure"
    }

## CdmApplicationsApi - POST /sn_cdm/applications/deployables/exports {#ariaid-title11}

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](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-deploy-exports-status "Returns the current status of the specified configuration data export request.") 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](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-deploy-exports-content "Returns the content associated with a specified configuration data export request.") 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](https://www.servicenow.com/docs/access?context=cdm-deployable-define&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US).  
Note:  
Snapshots cannot exceed 10,000 configuration data items (CDIs) per deployable or 100,000 CDIs per application.

### URL format

Versioned URL:
/api/sn_cdm/{api_version}/applications/deployables/exports

Default URL:
/api/sn_cdm/applications/deployables/exports

### Supported request parameters

{#apps-POST-deploy-exports__entry__2}{#apps-POST-deploy-exports__version-not_optional-RESTAPI}

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

{#apps-POST-deploy-exports__entry__6}

| Name | Description |
|-|-|
| additionalDeployables | Non-primary deployables to export. Data type: Array of Objects "additionalDeployables": [ { "app_name": "String", "deployable_name": "String" } ] For example: `[{'app_name':'TestApp', "deployable_name:'DEP-1'}]` Default: Empty array - \[\] |
| additionalDeployables.app_name | Required if additionalDeployables array is specified. Name of the application associated with the deployable whose configuration data you want to export. Data type: String |
| additionalDeployables.deployable_name | Required if additionalDeployables array is specified. Name of the non-primary deployable whose configuration data you want to export. Data type: String |
| appName | Required. Name of the application whose configuration data you want to export. Data type: String |
| args | A JSON object containing key-value pairs for custom arguments. Data type: Object |
| dataFormat | Output format of the exported data. Valid values (case-sensitive): * ini * json * properties * raw (Data is returned in String format) * xml * yaml Data type: String Default: json |
| deployableName | Required. Name of the deployable whose configuration data you want to export. Data type: String |
| exporterName | Required. Name of the exporter to use to export the snapshot data. Exporters are custom to the implementer. For details on creating a custom exporter, see [Create a custom exporter](https://www.servicenow.com/docs/access?context=cdm-exporter-create-custom&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: String |
| restrictExport | Flag that indicates whether the endpoint validates snapshots when exporting the data. Valid values: * true: Validate snapshots. * false: Do not validate snapshots. Data type: Boolean Default: false |
| snapshotName | Name of the snapshot to export. This can only be one of the snapshot names associated with the deployable as specified in deployableName or additionalDeployables.deployable_name. Default: The endpoint exports the latest published snapshot. If there is not a published snapshot, the system throws the error "Failed to find latest published snapshot for deployable '{0}'" |
[Table 56. Query parameters]

{#apps-POST-deploy-exports__entry__28}

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

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-deploy-exports__entry__32}{#apps-POST-deploy-exports__accept-JSON-only-entry-RESTAPI}{#apps-POST-deploy-exports__content_type-JSON-only-entry-RESTAPI}

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

{#apps-POST-deploy-exports__entry__38}

| Header | Description |
|-|-|
| None |   |
[Table 59. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-deploy-exports__entry__42}{#apps-POST-deploy-exports__entry-200-status-code}{#apps-POST-deploy-exports__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. Possible error messages: * Error: Missing required param 'appName' * Error: User does not have necessary permission to create Export request * Error: Invalid Boolean value (\<xyz\>). |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 60. Status codes]

### Response body parameters

{#apps-POST-deploy-exports__entry__50}{#apps-POST-deploy-exports__cdm_apps-stat-error}{#apps-POST-deploy-exports__cdm_apps-stat-error_detail-row}{#apps-POST-deploy-exports__cdm_apps-stat-error_messaage-row}

| Name | Description |
|-|-|
| error | Details about the error that occurred. "error": { "detail": "String", "message": "String" } Data type: Array |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| export_id | Unique identifier of the export request. Use this ID when calling the [CdmApplicationsApi - GET /sn_cdm/applications/deployables/exports/{export_id}/status](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-deploy-exports-status "Returns the current status of the specified configuration data export request.") endpoint to check the current status of the export request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
[ ]

### 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.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/deployables/exports?appName=TestAppA&args=%7B%22arg_A_required%22%20%3A%20%22value%20A%22%7D&exporterName=exporter-1-primary_deployable&deployableName=DEP1" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:application/json" \
    --user 'username':'password' 

Returns the unique identifier of the export request.

    { 
      "result": {
        "export_id": "64b5f79f5379301096edddeeff7b12eb" 
      } 
    }

## CdmApplicationsApi - POST /sn_cdm/applications/shared_components {#ariaid-title12}

Associates the specified shared component to the application within a specified
changeset.
The CDM Admin role is required to access this endpoint.  
Note:  
The specified shared component must have an associated published version (snapshot).

### URL format

Versioned URL:
/api/sn_cdm/{api_version}/applications/shared_components

Default URL:
/api/sn_cdm/applications/shared_components

### Supported request parameters

{#apps-POST-shared_components__entry__2}{#apps-POST-shared_components__version-not_optional-RESTAPI}

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

{#apps-POST-shared_components__entry__6}{#apps-POST-shared_components__cdm_apps-returnFields-entry}

| Name | Description |
|-|-|
| appName | Required. Name of the application to associate with the shared component. Data type: String |
| changesetNumber | Required. Unique identifier of the changeset associated with the component. Data type: String |
| returnFields | List of fields to return as part of the response. Pass the record column names such as sys_id, sys_updated_by, or state. Data type: Array Default: All fields as determined by the endpoint |
| sharedComponentName | Required. Name of the shared component to associate with the specified application. Located in the CDM Shared Component \[sn_cdm_shared_component\] table. Data type: String |
| sharedLibraryName | Required. Name of the shared library under which to create the component. Located in the CDM Application \[sn_cdm_application\] table. The shared library must have the following fields defined as follows: * state = active * available = true * type = shared_library Data type: String |
[Table 62. Query parameters]

{#apps-POST-shared_components__entry__18}

| Name | Description |
|-|-|
| None |   |
[Table 63. Request body 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](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-shared_components__entry__22}{#apps-POST-shared_components__accept-RESTAPI}

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

{#apps-POST-shared_components__entry__26}

| Header | Description |
|-|-|
| None |   |
[Table 65. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-shared_components__entry__30}{#apps-POST-shared_components__entry-200-status-code}{#apps-POST-shared_components__entry-500-status-code}

| 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. |
[Table 66. Status codes]

### 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.
{#apps-POST-shared_components__entry__38}{#apps-POST-shared_components__changeset-node-editor-entry}{#apps-POST-shared_components__changeset_link-node-editor-entry}{#apps-POST-shared_components__changeset_value-node-editor-entry}{#apps-POST-shared_components__cdm_apps-error-entry}{#apps-POST-shared_components__cdm_apps-error_detail-entry}{#apps-POST-shared_components__cdm_apps-error_message-entry}{#apps-POST-shared_components__cdm_dep-sys_created_by-row}{#apps-POST-shared_components__cdm_deps-sys_created_on-row}{#apps-POST-shared_components__sys_id-node-editor-entry}{#apps-POST-shared_components__cdm_dep-sys_updated_by-row}{#apps-POST-shared_components__cdm_dep-sys_updated_on-row}

| Name | Description |
|-|-|
| changeset_id | Details of the changeset record associated with the node. Data type: Object "changeset_id": { "link": "String", "value": "String" } |
| changeset_id.link | Call syntax for querying this changeset record using the Table REST API. Data type: String |
| changeset_id.value | Unique identifier of the changeset record. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String |
| description | Description of the CDM node. Data type: String |
| error | Only returned if an error occurred during processing. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Details about the error that occurred. Data type: String |
| error.message | Message that provides an overview of the error. Data type: String |
| linked_to | ID of the main node associated with the shared component. Data type: String |
| linked_to_version | Details of the CDM snapshot record associated with the node. Data type: Object "linked_to_version": { "link": "String", "value": "String" } |
| linked_to_version.link | Call syntax for querying this version record using the Table REST API. Data type: String |
| linked_to_version.value | Sys_id of the version record. Data type: String |
| main | Flag that indicates whether the associated snapshot was published. Valid values: * true: Snapshot was published. * false: Snapshot was not published. |
| main_id | Unique ID of the newly created main node. Data type: String |
| main_id_encoded | Encoded ID of the newly created main node. Data type: String |
| name | Name of the CDM node. Data type: String |
| node | Sys_id of the shared component node. Data type: String |
| node_path | Path to the new linked node created when adding the shared component. Data type: String |
| status | Status of the node. Possible values: New Data type: String |
| sys_created_by | User name of the user that create the CDM node. For example, able.tuter. Data type: String |
| sys_created_on | Date and time when the CDM node was created. Format: YYYY-mm-DD hh:mm:ss Data type: String |
| sys_id | Sys_id of the node. Located in the CDM Node \[sn_cdm_node\] table. Data type: String |
| sys_updated_by | User name of the user that last updated the CDM node. For example, able.tuter. Data type: String |
| sys_updated_on | Date and time when the CDM node was last updated. Format: YYYY-mm-DD hh:mm:ss Data type: String |
| type | Node type. Data type: String |
[ ]

### 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.

    curl "https://instance.servicenow.com/api/sn_cdm/applications/shared_components?appName=App1&changesetNumber=Chset-20&sharedLibraryName=OracleG-Library-10&sharedComponentName=paymentService-V1.1" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --user 'username':'password'

Response:

    { 
      "result": { 
        "changeset_id": { 
          "value": "74b7ff6fc33711100c257e2cc840dd6b", 
          "link": "http://instance.servicenow.com/api/now/table/sn_cdm_changeset/74b7ff6fc33711100c257e2cc840dd6b" 
        }, 
        "node_path": "!,0!,1!/D", 
        "description": null, 
        "sys_updated_on": "2022-12-22 17:07:29", 
        "type": "sn_cdm_node_linked_shared_component", 
        "sys_class_name": "sn_cdm_node", 
        "sys_id": "ff8b37ebc3b711100c257e2cc840ddba", 
        "sys_updated_by": "admin", 
        "previous_version": null, 
        "sys_created_on": "2022-12-22 17:07:29", 
        "value": null, 
        "effective_from": null, 
        "linked_to": "210", 
        "sys_created_by": "admin", 
        "restricted_to": null, 
        "linked_to_version": { 
          "value": "581fc3e9c3b311100c257e2cc840dd17", 
          "link": "http://instance.servicenow.com/api/now/table/sn_cdm_snapshot/581fc3e9c3b311100c257e2cc840dd17" 
        }, 
        "level": "2", 
        "conflict_type": null, 
        "main_id": "483",
        "effective_to": null,
        "secure_value": null, 
        "node_classifier": "/application/components", 
        "main_id_encoded": "/D",
        "name": "LIB2_C",
        "position": null,
        "reason_for_conflict": null,
        "system_folder": false,
        "status": "new",
        "conflict": false
      } 
    }

## CdmApplicationsApi - POST /sn_cdm/applications/uploads/components {#ariaid-title13}

Submits a request to upload the passed-in configuration data for a specific component,
within the system components folder, for the specified application.
This endpoint returns the ID of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload.  
Note:  
The maximum default upload content size is 2 MB. You can modify this default by updating the property sn_cdm.max_allowed_upload_file_size.

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.

Note:  
This upload method cannot be used to modify nodes. Use the alternative [CdmApplicationsApi - POST sn_cdm/applications/uploads/components/file](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-POST-uploads_components_file "Uploads files as part of the Configuration Data Model (CDM) to the components folder.") method to modify nodes.

### URL format

Versioned URL:
/api/sn_cdm/{api_version}/applications/uploads/components

Default URL:
/api/sn_cdm/applications/uploads/components

### Supported request parameters

{#apps-POST-uploads-components__entry__2}{#apps-POST-uploads-components__version-not_optional-RESTAPI}

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

{#apps-POST-uploads-components__id_plp_1vh_psb__entry__2}{#apps-POST-uploads-components__cdm_apps-appName-row}{#apps-POST-uploads-components__cdm_apps-autoCommit-row}{#apps-POST-uploads-components__cdm_apps-autoDelete-row}{#apps-POST-uploads-components__cdm_apps-autoValidate-row}{#apps-POST-uploads-components__cdm_apps-changesetNumber-row}{#apps-POST-uploads-components__cdm_apps-dataFormat-row}{#apps-POST-uploads-components__cdm_app-dataFormAtt-entry}{#apps-POST-uploads-components__cdm_app-dataFormAtt_containsHeaders-entry}{#apps-POST-uploads-components__cdm_app-dataFormAtt_delimeter-entry}{#apps-POST-uploads-components__cdm_app-dataFormAtt_headers-entry}{#apps-POST-uploads-components__cdm_app-dataFormAtt_securedHeaders-entry}{#apps-POST-uploads-components__cdm_apps-deleteRedundantOverrides-row}{#apps-POST-uploads-components__cdm_apps-fileName-row}{#apps-POST-uploads-components__cdm_apps-fileNodeName-row}{#apps-POST-uploads-components__cdm_apps-identifierKeys-row}{#apps-POST-uploads-components__cdm_apps-ignoreAttributes-row}{#apps-POST-uploads-components__cdm_apps-namePath-row}{#apps-POST-uploads-components__cdm_apps-sharedLibraryName-row}

| Name | Description |
|-|-|
| appName | Name of the application to associate with the configuration data. This application must be in the active state. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| autoCommit | Flag that indicates whether the changeset identified in the changesetNumber parameter is committed to the data model after upload. Valid values: * true: Changeset is committed after upload. * false: Changeset isn't committed after upload. Data type: Boolean Default: false |
| autoDelete | Flag that indicates whether the existing nodes, that aren't part of the upload content, are deleted after the processing is complete. Valid values: * true: Automatically delete existing nodes. * false: Don't automatically delete existing nodes. Data type: Boolean Default: false |
| autoValidate | Flag that indicates whether the snapshots created when committed are validated. Valid values: * true: Validate the snapshots. * false: Don't validate the snapshots. Note: This option is only available if the autoCommit parameter is <kbd class="ph userinput">true</kbd>. Data type: Boolean Default: false |
| changesetNumber | String that uniquely identifies the [changeset](https://www.servicenow.com/docs/access?context=cdm-changesets-version-control&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US) associated with the application, such as Chset-102. This changeset must be in the "Open" state. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String Default: Creates a changeset to use. The changeset details are returned as part of the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") results. |
| dataFormat | Required. Format of the configuration data. Valid values: * csv * ini * json * properties * raw * xml * yaml Data type: String |
| dataFormatAttributes | Only supported when the dataFormat parameter is set to <kbd class="ph userinput">csv</kbd>. Attributes that define the CSV data format. For additional information, see [Parsing of CSV files in CDM](https://www.servicenow.com/docs/access?context=cdm-parsing-csv-file&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: Object "dataFormatAttributes" { "containsHeader": Boolean, "delimeter": "String" "headers": [Array], "securedHeaders": [Array] } |
| dataFormatAttributes.containsHeaders | Flag that indicates whether the data contains a header row. Valid values: * true: Data contains a header row. The first row in the data is considered the header row. * false: Data doesn't contain a header row. You must pass the header information in the dataFormatAttributes.headers parameter. Data type: Boolean Default: false |
| dataFormatAttributes.delimeter | Character to use to delineate fields within the data. Data type: String Default: Comma "," |
| dataFormatAttributes.headers | Required if dataFormatAttributes.containsHeaders parameter is <kbd class="ph userinput">false</kbd>. Fields in the data that comprise the header. These headers are converted to the key names of the CDIs in the JSON format. The number of headers must match the number of record fields. Data type: Array Default: Empty array |
| dataFormatAttributes.securedHeaders | Fields in the data that are secure fields and must be encrypted in the data uploaded to CDM. The name of the secured headers must match the name of the headers in the headers attribute or data file. These fields are stored in a column of type Password (2 Way Encrypted). Note: You can only secure fields using this attribute. You can't unsecure the secured fields. Data type: Array Default: Empty array |
| deleteRedundantOverrides | Flag that indicates whether to create an override where redundant values are present. Valid values: * true: If redundant values are present, an override isn't created. * false: If redundant values are present, proceeds with an override. Default: true |
| fileName | Name of the file to upload. This name can differ from than the actual file name and contain the file extension. For example, .txt/.scv/.jar. The fileName value is applied when downloading the file. Data type: String |
| fileNodeName | Name of the file node. This file name is used in the configuration data when exporting it. This name doesn't require a file extension nor does it affect the download. Data type: String |
| identifierKeys | List of names that indicate which key in an array child to use to identify the same node. For example, if you're uploading: [ {"name" : "Allan, "city" : "Paris"}, {"name" : "Karen, "city" : "Sydney"} ] in the following existing model: [ {"name" : "Karen, "city" : "Manila"}, {"name" : "Allan, "city" : "Brussels"} ] and you set identifierKeys to <kbd class="ph userinput">name</kbd>, it produces the following output: [ {"name" : "Karen, "city" : "Sydney"}, {"name" : "Allan, "city" : "Paris"} ] Otherwise, it produces the following output: [ {"name" : "Karen, "city" : "Manila"}, {"name" : "Allan, "city" : "Brussels"}, {"name" : "Allan, "city" : "Paris"}, {"name" : "Karen, "city" : "Sydney"} ] Data type: Array of Strings |
| ignoreAttributes | Flag that indicates whether the given data format supports attributes (currently only XML). Valid values: * true: If the given data format supports attributes, any attributes in the input data are skipped during the upload. * false: If the given data format supports attributes, any attributes in the input data are included in the upload. {#apps-POST-uploads-components__ul_egn_4q4_1yb} Data type: Boolean Default: false |
| namePath | Path of the targeted node under which the configuration data should be uploaded. This path is relative to the components, collection, or deployable folder (depending on the endpoint being called). You can pass the name path in any of the following formats. For example, to define the name path for the node `testApp/deployables/Development1/cdi1`: * Backslash format: testApp/deployables/Development1/cdi1 Note: If your node name contains a backslash ("/"), you can't use this format. * Backend name path with replacement characters: testApp�deployables�Development1�cdi1 * Array: \['testApp','deployables','Development1','cdi1'\] {#apps-POST-uploads-components__cdm_apps-namePath-ul} Note: If the specified component doesn't exist at the specified path, the system automatically creates the component at the specified path and then uploads the data. Data type: String |
| sharedLibraryName | Required. Name of the shared library where the component to delete is located. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
[Table 68. Query parameters]

{#apps-POST-uploads-components__id_plp_1vh_psb} {#apps-POST-uploads-components__id_lx4_bvh_psb__entry__2}{#apps-POST-uploads-components__cdm_apps-var_up_data-entry}

| 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. |
[Table 69. Request body parameters (XML or JSON)]

{#apps-POST-uploads-components__id_lx4_bvh_psb}

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads-components__id_trg_k25_2wb__entry__2}{#apps-POST-uploads-components__accept-JSON-only-entry-RESTAPI}

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

{#apps-POST-uploads-components__id_trg_k25_2wb} {#apps-POST-uploads-components__entry__54}

| Header | Description |
|-|-|
| None |   |
[Table 71. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads-components__id_vvq_4wh_psb__entry__2}{#apps-POST-uploads-components__entry-200-status-code}{#apps-POST-uploads-components__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad request. Upload request has been rejected. Possible issues: * Size of configuration payload is greater that the allowed maximum - 2 MB by default. * Required parameters are missing from the call. {#apps-POST-uploads-components__ul_kmn_gkh_psb} |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 72. Status codes]

{#apps-POST-uploads-components__id_vvq_4wh_psb}

### Response body parameters (JSON or XML)

{#apps-POST-uploads-components__id_b4z_nwh_psb__entry__2}{#apps-POST-uploads-components__cdm_apps-stat-error}{#apps-POST-uploads-components__cdm_apps-stat-error_detail-row}{#apps-POST-uploads-components__cdm_apps-stat-error_messaage-row}{#apps-POST-uploads-components__cdm_apps-stat-error_status-row}{#apps-POST-uploads-components__cdm_apps-upload_id-row}

| Name | Description |
|-|-|
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| upload_id | Sys_id of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload. Data type: String |
[ ]

{#apps-POST-uploads-components__id_b4z_nwh_psb}  

### cURL request

The following example shows an upload request for the application
Demo_App1631126164773.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/uploads/components?namePath=%2FSettings%2FdbSettings&dataFormat=json&appName=Demo_App1631126164773&changesetNumber=Chset-8&autoCommit=false&publishOption=publish_none&autoValidate=false&autoDelete=true" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:text/plain" \ 
    --data "{
      \"dbIPAddress\": \"10.10.10.110\",
      \"dbPort\": \"8080\",
      \"dbConnectionString\": \"admin:admin server1.xyz.com:8080 dbName_payments\",
      \"dbConnectionStringBackup\": \"admin:admin server2.xyz.com dbName_payments_backup\
    "}" \ 
    --user 'username':'password' 

The following return results show both a successful and an error response for this
request.

    // Successful completion of the upload request
    { 
      "result": { 
        "upload_id": "ec1f71f45322301096edddeeff7b12b3" 
      } 
    } 

    // Error response. Payload is too large.
    { 
      "error": { 
        "message": "Size of uploaded data:6853632.0(bytes) is greater than max allowed upload limit of 2097152.0(bytes)", 
        "detail": "" 
      },
      "status": "failure"
    }

## CdmApplicationsApi - POST sn_cdm/applications/uploads/components/file {#ariaid-title14}

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

{#apps-POST-uploads_components_file__table_rgl_tbt_byb__entry__2}{#apps-POST-uploads_components_file__version-not_optional-RESTAPI}

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

{#apps-POST-uploads_components_file__table_rgl_tbt_byb} {#apps-POST-uploads_components_file__cdm_app-upload_query_parms-table__entry__2}{#apps-POST-uploads_components_file__publish_option-changeset-entry}

| Name | Description |
|-|-|
| appName | Name of the application to associate with the configuration data. This application must be in the active state. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| autoCommit | Flag that indicates whether the changeset identified in the changesetNumber parameter is committed to the data model after upload. Valid values: * true: Changeset is committed after upload. * false: Changeset isn't committed after upload. Data type: Boolean Default: false |
| autoValidate | Flag that indicates whether the snapshots created when committed are validated. Valid values: * true: Validate the snapshots. * false: Don't validate the snapshots. Note: This option is only available if the autoCommit parameter is <kbd class="ph userinput">true</kbd>. Data type: Boolean Default: false |
| changesetNumber | String that uniquely identifies the [changeset](https://www.servicenow.com/docs/access?context=cdm-changesets-version-control&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US) associated with the application, such as Chset-102. This changeset must be in the "Open" state. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String Default: Creates a changeset to use. The changeset details are returned as part of the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") results. |
| fileName | Name of the file to upload. This name can differ from than the actual file name and contain the file extension. For example, .txt/.scv/.jar. The fileName value is applied when downloading the file. Data type: String |
| fileNodeName | Name of the file node. This file name is used in the configuration data when exporting it. This name doesn't require a file extension nor does it affect the download. Data type: String |
| namePath | Path of the targeted node under which the configuration data should be uploaded. This path is relative to the components, collection, or deployable folder (depending on the endpoint being called). You can pass the name path in any of the following formats. For example, to define the name path for the node `testApp/deployables/Development1/cdi1`: * Backslash format: testApp/deployables/Development1/cdi1 Note: If your node name contains a backslash ("/"), you can't use this format. * Backend name path with replacement characters: testApp�deployables�Development1�cdi1 * Array: \['testApp','deployables','Development1','cdi1'\] {#apps-POST-uploads_components_file__cdm_apps-namePath-ul} Note: If the specified component doesn't exist at the specified path, the system automatically creates the component at the specified path and then uploads the data. Data type: String |
| publishOption | Publish option for the associated configured snapshots. Valid values: * publish_none: Don't publish any snapshots. * publish_valid: Publish only those snapshots that pass validation after the commit. For additional information on publishing snapshots, see [Publish or unpublish a snapshot](https://www.servicenow.com/docs/access?context=cdm-snapshot-publish&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: String Default: publish_none Note: This option is only available if the value for the autoCommit parameter is true. |
[Table 74. Query parameters]

{#apps-POST-uploads_components_file__cdm_app-upload_query_parms-table} {#apps-POST-uploads_components_file__table_j22_fgm_2yb__entry__2}

| 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](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718101). Data type: String/stream |
[Table 75. Request body parameters (XML or JSON)]

{#apps-POST-uploads_components_file__table_j22_fgm_2yb}

### Headers {#apps-POST-uploads_components_file__section_cxs_mvr_byb}

{#apps-POST-uploads_components_file__table_bd2_pqs_byb__entry__2}{#apps-POST-uploads_components_file__accept-RESTAPI}

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

{#apps-POST-uploads_components_file__table_bd2_pqs_byb} {#apps-POST-uploads_components_file__table_exs_mvr_byb__entry__2}

| Header | Description |
|-|-|
| None |   |
[Table 77. Response headers]

{#apps-POST-uploads_components_file__table_exs_mvr_byb}

### Status codes {#apps-POST-uploads_components_file__section_mtw_2vr_byb}

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads_components_file__id_cdq_fft_byb__entry__2}{#apps-POST-uploads_components_file__entry-200-status-code}{#apps-POST-uploads_components_file__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad request. Upload request has been rejected. Possible issues: * Size of configuration payload is greater that the allowed maximum - 2 MB by default. * Required parameters are missing from the call. {#apps-POST-uploads_components_file__ul_kmn_gkh_psb} |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 78. Status codes]

{#apps-POST-uploads_components_file__id_cdq_fft_byb}

### Response body parameters (JSON or XML) {#apps-POST-uploads_components_file__section_sbq_2bx_1yb}

{#apps-POST-uploads_components_file__id_af3_kft_byb__entry__2}{#apps-POST-uploads_components_file__cdm_apps-stat-error}{#apps-POST-uploads_components_file__cdm_apps-stat-error_detail-row}{#apps-POST-uploads_components_file__cdm_apps-stat-error_messaage-row}{#apps-POST-uploads_components_file__cdm_apps-stat-error_status-row}{#apps-POST-uploads_components_file__cdm_apps-upload_id-row}

| Name | Description |
|-|-|
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| upload_id | Sys_id of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload. Data type: String |
[ ]

{#apps-POST-uploads_components_file__id_af3_kft_byb}  

### cURL request

The following example shows how to upload a content to a text file.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/uploads/components/file?autoValidate=true&appName=testApp&namePath=testComponent%2FfilesFolder&fileName=testFileNodeName.txt&publishOption=publish_valid&changesetNumber=Chset-108&autoCommit=true&fileNodeName=testFile.txt" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:text/plain" \ 
    --data "This is sample content that will be uploaded to a plain text file."\ 
    --user 'username':'password' 

The following return results show both a successful and an error response for this request.

    // Successful completion of the upload request
    { 
      "result": { 
        "upload_id": "ec1f71f45322301096edddeeff7b12b3" 
      } 
    } 

    // Error response. Payload is too large.
    { 
      "error": { 
        "message": "Could not find active application with name: 'testApp' of type application", 
        "detail": "" 
      },
      "status": "failure"
    }

## CdmApplicationsApi - POST /sn_cdm/applications/uploads/components/vars {#ariaid-title15}

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.

Note:  
The maximum default upload content size is 2 MB. You can modify this default by updating the property sn_cdm.max_allowed_upload_file_size.

### URL format {#apps-POST-uploads-components-var__section_xgv_syh_psb}

Versioned URL:
/api/sn_cdm/{api_version}/applications/uploads/components/vars

Default URL:
/api/sn_cdm/applications/uploads/components/vars

### Supported request parameters

{#apps-POST-uploads-components-var__entry__2}{#apps-POST-uploads-components-var__version-not_optional-RESTAPI}

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

{#apps-POST-uploads-components-var__id_ey4_w13_psb__entry__2}{#apps-POST-uploads-components-var__cdm_apps-dataFormat-row}

| Name | Description |
|-|-|
| appName | Name of the application to associate with the configuration data. This application must be in the active state. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| autoCommit | Flag that indicates whether the changeset identified in the changesetNumber parameter is committed to the data model after upload. Valid values: * true: Changeset is committed after upload. * false: Changeset isn't committed after upload. Data type: Boolean Default: false |
| autoDelete | Flag that indicates whether the existing nodes, that aren't part of the upload content, are deleted after the processing is complete. Valid values: * true: Automatically delete existing nodes. * false: Don't automatically delete existing nodes. Data type: Boolean Default: false |
| autoValidate | Flag that indicates whether the snapshots created when committed are validated. Valid values: * true: Validate the snapshots. * false: Don't validate the snapshots. Note: This option is only available if the autoCommit parameter is <kbd class="ph userinput">true</kbd>. Data type: Boolean Default: false |
| changesetNumber | String that uniquely identifies the [changeset](https://www.servicenow.com/docs/access?context=cdm-changesets-version-control&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US) associated with the application, such as Chset-102. This changeset must be in the "Open" state. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String Default: Creates a changeset to use. The changeset details are returned as part of the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") results. |
| dataFormat | Required. Format of the configuration data. Valid values: * ini * json * properties * raw * xml * yaml Data type: String |
| deleteRedundantOverrides | Flag that indicates whether to create an override where redundant values are present. Valid values: * true: If redundant values are present, an override isn't created. * false: If redundant values are present, proceeds with an override. Default: true |
| fileName | Name of the file to upload. This name can differ from than the actual file name and contain the file extension. For example, .txt/.scv/.jar. The fileName value is applied when downloading the file. Data type: String |
| fileNodeName | Name of the file node. This file name is used in the configuration data when exporting it. This name doesn't require a file extension nor does it affect the download. Data type: String |
| identifierKeys | List of names that indicate which key in an array child to use to identify the same node. For example, if you're uploading: [ {"name" : "Allan, "city" : "Paris"}, {"name" : "Karen, "city" : "Sydney"} ] in the following existing model: [ {"name" : "Karen, "city" : "Manila"}, {"name" : "Allan, "city" : "Brussels"} ] and you set identifierKeys to <kbd class="ph userinput">name</kbd>, it produces the following output: [ {"name" : "Karen, "city" : "Sydney"}, {"name" : "Allan, "city" : "Paris"} ] Otherwise, it produces the following output: [ {"name" : "Karen, "city" : "Manila"}, {"name" : "Allan, "city" : "Brussels"}, {"name" : "Allan, "city" : "Paris"}, {"name" : "Karen, "city" : "Sydney"} ] Data type: Array of Strings |
| ignoreAttributes | Flag that indicates whether the given data format supports attributes (currently only XML). Valid values: * true: If the given data format supports attributes, any attributes in the input data are skipped during the upload. * false: If the given data format supports attributes, any attributes in the input data are included in the upload. {#apps-POST-uploads-components-var__ul_egn_4q4_1yb} Data type: Boolean Default: false |
| namePath | Path of the targeted node under which the configuration data should be uploaded. This path is relative to the components, collection, or deployable folder (depending on the endpoint being called). You can pass the name path in any of the following formats. For example, to define the name path for the node `testApp/deployables/Development1/cdi1`: * Backslash format: testApp/deployables/Development1/cdi1 Note: If your node name contains a backslash ("/"), you can't use this format. * Backend name path with replacement characters: testApp�deployables�Development1�cdi1 * Array: \['testApp','deployables','Development1','cdi1'\] {#apps-POST-uploads-components-var__cdm_apps-namePath-ul} Note: If the specified component doesn't exist at the specified path, the system automatically creates the component at the specified path and then uploads the data. Data type: String |
| sharedLibraryName | Required. Name of the shared library where the component to delete is located. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
[Table 80. Query parameters]

{#apps-POST-uploads-components-var__id_ey4_w13_psb} {#apps-POST-uploads-components-var__id_x4h_y13_psb__entry__2}{#apps-POST-uploads-components-var__cdm_apps-var_up_data-entry}

| 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. |
[Table 81. Request body parameters (XML or JSON)]

{#apps-POST-uploads-components-var__id_x4h_y13_psb}

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads-components-var__id_cvs_bmb_fwb__entry__2}{#apps-POST-uploads-components-var__accept-JSON-only-entry-RESTAPI}

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

{#apps-POST-uploads-components-var__id_cvs_bmb_fwb} {#apps-POST-uploads-components-var__entry__44}

| Header | Description |
|-|-|
| None |   |
[Table 83. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads-components-var__id_dqr_z13_psb__entry__2}{#apps-POST-uploads-components-var__entry-200-status-code}{#apps-POST-uploads-components-var__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad request. Upload request has been rejected. Possible issues: * Size of configuration payload is greater that the allowed maximum - 2 MB by default. * Required parameters are missing from the call. {#apps-POST-uploads-components-var__ul_kmn_gkh_psb} |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 84. Status codes]

{#apps-POST-uploads-components-var__id_dqr_z13_psb}

### Response body parameters (JSON or XML)

{#apps-POST-uploads-components-var__id_pcq_1b3_psb__entry__2}{#apps-POST-uploads-components-var__cdm_apps-stat-error}{#apps-POST-uploads-components-var__cdm_apps-stat-error_detail-row}{#apps-POST-uploads-components-var__cdm_apps-stat-error_messaage-row}{#apps-POST-uploads-components-var__cdm_apps-stat-error_status-row}{#apps-POST-uploads-components-var__cdm_apps-upload_id-row}

| Name | Description |
|-|-|
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| upload_id | Sys_id of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload. Data type: String |
[ ]

{#apps-POST-uploads-components-var__id_pcq_1b3_psb}  

### cURL request

The following example shows a vars upload request for the application
Demo_App1631126164773.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/uploads/components/vars?changesetNumber=Chset-102&autoValidate=false&autoDelete=true&publishOption=publish_none&appName=Demo_App1631126164773&namePath=%2FSettings%2FdbSettings&autoCommit=false&dataFormat=json" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:text/plain" \ 
    --data "{ 
      \"dbSettings\": { 
        \"dbIPAddress\": \"10.10.10.110\", 
        \"dbPort\": \"8080\", 
        \"dbConnectionString\": \"username:password server1.xyz.com:8080 dbName_payments\", 
        \"dbConnectionStringBackup\": \"username:password server2.xyz.com dbName_payments_backup\"
      } 
    }"
    --user 'username':'password' 

The following return results show both a successful and an error response for this
request.

    // Successful completion of the upload request
    { 
      "result": { 
        "upload_id": "d21f71f45322301096eccceaff7b1ce3" 
      } 
    } 

    // Error response. Payload is too large.
    { 
      "error": { 
        "message": "Size of uploaded data:6853632.0(bytes) is greater than max allowed upload limit of 2097152.0(bytes)", 
        "detail": "" 
      },
      "status": "failure"
    }

## CdmApplicationsApi - POST /sn_cdm/applications/uploads/collections {#ariaid-title16}

Submits a request to upload the passed-in configuration data for a specific collection,
within the system collections folder, for the specified application.
This endpoint returns the ID of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload.  
Note:  
The maximum default upload content size is 2 MB. You can modify this default by updating the property sn_cdm.max_allowed_upload_file_size.

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.

Note:  
This upload method cannot be used to modify nodes. Use the alternative [CdmApplicationsApi - POST /sn_cdm/applications/uploads/collections/file](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-POST-uploads_collections_file "Uploads a file to the collections folder in the Configuration Data Model (CDM).") method to modify nodes.

### URL format

Versioned URL:
/api/sn_cdm/{api_version}/applications/uploads/collections

Default URL:
/api/sn_cdm/applications/uploads/collections

### Supported request parameters

{#apps-POST-uploads-collections__entry__2}{#apps-POST-uploads-collections__version-not_optional-RESTAPI}

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

{#apps-POST-uploads-collections__id_ycw_c33_psb__entry__2}{#apps-POST-uploads-collections__cdm_app-dataFormAtt-entry}{#apps-POST-uploads-collections__cdm_app-dataFormAtt_containsHeaders-entry}{#apps-POST-uploads-collections__cdm_app-dataFormAtt_delimeter-entry}{#apps-POST-uploads-collections__cdm_app-dataFormAtt_headers-entry}{#apps-POST-uploads-collections__cdm_app-dataFormAtt_securedHeaders-entry}

| Name | Description |
|-|-|
| appName | Name of the application to associate with the configuration data. This application must be in the active state. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| autoCommit | Flag that indicates whether the changeset identified in the changesetNumber parameter is committed to the data model after upload. Valid values: * true: Changeset is committed after upload. * false: Changeset isn't committed after upload. Data type: Boolean Default: false |
| autoDelete | Flag that indicates whether the existing nodes, that aren't part of the upload content, are deleted after the processing is complete. Valid values: * true: Automatically delete existing nodes. * false: Don't automatically delete existing nodes. Data type: Boolean Default: false |
| autoValidate | Flag that indicates whether the snapshots created when committed are validated. Valid values: * true: Validate the snapshots. * false: Don't validate the snapshots. Note: This option is only available if the autoCommit parameter is <kbd class="ph userinput">true</kbd>. Data type: Boolean Default: false |
| changesetNumber | String that uniquely identifies the [changeset](https://www.servicenow.com/docs/access?context=cdm-changesets-version-control&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US) associated with the application, such as Chset-102. This changeset must be in the "Open" state. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String Default: Creates a changeset to use. The changeset details are returned as part of the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") results. |
| collectionName | Required. Name of the collection under which to store the uploaded payload. Note: If the specified namePath does not exist under this collection, the system automatically creates the component(s) under this collection and then uploads the configuration content. For example, if you want to upload the collection `collA`, with the path `compA/comp/compC`, the data is uploaded under `/collA/collections/compa/compB/compC`. If `compA` exists but not `compB` and `compC`, then the endpoint creates these components and uploads the data under `compC`. Data type: String |
| dataFormat | Required. Format of the configuration data. Valid values: * csv * ini * json * properties * raw * xml * yaml Data type: String |
| dataFormatAttributes | Only supported when the dataFormat parameter is set to <kbd class="ph userinput">csv</kbd>. Attributes that define the CSV data format. For additional information, see [Parsing of CSV files in CDM](https://www.servicenow.com/docs/access?context=cdm-parsing-csv-file&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: Object "dataFormatAttributes" { "containsHeader": Boolean, "delimeter": "String" "headers": [Array], "securedHeaders": [Array] } |
| dataFormatAttributes.containsHeaders | Flag that indicates whether the data contains a header row. Valid values: * true: Data contains a header row. The first row in the data is considered the header row. * false: Data doesn't contain a header row. You must pass the header information in the dataFormatAttributes.headers parameter. Data type: Boolean Default: false |
| dataFormatAttributes.delimeter | Character to use to delineate fields within the data. Data type: String Default: Comma "," |
| dataFormatAttributes.headers | Required if dataFormatAttributes.containsHeaders parameter is <kbd class="ph userinput">false</kbd>. Fields in the data that comprise the header. These headers are converted to the key names of the CDIs in the JSON format. The number of headers must match the number of record fields. Data type: Array Default: Empty array |
| dataFormatAttributes.securedHeaders | Fields in the data that are secure fields and must be encrypted in the data uploaded to CDM. The name of the secured headers must match the name of the headers in the headers attribute or data file. These fields are stored in a column of type Password (2 Way Encrypted). Note: You can only secure fields using this attribute. You can't unsecure the secured fields. Data type: Array Default: Empty array |
| deleteRedundantOverrides | Flag that indicates whether to create an override where redundant values are present. Valid values: * true: If redundant values are present, an override isn't created. * false: If redundant values are present, proceeds with an override. Default: true |
| ignoreAttributes | Flag that indicates whether the given data format supports attributes (currently only XML). Valid values: * true: If the given data format supports attributes, any attributes in the input data are skipped during the upload. * false: If the given data format supports attributes, any attributes in the input data are included in the upload. {#apps-POST-uploads-collections__ul_egn_4q4_1yb} Data type: Boolean Default: false |
| namePath | Path of the targeted node under which the configuration data should be uploaded. This path is relative to the components, collection, or deployable folder (depending on the endpoint being called). You can pass the name path in any of the following formats. For example, to define the name path for the node `testApp/deployables/Development1/cdi1`: * Backslash format: testApp/deployables/Development1/cdi1 Note: If your node name contains a backslash ("/"), you can't use this format. * Backend name path with replacement characters: testApp�deployables�Development1�cdi1 * Array: \['testApp','deployables','Development1','cdi1'\] {#apps-POST-uploads-collections__cdm_apps-namePath-ul} Note: If the specified component doesn't exist at the specified path, the system automatically creates the component at the specified path and then uploads the data. Data type: String |
[Table 86. Query parameters]

{#apps-POST-uploads-collections__id_ycw_c33_psb} {#apps-POST-uploads-collections__id_afd_233_psb__entry__2}{#apps-POST-uploads-collections__cdm_apps-var_up_data-entry}

| 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. |
[Table 87. Request body parameters (XML or JSON)]

{#apps-POST-uploads-collections__id_afd_233_psb}

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads-collections__id_h4r_fmb_fwb__entry__2}{#apps-POST-uploads-collections__accept-JSON-only-entry-RESTAPI}

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

{#apps-POST-uploads-collections__id_h4r_fmb_fwb} {#apps-POST-uploads-collections__entry__48}

| Header | Description |
|-|-|
| None |   |
[Table 89. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads-collections__id_szz_f33_psb__entry__2}{#apps-POST-uploads-collections__entry-200-status-code}{#apps-POST-uploads-collections__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad request. Upload request has been rejected. Possible issues: * Size of configuration payload is greater that the allowed maximum - 2 MB by default. * Required parameters are missing from the call. {#apps-POST-uploads-collections__ul_kmn_gkh_psb} |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 90. Status codes]

{#apps-POST-uploads-collections__id_szz_f33_psb}

### Response body parameters (JSON or XML)

{#apps-POST-uploads-collections__id_i55_g33_psb__entry__2}{#apps-POST-uploads-collections__cdm_apps-stat-error}{#apps-POST-uploads-collections__cdm_apps-stat-error_detail-row}{#apps-POST-uploads-collections__cdm_apps-stat-error_messaage-row}{#apps-POST-uploads-collections__cdm_apps-stat-error_status-row}{#apps-POST-uploads-collections__cdm_apps-upload_id-row}

| Name | Description |
|-|-|
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| upload_id | Sys_id of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload. Data type: String |
[ ]

{#apps-POST-uploads-collections__id_i55_g33_psb}  

### cURL request

This example shows how to upload JSON-formatted dbSettings
configuration date into the collections folder for the application
Demo_App1631126164773.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/uploads/collections?dataFormat=json&autoValidate=false&changesetNumber=Chset-102&appName=Demo_App1631126164773&autoDelete=true&namePath=%2FSettings%2FdbSettings&collectionName=release-1.0&autoCommit=false&publishOption=publish_none" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:text/plain" \ 
    --data "{ 
      \"dbSettings\": { 
        \"dbIPAddress\": \"10.10.10.110\", 
        \"dbPort\": \"8080\", 
        \"dbConnectionString\": \"admin:admin server1.xyz.com:8080 dbName_payments\", 
        \"dbConnectionStringBackup\": \"admin:admin server2.xyz.com dbName_payments_backup\" 
      } 
    }" \ 
    --user 'username':'password' 

The following shows the possible responses to this call, both as a success and an
error.

    // Successful completion of the upload request
    { 
      "result": { 
        "upload_id": "ec1f71f45322301096edddeeff7b12b3" 
      } 
    } 

    // Error response. Payload is too large.
    { 
      "error": { 
        "message": "Size of uploaded data:6853632.0(bytes) is greater than max allowed upload limit of 2097152.0(bytes)", 
        "detail": "" 
      },
      "status": "failure"
    }

## CdmApplicationsApi - POST /sn_cdm/applications/uploads/collections/file {#ariaid-title17}

Uploads a file to the collections folder in the Configuration Data Model (CDM).

### URL format {#apps-POST-uploads_collections_file__section_okl_mmr_byb}

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 {#apps-POST-uploads_collections_file__section_elv_jht_byb}

{#apps-POST-uploads_collections_file__table_rgl_tbt_byb__entry__2}{#apps-POST-uploads_collections_file__version-not_optional-RESTAPI}

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

{#apps-POST-uploads_collections_file__table_rgl_tbt_byb} {#apps-POST-uploads_collections_file__cdm_app-upload_query_parms-table__entry__2}{#apps-POST-uploads_collections_file__publish_option-changeset-entry}

| Name | Description |
|-|-|
| appName | Name of the application to associate with the configuration data. This application must be in the active state. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| autoCommit | Flag that indicates whether the changeset identified in the changesetNumber parameter is committed to the data model after upload. Valid values: * true: Changeset is committed after upload. * false: Changeset isn't committed after upload. Data type: Boolean Default: false |
| autoValidate | Flag that indicates whether the snapshots created when committed are validated. Valid values: * true: Validate the snapshots. * false: Don't validate the snapshots. Note: This option is only available if the autoCommit parameter is <kbd class="ph userinput">true</kbd>. Data type: Boolean Default: false |
| collectionName | Required. Name of the collection under which to store the uploaded payload. Note: If the specified `namePath` does not exist under this collection, the system automatically creates the component(s) under this collection and then uploads the configuration content. For example, if you want to upload the collection `collA`, with the path `compA/comp/compC`, the data is uploaded under `/collA/collections/compa/compB/compC`. If `compA` exists but not `compB` and `compC`, then the endpoint creates these components and uploads the data under `compC`. Data type: String |
| changesetNumber | String that uniquely identifies the [changeset](https://www.servicenow.com/docs/access?context=cdm-changesets-version-control&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US) associated with the application, such as Chset-102. This changeset must be in the "Open" state. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String Default: Creates a changeset to use. The changeset details are returned as part of the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") results. |
| fileName | Name of the file to upload. This name can differ from than the actual file name and contain the file extension. For example, .txt/.scv/.jar. The fileName value is applied when downloading the file. Data type: String |
| fileNodeName | Name of the file node. This file name is used in the configuration data when exporting it. This name doesn't require a file extension nor does it affect the download. Data type: String |
| namePath | Path of the targeted node under which the configuration data should be uploaded. This path is relative to the components, collection, or deployable folder (depending on the endpoint being called). You can pass the name path in any of the following formats. For example, to define the name path for the node `testApp/deployables/Development1/cdi1`: * Backslash format: testApp/deployables/Development1/cdi1 Note: If your node name contains a backslash ("/"), you can't use this format. * Backend name path with replacement characters: testApp�deployables�Development1�cdi1 * Array: \['testApp','deployables','Development1','cdi1'\] {#apps-POST-uploads_collections_file__cdm_apps-namePath-ul} Note: If the specified component doesn't exist at the specified path, the system automatically creates the component at the specified path and then uploads the data. Data type: String |
| publishOption | Publish option for the associated configured snapshots. Valid values: * publish_none: Don't publish any snapshots. * publish_valid: Publish only those snapshots that pass validation after the commit. For additional information on publishing snapshots, see [Publish or unpublish a snapshot](https://www.servicenow.com/docs/access?context=cdm-snapshot-publish&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: String Default: publish_none Note: This option is only available if the value for the autoCommit parameter is true. |
[Table 92. Query parameters]

{#apps-POST-uploads_collections_file__cdm_app-upload_query_parms-table} {#apps-POST-uploads_collections_file__table_j22_fgm_2yb__entry__2}

| 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](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718101). Data type: String/stream |
[Table 93. Request body parameters (XML or JSON)]

{#apps-POST-uploads_collections_file__table_j22_fgm_2yb}

### Headers

{#apps-POST-uploads_collections_file__table_enr_pqs_byb__entry__2}{#apps-POST-uploads_collections_file__accept-RESTAPI}

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

{#apps-POST-uploads_collections_file__table_enr_pqs_byb} {#apps-POST-uploads_collections_file__entry__36}

| Header | Description |
|-|-|
| None |   |
[Table 95. Response headers]

### Status codes {#apps-POST-uploads_collections_file__section_mtw_2vr_byb}

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads_collections_file__id_cdq_fft_byb__entry__2}{#apps-POST-uploads_collections_file__entry-200-status-code}{#apps-POST-uploads_collections_file__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad request. Upload request has been rejected. Possible issues: * Size of configuration payload is greater that the allowed maximum - 2 MB by default. * Required parameters are missing from the call. {#apps-POST-uploads_collections_file__ul_kmn_gkh_psb} |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 96. Status codes]

{#apps-POST-uploads_collections_file__id_cdq_fft_byb}

### Response body parameters (JSON or XML) {#apps-POST-uploads_collections_file__section_fft_zht_byb}

{#apps-POST-uploads_collections_file__table_gft_zht_byb__entry__2}{#apps-POST-uploads_collections_file__cdm_apps-stat-error}{#apps-POST-uploads_collections_file__cdm_apps-stat-error_detail-row}{#apps-POST-uploads_collections_file__cdm_apps-stat-error_messaage-row}{#apps-POST-uploads_collections_file__cdm_apps-stat-error_status-row}{#apps-POST-uploads_collections_file__cdm_apps-upload_id-row}

| Name | Description |
|-|-|
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| upload_id | Sys_id of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload. Data type: String |
[ ]

{#apps-POST-uploads_collections_file__table_gft_zht_byb}  

### cURL request

The following call uploads a plain text file to the CDM collections folder.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/uploads/collections/file?autoValidate=true&collectionName=collA&appName=testApp&namePath=testComponent%2FfilesFolder&fileName=testFileNodeName.txt&publishOption=publish_valid&changesetNumber=Chset-108&autoCommit=true&fileNodeName=testFile.txt" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:text/plain" \ 
    --data "This is sample content that will be uploaded to a plain text file."\ 
    --user 'username':'password'

The following return results show both a successful and an error response to this request.

    // Successful completion of the upload request
    { 
      "result": { 
        "upload_id": "ec1f71f45322301096edddeeff7b12b3" 
      } 
    } 

    // Error response. Payload is too large.
    { 
      "error": { 
        "message": "Could not find active application with name: 'testApp' of type application", 
        "detail": "" 
      },
      "status": "failure"
    }

## CdmApplicationsApi - POST /sn_cdm/applications/uploads/deployables {#ariaid-title18}

Submits a request to upload the configuration content for a specific deployable within
the deployables system folder of a specified application.
This endpoint returns the ID of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload.  
Note:  
The maximum default upload content size is 2 MB. You can modify this default by updating the property sn_cdm.max_allowed_upload_file_size.

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.

Note:  
This upload method cannot be used to modify nodes. Use the alternative [CdmApplicationsApi - POST /sn_cdm/applications/uploads/deployables/file](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-POST-uploads_deployables_file "Uploads files to the deployables folder in the Configuration Data Model (CDM).") method to modify nodes.

### URL format

Versioned URL:
/api/sn_cdm/{api_version}/applications/uploads/deployables

Default URL:
/api/sn_cdm/applications/uploads/deployables

### Supported request parameters

{#apps-POST-uploads-deployables__entry__2}{#apps-POST-uploads-deployables__version-not_optional-RESTAPI}

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

{#apps-POST-uploads-deployables__entry__6}{#apps-POST-uploads-deployables__cdm_app-dataFormAtt-entry}{#apps-POST-uploads-deployables__cdm_app-dataFormAtt_containsHeaders-entry}{#apps-POST-uploads-deployables__cdm_app-dataFormAtt_delimeter-entry}{#apps-POST-uploads-deployables__cdm_app-dataFormAtt_headers-entry}{#apps-POST-uploads-deployables__cdm_app-dataFormAtt_securedHeaders-entry}{#apps-POST-uploads-deployables__publish_option-changeset-entry}

| Name | Description |
|-|-|
| appName | Name of the application to associate with the configuration data. This application must be in the active state. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| autoCommit | Flag that indicates whether the changeset identified in the changesetNumber parameter is committed to the data model after upload. Valid values: * true: Changeset is committed after upload. * false: Changeset isn't committed after upload. Data type: Boolean Default: false |
| autoDelete | Flag that indicates whether the existing nodes, that aren't part of the upload content, are deleted after the processing is complete. Valid values: * true: Automatically delete existing nodes. * false: Don't automatically delete existing nodes. Data type: Boolean Default: false |
| autoValidate | Flag that indicates whether the snapshots created when committed are validated. Valid values: * true: Validate the snapshots. * false: Don't validate the snapshots. Note: This option is only available if the autoCommit parameter is <kbd class="ph userinput">true</kbd>. Data type: Boolean Default: false |
| changesetNumber | String that uniquely identifies the [changeset](https://www.servicenow.com/docs/access?context=cdm-changesets-version-control&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US) associated with the application, such as Chset-102. This changeset must be in the "Open" state. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String Default: Creates a changeset to use. The changeset details are returned as part of the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") results. |
| dataFormat | Required. Format of the configuration data. Valid values: * csv * ini * json * properties * raw * xml * yaml Data type: String |
| dataFormatAttributes | Only supported when the dataFormat parameter is set to <kbd class="ph userinput">csv</kbd>. Attributes that define the CSV data format. For additional information, see [Parsing of CSV files in CDM](https://www.servicenow.com/docs/access?context=cdm-parsing-csv-file&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: Object "dataFormatAttributes" { "containsHeader": Boolean, "delimeter": "String" "headers": [Array], "securedHeaders": [Array] } |
| dataFormatAttributes.containsHeaders | Flag that indicates whether the data contains a header row. Valid values: * true: Data contains a header row. The first row in the data is considered the header row. * false: Data doesn't contain a header row. You must pass the header information in the dataFormatAttributes.headers parameter. Data type: Boolean Default: false |
| dataFormatAttributes.delimeter | Character to use to delineate fields within the data. Data type: String Default: Comma "," |
| dataFormatAttributes.headers | Required if dataFormatAttributes.containsHeaders parameter is <kbd class="ph userinput">false</kbd>. Fields in the data that comprise the header. These headers are converted to the key names of the CDIs in the JSON format. The number of headers must match the number of record fields. Data type: Array Default: Empty array |
| dataFormatAttributes.securedHeaders | Fields in the data that are secure fields and must be encrypted in the data uploaded to CDM. The name of the secured headers must match the name of the headers in the headers attribute or data file. These fields are stored in a column of type Password (2 Way Encrypted). Note: You can only secure fields using this attribute. You can't unsecure the secured fields. Data type: Array Default: Empty array |
| deleteRedundantOverrides | Flag that indicates whether to create an override where redundant values are present. Valid values: * true: If redundant values are present, an override isn't created. * false: If redundant values are present, proceeds with an override. Default: true |
| deployableName | Required. Name of the deployable under which to store the uploaded payload. Note: If the specified namePath does not exist under this deployable, the system automatically creates the component(s) under this deployable and then uploads the configuration content. |
| identifierKeys | List of names that indicate which key in an array child to use to identify the same node. For example, if you're uploading: [ {"name" : "Allan, "city" : "Paris"}, {"name" : "Karen, "city" : "Sydney"} ] in the following existing model: [ {"name" : "Karen, "city" : "Manila"}, {"name" : "Allan, "city" : "Brussels"} ] and you set identifierKeys to <kbd class="ph userinput">name</kbd>, it produces the following output: [ {"name" : "Karen, "city" : "Sydney"}, {"name" : "Allan, "city" : "Paris"} ] Otherwise, it produces the following output: [ {"name" : "Karen, "city" : "Manila"}, {"name" : "Allan, "city" : "Brussels"}, {"name" : "Allan, "city" : "Paris"}, {"name" : "Karen, "city" : "Sydney"} ] Data type: Array of Strings |
| ignoreAttributes | Flag that indicates whether the given data format supports attributes (currently only XML). Valid values: * true: If the given data format supports attributes, any attributes in the input data are skipped during the upload. * false: If the given data format supports attributes, any attributes in the input data are included in the upload. {#apps-POST-uploads-deployables__ul_egn_4q4_1yb} Data type: Boolean Default: false |
| namePath | Path of the targeted node under which the configuration data should be uploaded. This path is relative to the components, collection, or deployable folder (depending on the endpoint being called). You can pass the name path in any of the following formats. For example, to define the name path for the node `testApp/deployables/Development1/cdi1`: * Backslash format: testApp/deployables/Development1/cdi1 Note: If your node name contains a backslash ("/"), you can't use this format. * Backend name path with replacement characters: testApp�deployables�Development1�cdi1 * Array: \['testApp','deployables','Development1','cdi1'\] {#apps-POST-uploads-deployables__cdm_apps-namePath-ul} Note: If the specified component doesn't exist at the specified path, the system automatically creates the component at the specified path and then uploads the data. Data type: String |
| publishOption | Publish option for the associated configured snapshots. Valid values: * publish_none: Don't publish any snapshots. * publish_valid: Publish only those snapshots that pass validation after the commit. For additional information on publishing snapshots, see [Publish or unpublish a snapshot](https://www.servicenow.com/docs/access?context=cdm-snapshot-publish&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: String Default: publish_none Note: This option is only available if the value for the autoCommit parameter is true. |
[Table 98. Query parameters]

{#apps-POST-uploads-deployables__id_njw_zv3_psb__entry__2}{#apps-POST-uploads-deployables__cdm_apps-var_up_data-entry}

| 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. |
[Table 99. Request body parameters (XML or JSON)]

{#apps-POST-uploads-deployables__id_njw_zv3_psb}

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads-deployables__id_ilq_dmb_fwb__entry__2}{#apps-POST-uploads-deployables__accept-JSON-only-entry-RESTAPI}

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

{#apps-POST-uploads-deployables__id_ilq_dmb_fwb} {#apps-POST-uploads-deployables__entry__52}

| Header | Description |
|-|-|
| None |   |
[Table 101. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads-deployables__id_gty_cw3_psb__entry__2}{#apps-POST-uploads-deployables__entry-200-status-code}{#apps-POST-uploads-deployables__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad request. Upload request has been rejected. Possible issues: * Size of configuration payload is greater that the allowed maximum - 2 MB by default. * Required parameters are missing from the call. {#apps-POST-uploads-deployables__ul_kmn_gkh_psb} |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 102. Status codes]

{#apps-POST-uploads-deployables__id_gty_cw3_psb}

### Response body parameters (JSON or XML)

{#apps-POST-uploads-deployables__id_gcv_2w3_psb__entry__2}{#apps-POST-uploads-deployables__cdm_apps-stat-error}{#apps-POST-uploads-deployables__cdm_apps-stat-error_detail-row}{#apps-POST-uploads-deployables__cdm_apps-stat-error_messaage-row}{#apps-POST-uploads-deployables__cdm_apps-stat-error_status-row}{#apps-POST-uploads-deployables__cdm_apps-upload_id-row}

| Name | Description |
|-|-|
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| upload_id | Sys_id of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload. Data type: String |
[ ]

{#apps-POST-uploads-deployables__id_gcv_2w3_psb}  

### cURL request

The following example shows an upload request for the application
Demo_App1631126164773.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/uploads/deployables?deployableName=TST-1&autoValidate=false&dataFormat=json&autoDelete=false&changesetNumber=Chset-102&appName=Demo_App1631126164773&publishOption=publish_none&autoCommit=true&namePath=%2FSettings%2FdbSettings" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:text/plain" \ 
    --data "{
      \"dbIPAddress\": \"10.10.10.110\",
      \"dbPort\": \"8080\",
      \"dbConnectionString\": \"admin:admin server1.xyz.com:8080 dbName_payments\",
      \"dbConnectionStringBackup\": \"admin:admin server2.xyz.com dbName_payments_backup\"
    }" \ 
    --user 'username':'password' 

The following return results show both a successful and an error response for this
request.

    // Successful completion of the upload request
    { 
      "result": { 
        "upload_id": "ec1f71f45322301096edddeeff7b12b3" 
      } 
    } 

    // Error response. Payload is too large.
    { 
      "error": { 
        "message": "Size of uploaded data:6853632.0(bytes) is greater than max allowed upload limit of 2097152.0(bytes)", 
        "detail": "" 
      },
      "status": "failure"
    }

## CdmApplicationsApi - POST /sn_cdm/applications/uploads/deployables/file {#ariaid-title19}

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

{#apps-POST-uploads_deployables_file__table_rgl_tbt_byb__entry__2}{#apps-POST-uploads_deployables_file__version-not_optional-RESTAPI}

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

{#apps-POST-uploads_deployables_file__table_rgl_tbt_byb} {#apps-POST-uploads_deployables_file__cdm_app-upload_query_parms-table__entry__2}{#apps-POST-uploads_deployables_file__deployableName-policy-entry}{#apps-POST-uploads_deployables_file__publish_option-changeset-entry}

| Name | Description |
|-|-|
| appName | Name of the application to associate with the configuration data. This application must be in the active state. Located in the CDM Application \[sn_cdm_application\] table. Data type: String |
| autoCommit | Flag that indicates whether the changeset identified in the changesetNumber parameter is committed to the data model after upload. Valid values: * true: Changeset is committed after upload. * false: Changeset isn't committed after upload. Data type: Boolean Default: false |
| autoValidate | Flag that indicates whether the snapshots created when committed are validated. Valid values: * true: Validate the snapshots. * false: Don't validate the snapshots. Note: This option is only available if the autoCommit parameter is <kbd class="ph userinput">true</kbd>. Data type: Boolean Default: false |
| changesetNumber | String that uniquely identifies the [changeset](https://www.servicenow.com/docs/access?context=cdm-changesets-version-control&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US) associated with the application, such as Chset-102. This changeset must be in the "Open" state. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String Default: Creates a changeset to use. The changeset details are returned as part of the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") results. |
| deployableName | Required. Name of the CDM deployable for which to map the policy. Located in the CDM Deployable \[sn_cdm_deployable\] table. Data type: String |
| fileName | Name of the file to upload. This name can differ from than the actual file name and contain the file extension. For example, .txt/.scv/.jar. The fileName value is applied when downloading the file. Data type: String |
| fileNodeName | Name of the file node. This file name is used in the configuration data when exporting it. This name doesn't require a file extension nor does it affect the download. Data type: String |
| namePath | Path of the targeted node under which the configuration data should be uploaded. This path is relative to the components, collection, or deployable folder (depending on the endpoint being called). You can pass the name path in any of the following formats. For example, to define the name path for the node `testApp/deployables/Development1/cdi1`: * Backslash format: testApp/deployables/Development1/cdi1 Note: If your node name contains a backslash ("/"), you can't use this format. * Backend name path with replacement characters: testApp�deployables�Development1�cdi1 * Array: \['testApp','deployables','Development1','cdi1'\] {#apps-POST-uploads_deployables_file__cdm_apps-namePath-ul} Note: If the specified component doesn't exist at the specified path, the system automatically creates the component at the specified path and then uploads the data. Data type: String |
| publishOption | Publish option for the associated configured snapshots. Valid values: * publish_none: Don't publish any snapshots. * publish_valid: Publish only those snapshots that pass validation after the commit. For additional information on publishing snapshots, see [Publish or unpublish a snapshot](https://www.servicenow.com/docs/access?context=cdm-snapshot-publish&version=xanadu&pubname=xanadu-it-service-management&ft:locale=en-US). Data type: String Default: publish_none Note: This option is only available if the value for the autoCommit parameter is true. |
[Table 104. Query parameters]

{#apps-POST-uploads_deployables_file__cdm_app-upload_query_parms-table} {#apps-POST-uploads_deployables_file__table_j22_fgm_2yb__entry__2}

| 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](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0718101). Data type: String/stream |
[Table 105. Request body parameters (XML or JSON)]

{#apps-POST-uploads_deployables_file__table_j22_fgm_2yb}

### Headers {#apps-POST-uploads_deployables_file__section_cxs_mvr_byb}

{#apps-POST-uploads_deployables_file__table_bd2_pqs_byb__entry__2}{#apps-POST-uploads_deployables_file__accept-RESTAPI}

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

{#apps-POST-uploads_deployables_file__table_bd2_pqs_byb} {#apps-POST-uploads_deployables_file__table_exs_mvr_byb__entry__2}

| Header | Description |
|-|-|
| None |   |
[Table 107. Response headers]

{#apps-POST-uploads_deployables_file__table_exs_mvr_byb}

### Status codes {#apps-POST-uploads_deployables_file__section_mtw_2vr_byb}

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-POST-uploads_deployables_file__id_cdq_fft_byb__entry__2}{#apps-POST-uploads_deployables_file__entry-200-status-code}{#apps-POST-uploads_deployables_file__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad request. Upload request has been rejected. Possible issues: * Size of configuration payload is greater that the allowed maximum - 2 MB by default. * Required parameters are missing from the call. {#apps-POST-uploads_deployables_file__ul_kmn_gkh_psb} |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 108. Status codes]

{#apps-POST-uploads_deployables_file__id_cdq_fft_byb}

### Response body parameters (JSON or XML) {#apps-POST-uploads_deployables_file__section_sbq_2bx_1yb}

{#apps-POST-uploads_deployables_file__id_af3_kft_byb__entry__2}{#apps-POST-uploads_deployables_file__cdm_apps-stat-error}{#apps-POST-uploads_deployables_file__cdm_apps-stat-error_detail-row}{#apps-POST-uploads_deployables_file__cdm_apps-stat-error_messaage-row}{#apps-POST-uploads_deployables_file__cdm_apps-stat-error_status-row}{#apps-POST-uploads_deployables_file__cdm_apps-upload_id-row}

| Name | Description |
|-|-|
| error | If an error occurred during processing, the details about the error. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Additional information about the error. Data type: String |
| error.message | Error message that was generated while trying to process the request. Data type: String |
| status | Error status of the request. Possible values: failure Data type: String |
| upload_id | Sys_id of the upload request. Use this ID to call the [CdmApplicationsApi - GET /sn_cdm/applications/upload-status/{upload_id}](https://servicenow-prod.fluidtopics.net/kxQnNcfcJkxqyOLRcDyN~g#apps-GET-upload-status "Returns the current status of the specified configuration data upload request.") endpoint to obtain the status of the upload. Data type: String |
[ ]

{#apps-POST-uploads_deployables_file__id_af3_kft_byb}  

### cURL request

The following request uploads a plain text file to the deployables folder of the CDM application.

    curl "http://instance.servicenow.com/api/sn_cdm/applications/uploads/deployables/file?autoValidate=true&deployableName=depA&appName=testApp&namePath=testComponent%2FfilesFolder&fileName=testFileNodeName.txt&publishOption=publish_valid&changesetNumber=Chset-108&autoCommit=true&fileNodeName=testFile.txt" \ 
    --request POST \ 
    --header "Accept:application/json" \ 
    --header "Content-Type:text/plain" \ 
    --data "This is sample content that will be uploaded to a plain text file."\ 
    --user 'username':'password' 

The following return results show both a successful and an error response to this request.

    // Successful completion of the upload request
    { 
      "result": { 
        "upload_id": "ec1f71f45322301096edddeeff7b12b3" 
      } 
    } 

    // Error response. Payload is too large.
    { 
      "error": { 
        "message": "Could not find active application with name: 'testApp' of type application", 
        "detail": "" 
      },
      "status": "failure"
    }

## CdmApplicationsApi - PUT /sn_cdm/applications/deployables {#ariaid-title20}

Updates the specified shared component in an application within a specified changeset.
Allows an update to the following fields:

* Name
* Description
* Application Service\\Dynamic CI Group
* Deployable identifier
{#apps-PUT-application_deployables__ul_dgk_lzh_qxb}

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

{#apps-PUT-application_deployables__entry__2}

| 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 |
[Table 109. Path parameters]

{#apps-PUT-application_deployables__entry__6}

| Name | Description |
|-|-|
| appName | Required. Name of the CDM Application. Data type: String |
| name | Required. Name of the CDM Deployable. Data type: String |
| newDescription | Optional. A description for the CDM Deployable. Data type: String |
| newServiceId | Optional. The ID of the desired Application Service/Dynamic CI Group. In the cURL request, provide `''` to disconnect the Deployable from the service. |
| newIdentifier | Optional. The identifier of the Deployable. Data type: Choice (Development/Test/Production |
| newName | Optional. The new name of the Deployable. Data type: String |
| returnFields | Optional. Comma-separated list of fields to be returned as part of the response. |
[Table 110. Query parameters]

{#apps-PUT-application_deployables__entry__22}

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

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-PUT-application_deployables__entry__26}

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

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-PUT-application_deployables__entry__30}

| 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. |
[Table 113. Status codes]

### Response body parameters (JSON or XML)

{#apps-PUT-application_deployables__entry__38}

| Name | Description |
|-|-|
| sys_id | CDM deployable sys_Id. |
| name | Name of the CDM Deployable. |
| node | Deployable node object. `{ 'value': '<sysId>', 'link': 'http://localhost:8081/api/now/table/*'}` |
| description | CDM deployable description. |
| identifier | An identifier for the deployable. |
| cmdb_ci | The app service object which is connected to a deployable. `{ 'value': '<sysId>', 'link': 'http://localhost:8081/api/now/table/*'}` |
| cmdb_app | The CDM application object. `{ 'value': '<sysId>', 'link': 'http://localhost:8081/api/now/table/*'}` |
| snapshot_version_counter | The count of snapshots created for a deployable. |
| cdi_count | The number of CDIs contained in this CDM deployable. |
| cdi_usage | The CDI usage percentage. |
| environment_type | The environment type. Possible values: * development * production * test {#apps-PUT-application_deployables__ul_y2w_5c3_qxb} |
| state | The active or deleted state . Possible values: * active * deleted {#apps-PUT-application_deployables__ul_cth_wc3_qxb} |
| sys_created_by | CDM deployable created by \<username\>. |
| sys_created_on | CDM deployable creation timestamp in the format of \<yyyy-MM-dd hh:mm:ss\>. |
| sys_updated_by | CDM deployable updated by \<username\>. |
| sys_updated_on | CDM deployable updated by timestamp in the format of \<yyyy-MM-dd hh:mm:ss\>. |
[ ]

### cURL request

    curl "http://localhost:8080/api/sn_cdm/applications/deployables?appName=testApp&name=Dep-1" \ 
    --request PUT\ 
    --header "Accept:application/json" \ 
    --user 'cdm_admin':'password1!' 

Output:

    { 
      "result": { 
        "identifier": "identiy1", 
        "cmdb_ci": { 
          "value": "f5b9e00b53901110a1d3ddeeff7b12b8", 
          "link": "http://192.168.0.233:8080/api/now/table/cmdb_ci_service_auto/f5b9e00b53901110a1d3ddeeff7b12b8" 
        }, 
        "cdi_count": "3", 
        "snapshot_version_counter": "1", 
        "description": "cdcds", 
        "sys_updated_on": "2022-07-27 13:40:13", 
        "environment_type": "Test", 
        "node": { 
          "value": "30c00d4053015110a1d3ddeeff7b12bf", 
          "link": "http://192.168.0.233:8080/api/now/table/sn_cdm_node/30c00d4053015110a1d3ddeeff7b12bf" 
        }, 
        "sys_id": "39b9e00b53901110a1d3ddeeff7b12b7", 
        "sys_updated_by": "admin", 
        "cdm_app": { 
          "value": "62b517a953b70110a1d3ddeeff7b128c", 
          "link": "http://192.168.0.233:8080/api/now/table/sn_cdm_application/62b517a953b70110a1d3ddeeff7b128c" 
        }, 
        "sys_created_on": "2022-06-29 12:53:57", 
        "cdi_usage": "0.03", 
        "name": "Dep-2", 
        "state": "active", 
        "sys_created_by": "admin" 
      } 
    } 

## CdmApplicationsApi - PUT /sn_cdm/applications/shared_components {#ariaid-title21}

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

{#apps-PUT-shared_components__entry__2}{#apps-PUT-shared_components__version-not_optional-RESTAPI}

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

{#apps-PUT-shared_components__entry__6}{#apps-PUT-shared_components__cdm_apps-returnFields-entry}

| Name | Description |
|-|-|
| changesetNumber | Required. Unique identifier of the changeset associated with the component. Data type: String |
| returnFields | List of fields to return as part of the response. Pass the record column names such as sys_id, sys_updated_by, or state. Data type: Array Default: All fields as determined by the endpoint |
| sharedComponentName | Required. Name of the shared component associated with the specified application. Located in the CDM Shared Component \[sn_cdm_shared_component\] table. Data type: String |
| sharedLibraryName | Required. Name of the shared library under which the component resides. Located in the CDM Application \[sn_cdm_application\] table. The shared library must have the following fields defined as follows: * state = active * available = true * type = shared_library Data type: String |
| version | Required. Version name associated with the shared component. Located in the CDM Snapshot \[sn_cdm_snapshot\] table. Data type: String |
[Table 115. Query parameters]

{#apps-PUT-shared_components__entry__18}

| Name | Description |
|-|-|
| None |   |
[Table 116. Request body 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](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-PUT-shared_components__entry__22}{#apps-PUT-shared_components__accept-RESTAPI}

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

{#apps-PUT-shared_components__entry__26}

| Header | Description |
|-|-|
| None |   |
[Table 118. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#apps-PUT-shared_components__entry__30}{#apps-PUT-shared_components__entry-200-status-code}{#apps-PUT-shared_components__entry-500-status-code}

| 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. |
[Table 119. Status codes]

### 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.
{#apps-PUT-shared_components__entry__38}{#apps-PUT-shared_components__changeset-node-editor-entry}{#apps-PUT-shared_components__changeset_link-node-editor-entry}{#apps-PUT-shared_components__changeset_value-node-editor-entry}{#apps-PUT-shared_components__cdm_apps-error-entry}{#apps-PUT-shared_components__cdm_apps-error_detail-entry}{#apps-PUT-shared_components__cdm_apps-error_message-entry}{#apps-PUT-shared_components__cdm_dep-sys_created_by-row}{#apps-PUT-shared_components__cdm_deps-sys_created_on-row}{#apps-PUT-shared_components__sys_id-node-editor-entry}{#apps-PUT-shared_components__cdm_dep-sys_updated_by-row}{#apps-PUT-shared_components__cdm_dep-sys_updated_on-row}

| Name | Description |
|-|-|
| changeset_id | Details of the changeset record associated with the node. Data type: Object "changeset_id": { "link": "String", "value": "String" } |
| changeset_id.link | Call syntax for querying this changeset record using the Table REST API. Data type: String |
| changeset_id.value | Unique identifier of the changeset record. Located in the CDM Changeset \[sn_cdm_changeset\] table. Data type: String |
| description | Description of the CDM node. Data type: String |
| error | Only returned if an error occurred during processing. Data type: Object "error": { "detail": "String", "message": "String" } |
| error.detail | Details about the error that occurred. Data type: String |
| error.message | Message that provides an overview of the error. Data type: String |
| linked_to | ID of the main node associated with the shared component. Data type: String |
| linked_to_version | Details of the CDM snapshot record associated with the node. Data type: Object "linked_to_version": { "link": "String", "value": "String" } |
| linked_to_version.link | Call syntax for querying this version record using the Table REST API. Data type: String |
| linked_to_version.value | Sys_id of the version record. Data type: String |
| main | Flag that indicates whether the associated snapshot was published. Valid values: * true: Snapshot was published. * false: Snapshot was not published. |
| main_id | Unique ID of the newly created main node. Data type: String |
| main_id_encoded | Encoded ID of the newly created main node. Data type: String |
| name | Name of the CDM node. Data type: String |
| node | Sys_id of the shared component node. Data type: String |
| node_path | Path to the new linked node created when adding the shared component. Data type: String |
| status | Status of the node. Possible values: New Data type: String |
| sys_created_by | User name of the user that create the CDM node. For example, able.tuter. Data type: String |
| sys_created_on | Date and time when the CDM node was created. Format: YYYY-mm-DD hh:mm:ss Data type: String |
| sys_id | Sys_id of the node. Located in the CDM Node \[sn_cdm_node\] table. Data type: String |
| sys_updated_by | User name of the user that last updated the CDM node. For example, able.tuter. Data type: String |
| sys_updated_on | Date and time when the CDM node was last updated. Format: YYYY-mm-DD hh:mm:ss Data type: String |
| type | Node type. Data type: String |
[ ]

### 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.

    "https://instance-name.service-now.com/api/sn_cdm/applications/shared_components?sharedComponentName=paymentService-V1.1&sharedLibraryName=OracleG-Library-10&changesetNumber=Chset-20&versionName=sComp3-v2.shc&appName=App1" \ 
    --request PUT \ 
    --header "Accept:application/json" \ 
    --user 'username':'password'

Response:

    "result": {
      "changeset_id": {
        "value": "7343d0f71b771110636e0fe0604bcb0b",
        "link": "https://instance-name.service-now.com/api/now/table/sn_cdm_changeset/7343d0f71b771110636e0fe0604bcb0b"
      },
      "node_path": "!2!3!&`",
      "description": null,
      "sys_updated_on": "2022-12-22 18:52:38",
      "type": "sn_cdm_node_linked_shared_component",
      "sys_class_name": "sn_cdm_node",
      "sys_id": "339314b71b771110636e0fe0604bcba3",
      "sys_updated_by": "admin",
      "previous_version": {
        "value": "a9ce80bf1b371110636e0fe0604bcb10",
        "link": "https://instance-name.service-now.com/api/now/table/sn_cdm_node/a9ce80bf1b371110636e0fe0604bcb10" 
      },
      "sys_created_on": "2022-12-22 18:52:38",
      "value": null,
      "effective_from": null,
      "linked_to": "146", 
      "sys_created_by": "admin",
      "restricted_to": null,
      "linked_to_version": {
        "value": "54115c371b771110636e0fe0604bcb77",
        "link": "https://instance-name.service-now.com/api/now/table/sn_cdm_snapshot/54115c371b771110636e0fe0604bcb77"
      },
      "level": "2",
      "conflict_type": null,
      "main_id": "166",
      "effective_to": null,
      "secure_value": null,
      "node_classifier": "/application/components",
      "main_id_encoded": "&`",
      "name": "Component_A",
      "position": null,
      "reason_for_conflict": null,
      "system_folder": false,
      "status": "updated",
      "conflict": false
    } 


