Get roles
- Last Updated: February 2, 2024
- 2 minute read
- Hybrid Data Pipeline
- Version 5.0
- Documentation
Purpose
Returns list of available roles
URL
https://<myserver>:<port>/api/admin/roles
Method
GET
URL Parameters
<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a non-load balancer deployment, or the machine hosting the load balancer for a load balancer deployment. For a non-load balancer deployment, <port> is the port number specified as the Server Access Port during deployment. For a load balancer deployment, <port> must be either 80 for http or 443 for https. Whenever port 80 or 443 are used, it is not necessary to include the port number in the URL.
Response Definition
The response takes the following format. The parameters of the response are described in the table that follows.
{
"roles": [
{
"id": role_id,
"name": "role_name",
"tenantId": tenant_id,
"description": "role_description"
},
...
]
}
| Property | Description | Valid Values |
|---|---|---|
| "id" | The ID of the role. | The ID of a predefined role, such as a system administrator, or the ID of a role created by an administrator. The ID of a role cannot be changed. |
| "name" | The name of the role. | System
Administrator | User
| Tenant Administrator | custom_role
|
| "tenantId" | The ID of the tenant to which the role belongs. | A valid tenant ID. |
| "description" | The description of the role. | System Administrator
role has all permissions. This role cannot be deleted, and only the
users associated with it via the "users" property can be modified.
Other properties, such as "name" and "permissions," cannot be
modified. User role has all permissions associated with a user who might query data sources directly. This role cannot be deleted, and only the users associated with it via the "users" property can be modified. Other properties, such as "name" and "permissions," cannot be modified. Tenant Administrator role has user permissions and permissions associated with provisioning users. This role cannot be deleted, and only the users associated with it via the "users" property can be modified. Other properties, such as "name" and "permissions," cannot be modified. Optionally, administrators can provide a description for any roles they create. |
Sample Server Success Response
Status code: 200
Successful response
{
"roles": [
{
"id": 1,
"name": "System Administrator",
"tenantId": 1,
"description": "This role has all permissions. This role cannot
be modified or deleted."
},
{
"id": 2,
"name": "User",
"tenantId": 1,
"description": "This role has the default permissions that a normal
user will be expected to have."
},
{
"id": 3,
"name": "Tenant Administrator",
"tenantId": 1,
"description": "This role has all the tenant administrator
permissions."
},
{
"id": 72,
"name": "User",
"tenantId": 57,
"description": "This role has the default permissions that a normal
user will be expected to have."
},
{
"id": 73,
"name": "Tenant Administrator",
"tenantId": 57,
"description": "This role has all the tenant administrator
permissions."
}
]
}
Sample Server Failure Response
{
"error":{
"code":222207919,
"message":{
"lang":"en-US",
"value":"Problem getting Roles at this time. Please try
again at another time."
}
}
}
Authentication
Basic Authentication using Login ID and Password
Authorization
The user must have the Administrator (12) permission, or the ViewRole (18) permission and administrative access on the tenant.