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.
The brand URL of the request. This is used to identify the brand.
YOUR_BRAND_URL
This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.
YOUR_AUTH_KEY
This class is used when creating or updating a Role.
The code of the Role.
EXAMPLE
The name of the Role.
Example
The description of the Role.
Description
The tags of the Role.
#Example
The request was successful.
The user is not authorized to access the requested resource. The request is missing the required Auth-Key header.
The user's access was denied.
The user has exceeded the rate limit.
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": "3eda4c8b-882d-4669-a932-10ea60bd5d19",
"code": "EXAMPLE",
"name": "Example",
"description": "Description",
"tags": "#Example",
"type": "Custom",
"permissions": [
"Resource.Action"
]
},
"errors": []
}
Last updated
Was this helpful?