Skip to main content

REST endpoints: Action policies

These endpoints mirror the CLI commands described in Action Policies, Pending Actions. Each endpoint runs the CLI command named under its heading, so the behavior, defaults, and restrictions are the same; this page lists how to call it over REST.

Conventions that apply to every endpoint (request format, the async and outputType parameters, and the response envelope) are in Requests and responses. In the tables below, Required is Yes when the parameter must always be supplied, No when it is optional, and Depends when it is required only in some combinations (for example, either an application and volume, or a consistency group ID); the CLI chapter for the same command explains the combinations.

POST /action_policies/create

Create an action policy that enforces rules in S1.

CLI command: action_policies create

Body fields (JSON)

Name Type Required Description
EntityType string Yes The entity type this action policy applies to.
OperationType string Yes The operation type this action policy applies to.
AuthorizedReviewers array of string Yes Usernames of the admins authorized to review this policy's pending actions. Must include at least MinimumRequiredReviewers admins.
MinimumRequiredReviewers integer Yes The minimum number of admin approvals required (at least 2).

DELETE /action_policies/delete

Delete an action policy.

CLI command: action_policies delete

Query parameters

Name Type Required Description
name string Yes The name of the action policy to delete.

PUT /action_policies/edit

Edit an existing action policy that enforces rules in S1.

CLI command: action_policies edit

Query parameters

Name Type Required Description
name string Yes The name of the action policy to edit.

Body fields (JSON)

Name Type Required Description
AuthorizedReviewers array of string Yes Usernames of the admins authorized to review this policy's pending actions. Must include at least MinimumRequiredReviewers admins.
MinimumRequiredReviewers integer Yes The minimum number of admin approvals required (at least 2).

GET /action_policies/list

List configured action policies.

CLI command: action_policies list

Query parameters

Name Type Required Description
name string No Filter action policies by name.
entityType string No Filter by entity type.
operationType string No Filter by operation type.

Response: a list of ActionPolicyElement objects in Result.ActionPolicyElement, each with: Id (integer), Name (string), EntityType (string), OperationType (string), MinimumRequiredReviewers (integer), AuthorizedReviewers (array of string).

PUT /action_policies/pending_actions/approve

Approve a pending action.

CLI command: action_policies pending_actions approve

Body fields (JSON)

Name Type Required Description
Id integer Yes The ID of the pending action to approve.

PUT /action_policies/pending_actions/decline

Decline a pending action.

CLI command: action_policies pending_actions decline

Body fields (JSON)

Name Type Required Description
Id integer Yes The ID of the pending action to decline.

DELETE /action_policies/pending_actions/delete

Delete a pending action.

CLI command: action_policies pending_actions delete

Query parameters

Name Type Required Description
id integer Yes The ID of the pending action to delete.

GET /action_policies/pending_actions/list

List pending actions.

CLI command: action_policies pending_actions list

Query parameters

Name Type Required Description
id integer No Filter pending actions by ID.
onlyMyPendingActions boolean No Show only pending actions relevant to you.
waitingForMyReview boolean No Show only pending actions awaiting your review.

Response: a list of PendingActionListElement objects in Result.PendingActionListElement, each with: Id (integer), ActionPolicy (string), ActionDescription (string), Approvers (array of string), Decliners (array of string), ReviewableBy (array of string), Timestamp (date-time), InitiatedBy (string).


See also: Requests and responses - Authentication - Examples