Create A Custom API Role Policy
POST/v2/permissions/custom-api-role-policies
Create A Custom API Role Policy
Request
- application/json
Body
data CustomAPIRolePolicyAttributesrequired
Specifies the type of the resource object, use custom_api_role_policy
for Custom API Role Policies.
Specifies if the Built-in Role can create a Custom API Entry.
Specifies if the Built-in Role can retrieve a list of Custom API Entries.
Specifies if the Built-in Role can get a Custom API Entry.
Specifies if the Built-in Role can update a Custom API Entry.
Specifies if the Built-in Role can delete a Custom API Entry.
relationships objectrequired
custom_api objectrequired
data objectrequired
The unique identifier for the related Custom API.
Specifies the type of the resource object.
role objectrequired
data objectrequired
The unique identifier for the related Built-In Role.
Specifies the type of the resource object.
Responses
- 201
- 400
- 409
- 500
Created
- application/json
- Schema
- Example (from schema)
Schema
data object
The unique identifier for the Custom API Role Policy.
Specifies the type of the resource object, use custom_api_role_policy
for Custom API Role Policies.
Specifies if the Built-in Role can create a Custom API Entry.
Specifies if the Built-in Role can retrieve a list of Custom API Entries.
Specifies if the Built-in Role can get a Custom API Entry.
Specifies if the Built-in Role can update a Custom API Entry.
Specifies if the Built-in Role can delete a Custom API Entry.
links object
Specifies the URI of the Built-In Role.
meta object
timestamps objectrequired
Specifies the date the entity is created.
Specifies the date the entity is last updated.
relationships object
custom_api objectrequired
data objectrequired
The unique identifier for the related Custom API.
Specifies the type of the resource object.
role objectrequired
data objectrequired
The unique identifier for the related Built-In Role.
Specifies the type of the resource object.
{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "string",
"create": true,
"list": true,
"read": true,
"update": true,
"delete": true,
"links": {
"self": "/v2/permissions/custom-api-role-policies/3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"meta": {
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244Z",
"created_at": "2017-01-10T11:41:19.244Z"
}
},
"relationships": {
"custom_api": {
"data": {
"id": "652e39d8-d613-493e-8c20-fef99ad6327a",
"type": "string"
}
},
"role": {
"data": {
"id": "f5f77dd6-71df-48a4-b4f4-d2605a79f3ca",
"type": "string"
}
}
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Bad Request",
"status": "400",
"detail": "The field 'name' is required."
}
]
}
Unable to perform the operation at this time.
- application/json
- Schema
- Example (from schema)
- duplicate-custom-api
- duplicate-custom-field
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Conflict",
"status": "409",
"detail": "custom_api with the given api_type already exists"
}
]
}
{
"errors": [
{
"title": "Conflict",
"status": "409",
"detail": "custom_field with the given slug already exists"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "there was a problem processing your request"
}
]
}