Create a role
Note: New roles are not associated with any permissions by default. To assign existing permissions to your role, review Associate Permissions with a Role. To create new permissions, review Add API Permissions.
Header parameters
Brand-URLstringRequiredExample:
The brand URL of the request. This is used to identify the brand.
YOUR_BRAND_URL
Auth-KeystringRequiredExample:
This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.
YOUR_AUTH_KEY
Body
This class is used when creating or updating a Role.
codestring · min: 1RequiredExample:
The code of the Role.
EXAMPLE
namestring · min: 1RequiredExample:
The name of the Role.
Example
descriptionstring | nullableOptionalExample:
The description of the Role.
Description
tagsstring | nullableOptionalExample:
The tags of the Role.
#Example
Responses
201
The request was successful.
application/json
401
The user is not authorized to access the requested resource. The request is missing the required Auth-Key header.
application/json
403
The user's access was denied.
application/json
429
The user has exceeded the rate limit.
application/json
post
POST /api/v1/roles HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 161
{
"code": "DEVELOPER",
"name": "Developer",
"description": "Role for software developers with access to development tools and project resources.",
"tags": "#it #system"
}
{
"success": true,
"statusCode": 200,
"message": "The request was successful.",
"data": {
"id": "sApKpllz4sAplsmzha",
"parentBrandId": null,
"guid": "1d069dc3-097c-48da-bbed-edb50f94d66d",
"code": "EXAMPLE",
"name": "Example",
"description": "Description",
"tags": "#Example",
"type": "Custom",
"permissions": [
"Resource.Action"
]
},
"errors": []
}
Last updated
Was this helpful?