Policies
Bulk Import Policies
Bulk import multiple policies from JSON.
IDs from the import are ignored; new IDs will be generated for each policy. Returns a summary of successful and failed imports. Requires admin role.
Request Body
application/json
policies*
Items
1 <= items <= 100Response Body
application/json
application/json
curl -X POST "https://api.grayswan.ai/policies/bulk-import" \ -H "Content-Type: application/json" \ -d '{ "policies": [ { "name": "string" } ] }'{
"total": 0,
"successful": 0,
"failed": 0,
"results": [
{
"name": "string",
"success": true,
"id": "string",
"error": "string"
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}