Automation API#
Manage automation policies, their runs and pending approvals. See Create policies.
All paths are relative to the base URL and need the authentication described in REST API. Each operation lists the Reply CMP permissions its caller must hold.
Policies#
Get a policy definition#
GET /automation/policies/definitions/{policyId}
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
|
|
query |
string |
No |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
|
|
The resource does not exist in the tenant. |
List versions of a policy definition#
GET /automation/policies/definitions/{policyId}/versions
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
|
|
query |
string |
No |
Filter expression, for example |
|
query |
string |
No |
Comma-separated sort fields; prefix a field with |
|
query |
integer (int32) |
No |
Page number, starting at 1. Minimum 1. |
|
query |
integer (int32) |
No |
Number of items per page, 25 by default and at most 100. Minimum 1. |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
|
|
The resource does not exist in the tenant. |
List policy definitions#
GET /automation/policies/definitions
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
query |
string |
No |
Filter expression, for example |
|
query |
string |
No |
Comma-separated sort fields; prefix a field with |
|
query |
integer (int32) |
No |
Page number, starting at 1. Minimum 1. |
|
query |
integer (int32) |
No |
Number of items per page, 25 by default and at most 100. Minimum 1. |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
List policies#
GET /automation/policies/instances
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
query |
string |
No |
Filter expression, for example |
|
query |
string |
No |
Comma-separated sort fields; prefix a field with |
|
query |
integer (int32) |
No |
Page number, starting at 1. Minimum 1. |
|
query |
integer (int32) |
No |
Number of items per page, 25 by default and at most 100. Minimum 1. |
|
query |
No |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
Create a policy#
POST /automation/policies/instances
Permissions: Automation.PolicyInstance/Write
Request body (application/json, required): AddPolicyInstanceRequest
{
"tenantId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"definitionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"versionRange": ">=1.2.0 <2.0.0",
"schedule": "0 6 * * 1",
"groups": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"requiresApproval": false,
"configuration": {}
}
Responses
Status |
Description |
Body |
|---|---|---|
|
Success, no content. |
|
|
The request is invalid. The body describes the validation errors. |
|
|
The request conflicts with the current state of the resource. |
List policy runs#
GET /automation/policies/jobs
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
query |
No |
||
|
query |
string |
No |
Filter expression, for example |
|
query |
string |
No |
Comma-separated sort fields; prefix a field with |
|
query |
integer (int32) |
No |
Page number, starting at 1. Minimum 1. |
|
query |
integer (int32) |
No |
Number of items per page, 25 by default and at most 100. Minimum 1. |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
Get a policy#
GET /automation/policies/instances/{policyInstanceId}
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
|
|
The resource does not exist in the tenant. |
Update a policy#
PUT /automation/policies/instances/{policyInstanceId}
Permissions: Automation.PolicyInstance/Write
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
Request body (application/json, required): EditPolicyInstanceRequest
{
"versionRange": ">=1.2.0 <2.0.0",
"schedule": "0 6 * * 1",
"groups": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"requiresApproval": false,
"configuration": {}
}
Responses
Status |
Description |
Body |
|---|---|---|
|
Success, no content. |
|
|
The request is invalid. The body describes the validation errors. |
Delete a policy#
DELETE /automation/policies/instances/{policyInstanceId}
Permissions: Automation.PolicyInstance/Delete
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success, no content. |
|
|
The resource does not exist in the tenant. |
List runs of a policy#
GET /automation/policies/instances/{policyInstanceId}/jobs
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
|
|
query |
string |
No |
Filter expression, for example |
|
query |
string |
No |
Comma-separated sort fields; prefix a field with |
|
query |
integer (int32) |
No |
Page number, starting at 1. Minimum 1. |
|
query |
integer (int32) |
No |
Number of items per page, 25 by default and at most 100. Minimum 1. |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
List policy audit events#
GET /automation/policies/events
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
query |
string |
No |
Filter expression, for example |
|
query |
string |
No |
Comma-separated sort fields; prefix a field with |
|
query |
integer (int32) |
No |
Page number, starting at 1. Minimum 1. |
|
query |
integer (int32) |
No |
Number of items per page, 25 by default and at most 100. Minimum 1. |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
List audit events of a policy#
GET /automation/policies/instances/{policyInstanceId}/events
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
|
|
query |
string |
No |
Filter expression, for example |
|
query |
string |
No |
Comma-separated sort fields; prefix a field with |
|
query |
integer (int32) |
No |
Page number, starting at 1. Minimum 1. |
|
query |
integer (int32) |
No |
Number of items per page, 25 by default and at most 100. Minimum 1. |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
|
|
The resource does not exist in the tenant. |
Enable or disable a policy#
PUT /automation/policies/instances/{policyInstanceId}/toggle
Permissions: Automation.PolicyInstance/Write
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success, no content. |
|
|
The resource does not exist in the tenant. |
Run a policy now#
PUT /automation/policies/instances/{policyInstanceId}/trigger
Permissions: Automation.PolicyInstance/Write
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
|
|
query |
boolean |
Yes |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success, no content. |
|
|
The resource does not exist in the tenant. |
List pending approvals of a policy#
GET /automation/policies/instances/{policyInstanceId}/approvals
Permissions: Automation.PolicyInstance/Read
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success. |
array of PolicyInstanceApprovalEntry |
|
The resource does not exist in the tenant. |
Approve a batch of policy actions#
PUT /automation/policies/instances/{policyInstanceId}/approvals/{batchId}/approve
Permissions: Automation.PolicyInstance/Write
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
|
|
path |
string (uuid) |
Yes |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success, no content. |
|
|
The resource does not exist in the tenant. |
Reject a batch of policy actions#
PUT /automation/policies/instances/{policyInstanceId}/approvals/{batchId}/reject
Permissions: Automation.PolicyInstance/Write
Parameters
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
|
path |
string (uuid) |
Yes |
|
|
path |
string (uuid) |
Yes |
Responses
Status |
Description |
Body |
|---|---|---|
|
Success, no content. |
|
|
The resource does not exist in the tenant. |