/auth/v1/collections/<collection_ID>/users: GET
Gets a list of the users who can access a collection.
The following table shows which roles can access this REST API endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
✓ | Χ | 1✓ | ✓ | Χ |
1 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>/users
Supported request types and response formats
Supported request types:
- GET
- JSON
Examples
The following example shows how to get details of users who belong to a specific collection.
Request:
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/collections/a51f84bfeb034b12a9a362109d78bec3/users
Response:
(200 OK):
[
{
"domain_id": "default",
"email": "testuser@ibm.com",
"enabled": true,
"id": "106999c5eb7f4148932be6d24b6b772c",
"name": "test-datauser-1",
"options": {},
"password_expires_at": null
},
{
"domain_id": "default",
"enabled": true,
"id": "35470c08a699441394a0822da0161a16",
"name": "sdadmin",
"options": {},
"password_expires_at": null
},
{
"domain_id": "default",
"email": "testuser@ibm.com",
"enabled": true,
"id": "dfdb2cadca0d4e9da26e6c40e5cadbd5",
"name": "datauseruser",
"options": {},
"password_expires_at": null
}
]