Policies

Get Policy At Version

Get the reconstructed policy state at a specific version.

The policy state is reconstructed by applying version diffs in reverse.

Raises: ResourceNotFoundError: If the policy or version does not exist.

GET
/policies/{policy_id}/versions/{version_id}

Path Parameters

policy_id*string
version_id*string

Response Body

application/json

application/json

curl -X GET "https://api.grayswan.ai/policies/string/versions/string"
{
  "id": "string",
  "policy_id": "string",
  "operation": "string",
  "timestamp": "2019-08-24T14:15:22Z",
  "user_id": "string",
  "policy_state": {
    "id": "string",
    "name": "string",
    "description": "string",
    "rules": {
      "property1": "string",
      "property2": "string"
    },
    "mode": "string",
    "pre_violation_threshold": 0,
    "pre_jb_threshold": 0,
    "post_violation_threshold": 0,
    "post_violation_jb_threshold": 0,
    "scanners_config": {},
    "is_preset": false,
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}