Create a permission

Create a permission

post
Header parameters
Brand-URLstringRequired

The brand URL of the request. This is used to identify the brand.

Example: YOUR_BRAND_URL
Auth-KeystringRequired

This is used to authenticate the request. If the request is not authenticated, the server will return a 401 Unauthorized response.

Example: YOUR_AUTH_KEY
Body

This class represents the permission data transfer object.

resourceTypeIdstring · min: 1Required

The resource type id.

codestring · min: 1Required

The permission code.

namestring · min: 1Required

The name of the permission.

descriptionstring | nullableOptional

The description of the permission.

tagsstring | nullableOptional

The tags of the permission.

Responses
201
The request was successful.
application/json
post
POST /api/v1/permissions HTTP/1.1
Host: protocol.jframework.io
Brand-URL: text
Auth-Key: text
Content-Type: application/json
Accept: */*
Content-Length: 142

{
  "resourceTypeId": "USER",
  "code": "USER.VIEW",
  "name": "View User",
  "description": "Allows viewing user details and profiles.",
  "tags": "#user #read"
}
{
  "success": true,
  "statusCode": 201,
  "message": "The request was successful.",
  "data": {
    "id": "sApKpllz4sAplsmzha",
    "parentBrandId": "sApKpllz4sAplsmzha",
    "resourceTypeId": "sApKpllz4sAplsmzha",
    "guid": "48bbc559-7456-4d8a-977d-387c502725ac",
    "code": "PERMISSION_CODE",
    "name": "Permission Name",
    "description": "Permission Description",
    "tags": "Permission Tags",
    "type": "Custom"
  },
  "errors": []
}

Last updated

Was this helpful?