Create Policy Definition
POST {{baseUrl}}/api/portal/policies/
Creating policy definitions is slightly different to the core API, API definitions are wrapped inside an apidefinition field and event handlers, such as webhooks are not embedded in the main apidefintion object (though they can be), webhooks are instead appended as references into the hook_references field, the API will embed the correct webhook data into the event handler interface.
Request Body
{"name"=>"new policy", "quota_max"=>60, "quota_renewal_rate"=>60, "allowance"=>100, "rate"=>100, "per"=>5, "org_id"=>"53ac07777cbb8c2d53000002"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"action":"created","status":"ok"}