CdmPoliciesApi
-
- UpdatedJan 30, 2025
- 12 minutes to read
- Yokohama
- API reference
The CdmPoliciesApi provides endpoints that enable you to manage policy mappings of deployables in Configuration Data Management (CDM). Policies that are properly mapped to a deployable are executed when a snapshot of the deployable is validated.
- Scripted REST CDM View ACL
- Scripted REST CDM Admin ACL
In addition, the Configuration Data Management (CDM) plugin must be activated for this API to be available in an instance.
For additional information on policy mappings, see Map policies to a deployable.
CdmPoliciesApi - DELETE /sn_cdm/policies/mappings
Deletes the mapping of a specified policy to a deployable.
The caller of this endpoint must have the CDM Admin role.
URL format
Versioned URL: /api/sn_cdm/{api_version}/policies/mappings
Default URL: /api/sn_cdm/policies/mappings
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
appName | Required. Name of the Configuration Data Management (CDM) application for which to remove the mapping to the policy. Data type: String Table: CDM Application [sn_cdm_application] |
deployableName | Required. Name of the CDM deployable for which to remove the mapping to the policy. Data type: String Table: CDM Deployable [sn_cdm_deployable] |
policyName | Required. Name of the associated policy. Data type: String Table: Policy [sn_pace_policy] |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. The policyName parameter passed is invalid. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Name | Description |
---|---|
error | If an error occurred during processing, the details about the error. Data type: Object |
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 |
Example: cURL request
The following code example shows how to remove a policy mapping.
For a successful deletion of the mapping, no response is returned other than the HTTP status code.
CdmPoliciesApi - GET /sn_cdm/policies/mappings/inputs/resolved
Returns the resolved inputs for a specified policy mapping of a deployable.
For additional information on policy mappings, see Map policies to a deployable and Validating and correcting configuration data.
The caller of this endpoint must have the CDM Viewer role.
URL format
Versioned URL: /api/sn_cdm/{api_version}/policies/mappings/inputs/resolved
Default URL: /api/sn_cdm/policies/mappings/inputs/resolved
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
appName | Required. Name of the Configuration Data Management (CDM) application associated with the deployable for which to return the resolved policy inputs. Data type: String Table: CDM Application [sn_cdm_application] |
deployableName | Required. Name of the CDM deployable for which to return the resolved policy. Data type: String Table: CDM Deployable [sn_cdm_deployable] |
policyName | Required. Name of the associated policy. Data type: String Table: Policy [sn_pace_policy] |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. The policyName parameter passed is invalid. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Name | Description |
---|---|
result | Name-value pair list of all resolved inputs for the specified policy mapping.
For example: Data type: Object |
Example: cURL request
The following example shows how to use this endpoint to obtain the resolved policy inputs.
Return result:
CdmPoliciesApi - POST /sn_cdm/policies/mappings
Maps a specified policy to a deployable.
The caller of this endpoint must have the CDM Admin role.
URL format
Versioned URL: /api/sn_cdm/{api_version}/policies/mappings
Default URL: /api/sn_cdm/policies/mappings
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Content-Type | Data format of the request body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. A bad request type or malformed request was detected. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
This code example shows how to map a specific policy to a deployable.
Return results:
CdmPoliciesApi - PUT /sn_cdm/policies/mappings/inputs/additional-deployables
Updates the additionalDeployablesInput input variable of a Configuration Data Management (CDM) policy mapping.
The additionalDeployablesInput input variable contains the additional deployables you can assign to an existing policy mapping. They are similar to mapping inputs, but they have a specific array structure.
For additional information on policy mappings, see Map policies to a deployable.
The caller of this endpoint must have the CDM Admin role.
URL format
Versioned URL: /api/sn_cdm/{api_version}/policies/mappings/inputs/additional-deployables
Default URL: /api/sn_cdm/policies/mappings/inputs/additional-deployables
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Content-Type | Data format of the request body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. The policyName parameter passed is invalid. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
The following example shows how to add deployables to an additionalDeployablesInput input variable.
Return result:
CdmPoliciesApi - PUT /sn_cdm/policies/mappings/inputs
Updates a specified input variable for a Configuration Data Management (CDM) policy mapping.
For additional information on policy mappings, see Map policies to a deployable.
The caller of this endpoint must have the CDM Admin role.
URL format
Versioned URL: /api/sn_cdm/{api_version}/policies/mappings/inputs
Default URL: /api/sn_cdm/policies/mappings/inputs
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response body. Only supports application/json. |
Content-Type | Data format of the request body. Only supports application/json. |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code | Description |
---|---|
200 | Successful. The request was successfully processed. |
400 | Bad Request. The policyName parameter passed is invalid. |
500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
Response body parameters
Example: cURL request
The following example shows how to update the key1 input variable associated with the testALPolicy.
Return results: