Attach a policy to an identity
POST
/auth/v1/memberships/{orgId}/policies/{policyId}/attachmentsAttaches the given policy to an identity so the policy's permissions apply to that identity.
Authorization
Bearer Authorization<token>
In: header
Path Parameters
orgId*string
Organization ID
policyId*string
Policy ID
Request Body
requiredapplication/json{
"$ref": "#/components/schemas/internal_auth.attachPolicyBody",
"$ref-value": {
"properties": {
"identity_id": {
"type": "string"
},
"identity_type": {
"type": "string"
}
},
"required": [
"identity_id",
"identity_type"
],
"type": "object"
}
}Response Body
201application/json
Created
type: unknown
{
"$ref": "#/components/schemas/authv1.PolicyAttachment",
"$ref-value": {
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"identity_id": {
"type": "string"
},
"identity_type": {
"type": "string"
},
"policy_id": {
"type": "string"
}
},
"type": "object"
}
}curl -X POST "https://api.rixl.com/auth/v1/memberships/string/policies/string/attachments" \
-H "Content-Type: application/json" \
-d '{
"identity_id": "string",
"identity_type": "string"
}'Created
application/json
{
"$ref": "#/components/schemas/authv1.PolicyAttachment",
"$ref-value": {
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"identity_id": {
"type": "string"
},
"identity_type": {
"type": "string"
},
"policy_id": {
"type": "string"
}
},
"type": "object"
}
}