Update Role

Updates a Role by its ID.

PUT
/v2/manage/roles/{id}

Updates a Role by its ID.

Authorization

apikey<token>

Tenant API Key for authentication

In: query

apisecret<token>

Tenant API Secret for authentication

In: query

Path Parameters

id*string

Role ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://api.loginradius.com/v2/manage/roles/role_2enk23n3" \  -H "Content-Type: application/json" \  -d '{    "Name": "Admin",    "Description": "Admin Role",    "Permissions": [      "perm_23hi32n"    ]  }'
{
  "Id": "role_dsag432d",
  "Name": "Admin",
  "Description": "Admin Role",
  "Level": "org",
  "OrgId": "org_fasf432d",
  "OriginalName": "Admin",
  "Permissions": [
    {
      "ID": "perm_2enk23n3",
      "Name": "read:users",
      "Description": "Read users data",
      "OriginalName": "read:users",
      "ResourceId": "507f1f77bcf86cd799439011"
    }
  ],
  "CreatedDate": "2023-10-01T00:00:00Z",
  "ModifiedDate": "2023-10-01T00:00:00Z"
}

{
  "Message": "Put body is invalid or empty",
  "Description": "Please use a valid put body in JSON format in order to process this request.",
  "ErrorCode": 7934
}

{
  "Message": "Access Unauthorized",
  "Description": "Access Unauthorized, please use valid authorization to access this endpoint.",
  "ErrorCode": 6002
}

{
  "ErrorCode": 8125,
  "Message": "Role does not exist",
  "Description": "Role does not exist, Please provide valid Role id."
}

{
  "ErrorCode": 8123,
  "Message": "Duplicate Role name",
  "Description": "Duplicate Role name, Please provide valid Role name."
}
{
  "Message": "Operation failed due to an internal error.",
  "Description": "An unknown internal error occurred, please try again in a few minutes or contact your system administrator.",
  "ErrorCode": 7909
}