/policyengine/v1/policies/<policy_name>/<action>: POST

Applies action to policy.

This API endpoint helps you start, kill, pause, and resume a policy. You need to add the required action start, pause, resume, kill to the following path: /policyengine/v1/policies/{pol_id}/{action}.

The table shows the roles that can access this REST API endpoint:
Table 1. Access by role
Data admin Data user Collection Admin Collection user Admin Service user
1 1 X X X
1 Users with Collection Admin role can access this endpoint only if they are owners of the policy or can access one or more collections that are included in the policy.

Users with Data User role can access this endpoint only if they are owners of the policy.

Synopsis of the request URL

curl -k -H 'Authorization: Bearer <token>' 
https://<spectrum_discover_host>/policyengine/v1/policies/policy_name/action -X POST -H ’Content-type: application/json’ 

Supported request types and response formats

Supported request types:
  • POST
Supported response formats:
  • JSON

Examples

The following example shows how to start a policy by applying the start action.

Issue the following request on one line:
curl -k -H 'Authorization: Bearer <token>'  
https://<spectrum_discover_host>/policyengine/v1/pol_2/start 
 -X POST -H ’Content-type: application/json’

The following response is returned:

Accepted