Role - Deletes a role by ID

Deletes an existing role identified by its ID, with the condition that only non-editable roles can be removed.

Only non-editable roles can be deleted.

DELETE/roles/{roleId}
Authorization
Path parameters
roleId*string (uuid)

Enter the ID of the existing role to be deleted.

Query parameters
Response

Success: Role deleted successfully.

Body
messagenullable string
A public property of type string that has both a getter and a setter method, which allows for getting and setting the value of the Message property.
statusCodeinteger (int32)
A public property of type integer that has both a getter and a setter method, which allows for getting and setting the value of the StatusCode property.
Request
const response = await fetch('/roles/{roleId}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer JWT"
    },
});
const data = await response.json();
Response
{
  "message": "Success Message",
  "statusCode": 200
}

Last updated