Get a Role by Id
Get a specific role by its roleId
.
caution
This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Get Object endpoint instead.
Endpoint
GET /v1/roles/:roleId
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
roleId | Id of the role to retrieve. | URL param | yes |
Request
- cURL
- Go
- Java
- Node.js
- Python
- Ruby
- PHP
curl "https://api.warrant.dev/v1/roles/admin" \
-H "Authorization: ApiKey YOUR_KEY"
role, err := role.Get("admin")
if err != nil {
// handle error
}
Role role = client.getRole("admin");
const role = await warrantClient.Role.get("admin");
role = warrant.Role.get("admin")
role = Warrant::Role.get("admin")
$role = $warrant->getRole("admin");
Response
{
"roleId": "admin",
"name": "Admin",
"desciption": "Grants a user admin access to the application"
}