/auth/v1/collections/<collection_id>/role_assignments: GET
Returns a list of the users and groups and their roles that are assigned to the collection.
The following table shows which roles can access this REST API endpoint:
| Data admin | Data user | Collection Admin | Admin | Service user |
|---|---|---|---|---|
| ✓ | X | 1✓ | ✓ | X |
| The specified collection must be one that is assigned to the requesting user ID. If no collection is assigned, then the command fails with error 403, "Not authorized". | ||||
Synopsis of the request URL
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/collections/<collection_id>/role_assignments
Supported request types and response formats
Supported request types:
- GET
- JSON
Examples
The following example shows how to get the list of groups to which the collection belongs:
Request:
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/collections/a51f84bfeb034b12a9a362109d78bec3/role_assignments Response:
{
"groups": [
{
"description": "",
"domain_id": "default",
"id": "fccc7d34ee1d43128f2fda479f9f63e9",
"name": "test_data_user_darko_group",
"roles": [
{
"domain_id": null,
"id": "73f471083b444117ba469d867c98c9b0",
"name": "datauser"
}
]
}
],
"users": [
{
"description": "Test collection admin 3",
"domain_id": "default",
"email": "test_cadmin3@x.cmo",
"enabled": true,
"id": "154e1a1bb1fc40569924a0bd12ef7c0c",
"name": "test_cadmin3",
"options": {},
"password_expires_at": null,
"roles": [
{
"domain_id": null,
"id": "55567000f3594155a1158edb6b5a9158",
"name": "collectionadmin"
}
]
}
}