Appearance
Delete a role
About 174 wordsLess than 1 minute
apiRoles
2025-03-13
MethodPOST
Request URL
/plugin/datafor-auth/api/roles/delete
Authorization
Authentication is required to use this API. The current user must have Administrator privileges.
Content Typeapplication/x-www-form-urlencoded
Preconditions
- The current user's user type must be "Administrator" to execute this API.
Description
This API deletes an existing user role from the system. Only users with administrative privileges can perform this operation.
Request Example
authority: DEV
Request Schema
Name | Location | Type | Required | Description |
---|---|---|---|---|
authority | body | string | Yes | The name of the role to be deleted. |
Response Examples
Successful Response (HTTP 200)
{
"success": true
}
Failure Response (Example)
{
"msg": "Role not found",
"success": false
}
HTTP Responses
HTTP Status Code | Meaning | Description | Data Schema |
---|---|---|---|
200 | OK | Request was successful | Inline |
Response Data Schema (HTTP 200)
Name | Type | Required | Description |
---|---|---|---|
success | boolean | Yes | Indicates whether the role was successfully deleted. |
msg | string | No | Response message (only present when the request fails). |