Policies
Import Policy
Import a single policy from JSON.
IDs from the import are ignored; a new ID will be generated. Requires admin role.
Request Body
application/json
policy*
Single policy export format (excludes org-specific and internal fields).
Response Body
application/json
application/json
curl -X POST "https://api.grayswan.ai/policies/import" \ -H "Content-Type: application/json" \ -d '{ "policy": { "name": "string" } }'{
"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"
}
]
}