Create policy
Creates a policy
Request Body required
unique id of the role to which policy is assigned
The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty.
Example: Policy title
The resource to which policy is assigned in this format namespace:uuid
.
Example: app/guardian:70f69c3a-334b-4f25-90b8-4d4f3be6b8e2
principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format namespace:uuid
. The namespace can be app/user
, app/group
or app/serviceuser
(coming up!) and uuid is the unique id of the principal.
Example: app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825
Metadata object for policies that can hold key value pairs defined in Policy Metaschema.
Example: {"labels": {"key": "value"}, "description": "Policy description"}
- 200
- 400
- 401
- 403
- 404
- 500
- default
A successful response.
Schema
policy object
The time the policy was created.
The time the policy was last updated.
{
"policy": {
"id": "string",
"title": "string",
"created_at": "2023-06-07T05:39:56.961Z",
"updated_at": "2023-06-07T05:39:56.961Z",
"role_id": "string",
"resource": "string",
"principal": "string",
"metadata": {}
}
}
Bad Request - The request was malformed or contained invalid parameters.
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Unauthorized - Authentication is required
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Forbidden - User does not have permission to access the resource
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Not Found - The requested resource was not found
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Internal Server Error. Returned when theres is something wrong with Frontier server.
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
Schema
- Array [
- ]
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}