Create a policy
POST
/auth/v1/memberships/{orgId}/policiesCreates a new authorization policy in the organization with the given name, description, and permissions.
Authorization
Bearer Authorization<token>
In: header
Path Parameters
orgId*string
Organization ID
Request Body
requiredapplication/json{
"$ref": "#/components/schemas/internal_auth.policyBody",
"$ref-value": {
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"permissions": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
}
},
"required": [
"name",
"permissions"
],
"type": "object"
}
}Response Body
201application/json
Created
type: unknown
{
"$ref": "#/components/schemas/authv1.Policy",
"$ref-value": {
"properties": {
"created_at": {
"type": "string"
},
"created_by": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"org_id": {
"type": "string"
},
"permissions": {
"items": {
"type": "string"
},
"type": "array"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
}curl -X POST "https://api.rixl.com/auth/v1/memberships/string/policies" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"permissions": [
"string"
]
}'Created
application/json
{
"$ref": "#/components/schemas/authv1.Policy",
"$ref-value": {
"properties": {
"created_at": {
"type": "string"
},
"created_by": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"org_id": {
"type": "string"
},
"permissions": {
"items": {
"type": "string"
},
"type": "array"
},
"updated_at": {
"type": "string"
}
},
"type": "object"
}
}