Create a permission
How to create a permission via API
To create a new permission, send a POST
request to the /api/permissions
endpoint, passing the resource arguments in the request body.
Request
POST https://provisioning.commercelayer.io/api/permissions
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
attributes.can_create |
| Required |
attributes.can_read |
| Required |
attributes.can_update |
| Required |
attributes.can_destroy |
| Required |
attributes.subject |
| Required |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.role |
| Required |
Example
The following request creates a new permission:
Last updated