The DevOps Config API provides endpoints to manage your applications.
This API requires the DevOps Config application and is provided within the sn_devops_config namespace.
For DELETE, PATCH, and POST operations, the calling user must have the sn_devops_config.admin role. For GET operations, the calling user must have the sn_devops_config.viewer or sn_devops_config.admin role.
Use the DevOps Config API for application life cycle management. For more information about managing applications with DevOps Config, see Configuring DevOps Config.
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
appid
Sys\_id of the application to delete.Data type: String Table: CDM Application \[sn\_cdm\_application\]
Name
Description
None
Name
Description
None
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header
Description
Accept
Data format of the response body. Only supports application/json.
Header
Description
None
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Status code
Description
200
Successful. The request was successfully processed.
400
Bad request. Invalid application id.
403
Forbidden. The user doesn't have permission to access the API.
Response body parameters (JSON)
Name
Description
error
Error information. This parameter is only returned if the request failed.Data type: Object
Additional details about why the request failed.Data type: String
error.message
Error message containing the reason the request failed.Data type: String
result
Result object containing information about the request.Data type: Object ``` "result": { "errors": [Array], "success": [Array] }
</td></tr><tr><td>
result.errors
</td><td>
Array of errors from the request. The array is empty for successful requests.Data type: Array
</td></tr><tr><td>
result.success
</td><td>
Success message for the request. The array is empty for failed requests.Data type: Array
</td></tr><tr><td>
status
</td><td>
Status of the request. This parameter is only returned if the request failed.Possible value: failure
Data type: String
</td></tr></tbody>
</table>
### cURL request
This example deletes an application.
{ "error": { "message": "User Not Authorized", "detail": "Failed API level ACL Validation" }, "status": "failure" }
## DevOps Config - GET /devops\_config/application/\{appid\}
Retrieves an application.
### URL format
Versioned URL: `/api/sn_devops_config/{api_version}/devops_config/application/{appid}`
Default URL: `/api/sn_devops_config/devops_config/application/{appid}`
**Note:** Available versions are specified in the [REST API Explorer](../rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](../rest-api-explorer/c_CustomWebServices.md).
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
api\_version
</td><td id="version-entry-RESTAPI">
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
</td></tr><tr><td>
appid
</td><td>
Sys\_id of the application to retrieve.Data type: String
Table: CDM Application \[sn\_cdm\_application\]
</td></tr></tbody>
</table>
|Name|Description|
|----|-----------|
|None| |
|Name|Description|
|----|-----------|
|None| |
### Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see [Supported REST API headers](../rest-api-explorer/c_RESTAPI.md).
|Header|Description|
|------|-----------|
|Accept|Data format of the response body. Only supports **application/json**.|
|Header|Description|
|------|-----------|
|None| |
### Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see [REST API HTTP response codes](../rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Successful. The request was successfully processed.|
|400|Bad request. Invalid application id.|
|403|Forbidden. The user doesn't have permission to access the API.|
### Response body parameters \(JSON\)
<table id="table_z3v_z5d_gvb"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
error
</td><td>
Error information. This parameter is only returned if the request failed.Data type: Object
</td></tr><tr><td>
error.detail
</td><td>
Additional details about why the request failed.Data type: String
</td></tr><tr><td>
error.message
</td><td>
Error message containing the reason the request failed.Data type: String
</td></tr><tr><td>
result
</td><td>
Result object containing information about the request.Data type: Object
"result": { "data": {Object}, "message": "String", "status": Number }
</td></tr><tr><td>
result.data
</td><td>
Data for the application.Data type: Object
</td></tr><tr><td>
result.data.appDescription
</td><td>
Description of the application.Data type: String
</td></tr><tr><td>
result.data.appId
</td><td>
Sys\_id of the application.Data type: String
Table: CDM Application \[sn\_cdm\_application\]
</td></tr><tr><td>
result.data.appManagedByGroups
</td><td>
Comma-separated list of sys\_ids of the groups that manage the application.Data type: String
Table: Group \[sys\_user\_group\]
</td></tr><tr><td>
result.data.appManufacturerId
</td><td>
Sys\_id of the manufacturer.Data type: String
Table: Company \[core\_company\]
</td></tr><tr><td>
result.data.appManufacturerName
</td><td>
Name of the manufacturer.Data type: String
</td></tr><tr><td>
result.data.appModelId
</td><td>
Sys\_id of the application model.Data type: String
Table: Application Model \[cmdb\_application\_product\_model\]
</td></tr><tr><td>
result.data.appModelName
</td><td>
Name of the application model.Data type: String
Table: Application Model \[cmdb\_application\_product\_model\]
</td></tr><tr><td>
result.data.appModelOwnerId
</td><td>
Sys\_id of the application model owner.Data type: String
Table: User \[sys\_user\]
</td></tr><tr><td>
result.data.appModelOwnerName
</td><td>
Name of the application model owner.Data type: String
</td></tr><tr><td>
result.data.appName
</td><td>
Name of the application.Data type: String
</td></tr><tr><td>
result.data.error
</td><td>
Error information. This parameter is only returned if the request failed.Data type: String
</td></tr><tr><td>
result.data.sdlcType
</td><td>
Type of application.Possible values:
- application
- infrastructure
Data type: String
</td></tr><tr><td>
result.message
</td><td>
Information about the successful or unsuccessful outcome of the request.Data type: String
</td></tr><tr><td>
result.status
</td><td>
Status code for the request.Possible values:
- 200
- 400
- 403
Data type: Number
</td></tr><tr><td>
status
</td><td>
Status of the request. This parameter is only returned if the request failed.Possible value: failure
Data type: String
</td></tr></tbody>
</table>
### cURL request
This example retrieves an application.
{ "result": { "status": 400, "message": "No valid Application", "data": { "error": "No valid Application" } } }
## DevOps Config - PATCH /devops\_config/application/\{appid\}
Updates an application.
### URL format
Versioned URL: `/api/sn_devops_config/{api_version}/devops_config/application/{appid}`
Default URL: `/api/sn_devops_config/devops_config/application/{appid}`
**Note:** Available versions are specified in the [REST API Explorer](../rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](../rest-api-explorer/c_CustomWebServices.md).
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
api\_version
</td><td id="version-entry-RESTAPI">
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
</td></tr><tr><td>
appid
</td><td>
Sys\_id of the application to update.Data type: String
Table: CDM Application \[sn\_cdm\_application\]
</td></tr></tbody>
</table>
|Name|Description|
|----|-----------|
|None| |
<table class="rest_api_request_body"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
appDescription
</td><td id="app-descr">
Description of the application.Data type: String
</td></tr><tr><td>
appManagedByGroups
</td><td>
Comma-separated list of sys\_ids of the groups that manage the application. The calling user must belong to these groups.
"appManagedByGroups": "sys_id, sys_id"
Data type: String
Table: Group \[sys\_user\_group\]
</td></tr><tr><td>
appManufacturerId
</td><td id="app-mfct">
Sys\_id of the manufacturer.Data type: String
Table: Company \[core\_company\]
</td></tr><tr><td>
appModelOwnerId
</td><td id="app-owner-id">
Sys\_id of the application model owner.Data type: String
Table: User \[sys\_user\]
</td></tr></tbody>
</table>
### 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](../rest-api-explorer/c_RESTAPI.md).
|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](../rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|200|Application successfully updated.|
|403|Forbidden. The user doesn't have permission to access the API.|
|404|Application not updated. The **message** property in the **result** object contains additional information about the error.|
### Response body parameters \(JSON\)
<table id="table_z3v_z5d_gvb"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
error
</td><td>
Error information. This parameter is only returned if the request failed.Data type: Object
</td></tr><tr><td>
error.detail
</td><td>
Additional details about why the request failed.Data type: String
</td></tr><tr><td>
error.message
</td><td>
Error message containing the reason the request failed.Data type: String
</td></tr><tr><td>
result
</td><td>
Result object containing information about the application.Data type: Object
</td></tr><tr><td>
result.data
</td><td>
Sys\_id of the application.Data type: String
Table: CDM Application \[sn\_cdm\_application\]
</td></tr><tr><td>
result.message
</td><td>
Information about the successful or unsuccessful outcome of the request.Data type: String
</td></tr><tr><td>
status
</td><td>
Status of the request. This parameter is only returned if the request failed.Possible value: failure
Data type: String
</td></tr></tbody>
</table>
### cURL request
This example updates an existing application.
{ "result": { "message": "Application with name Demo Application 1234 updated successfully.", "data": "38e17dc3473d111072566862736d43c7" } }
## DevOps Config - POST /devops\_config/application
Creates an application.
### URL format
Versioned URL: `/api/sn_devops_config/{api_version}/devops_config/application`
Default URL: `/api/sn_devops_config/devops_config/application`
**Note:** Available versions are specified in the [REST API Explorer](../rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](../rest-api-explorer/c_CustomWebServices.md).
### Supported request parameters
<table class="rest_api_path_parameters"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
api\_version
</td><td id="version-entry-RESTAPI">
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
</td></tr></tbody>
</table>
|Name|Description|
|----|-----------|
|None| |
<table class="rest_api_request_body"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
appDescription
</td><td id="app-descr">
Description of the application.Data type: String
</td></tr><tr><td>
appManagedByGroups
</td><td>
Comma-separated list of sys\_ids of the groups that manage the application. The calling user must belong to these groups.
"appManagedByGroups": "sys_id, sys_id"
Data type: String
Table: Group \[sys\_user\_group\]
</td></tr><tr><td>
appManufacturerId
</td><td id="app-mfct">
Sys\_id of the manufacturer.Data type: String
Table: Company \[core\_company\]
</td></tr><tr><td>
appModelId
</td><td><p>Sys_id of an existing application model to use to create the application.If this parameter is provided, don't provide the <strong>appName</strong>, <strong>appModelName</strong>, <strong>appServiceName</strong>, <strong>appServiceId</strong>, or <strong>technicalServiceId</strong> parameters.</p>
<p>Data type: String</p>
<p>Table:Application Model [cmdb_application_product_model]</p></td></tr><tr><td>
appModelName
</td><td><p>Name of an existing application model to use to create the application. If this parameter is provided, don't provide the <strong>appName</strong>, <strong>appModelId</strong>, <strong>appServiceName</strong>, <strong>appServiceId</strong>, or <strong>technicalServiceId</strong> parameters.</p>
<p>Data type: String</p>
<p>Table: Application Model [cmdb_application_product_model]</p></td></tr><tr><td>
appModelOwnerId
</td><td id="app-owner-id">
Sys\_id of the application model owner.Data type: String
Table: User \[sys\_user\]
</td></tr><tr><td>
appName
</td><td><p>Name of the application.Don't use the same name as any existing application.</p>
<p>If this parameter is provided, don't provide the <strong>appModelName</strong>, <strong>appModelId</strong>, <strong>appServiceName</strong>, <strong>appServiceId</strong>, or <strong>technicalServiceId</strong> parameters.</p>
<p>Data type: String</p></td></tr><tr><td>
appServiceId
</td><td><p>Sys_id of an existing application service to use to create the application.Use this parameter only when the <strong>type</strong> is <code>application</code>.</p>
<p>If this parameter is provided, don't provide the <strong>appName</strong>, <strong>appModelName</strong>, <strong>appModelId</strong>, <strong>appServiceName</strong>, or <strong>technicalServiceId</strong> parameters.</p>
<p>Data type: String</p>
<p>Table: Service Instance [cmdb_ci_service_auto]</p></td></tr><tr><td>
appServiceName
</td><td><p>Name of an existing application service to use to create the application.Use this parameter only when the <strong>type</strong> is <code>application</code>.</p>
<p>If this parameter is provided, don't provide the <strong>appName</strong>, <strong>appModelName</strong>, <strong>appModelId</strong>, <strong>appServiceId</strong>, or <strong>technicalServiceId</strong> parameters.</p>
<p>Data type: String</p>
<p>Table: Service Instance [cmdb_ci_service_auto]</p></td></tr><tr><td>
technicalServiceId
</td><td><p>Sys_id of an existing dynamic CI group to use to create the application.Use this parameter only when the <strong>type</strong> is <code>infrastructure</code>.</p>
<p>If this parameter is provided, don't provide the <strong>appName</strong>, <strong>appModelName</strong>, <strong>appModelId</strong>, <strong>appServiceName</strong>, or <strong>appServiceId</strong> parameters.</p>
<p>Data type: String</p>
<p>Table: Dynamic CI Group [cmdb_ci_query_based_service]</p></td></tr><tr><td>
type
</td><td>
Required. The type of application to create.Valid values:
- application
- infrastructure
Data type: String
</td></tr></tbody>
</table>
### 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](../rest-api-explorer/c_RESTAPI.md).
|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](../rest-api-explorer/c_RESTAPI.md).
|Status code|Description|
|-----------|-----------|
|201|Application successfully created.|
|403|Forbidden. The user doesn't have permission to access the API.|
|404|Application not created. The **message** property in the **result** object contains additional information about the error.|
### Response body parameters \(JSON\)
<table id="table_z3v_z5d_gvb"><thead><tr><th>
Name
</th><th>
Description
</th></tr></thead><tbody><tr><td>
error
</td><td>
Error information. This parameter is only returned if the request failed.Data type: Object
</td></tr><tr><td>
error.detail
</td><td>
Additional details about why the request failed.Data type: String
</td></tr><tr><td>
error.message
</td><td>
Error message containing the reason the request failed.Data type: String
</td></tr><tr><td>
result
</td><td>
Result object containing information about the application.Data type: Object
</td></tr><tr><td>
result.data
</td><td>
Sys\_id of the application.Data type: String
Table: CDM Application \[sn\_cdm\_application\]
</td></tr><tr><td>
result.message
</td><td>
Information about the successful or unsuccessful outcome of the request.Data type: String
</td></tr><tr><td>
status
</td><td>
Status of the request. This parameter is only returned if the request failed.Possible value: failure
Data type: String
</td></tr></tbody>
</table>
### cURL request
This example shows how to create a new application.
curl "https://instance.service-now.com/api/sn_devops_config/devops_config/application" \ --request POST \ --header "Accept:application/json" \ --header "Content-Type:application/json" \ --data "{ \"type\": \"application\", \"appName\": \"Demo Application 1234\", \"appDescription\": \"Description of Demo Application created from REST API\", \"appManufacturerId\": \"262702654725d950a34a3085d36d435e\", \"appModelOwnerId\": \"6816f79cc0a8016401c5a33be04be441\" }" \ --user 'username':'password'
Response body.
{ "result": { "message": "Application with name Demo Application 1234 created successfully.", "data": "38e17dc3473d111072566862736d43c7" } } ```