/auth/v1/collections: GET
Gets the details of the collections that are available in the system.
The following table shows which roles can access this REST API endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
✓ | ✓1 | ✓1 | ✓ | X |
1 The list that is returned comprises the set of collections that are assigned to the requesting User ID. If no collections are assigned, then an empty response is returned. |
Synopsis of the request URL
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/collections
Supported request types and response formats
Supported request types:
- GET
- JSON
Examples
The following example shows how to get the details of collections that are available in the system.
Request:
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/collections
Response:
(200 OK):
{
"collections": [
{
"description": "Bootstrap project for initializing the cloud.",
"domain_id": "default",
"enabled": true,
"id": "dfd993527cb34b0bbcd700fab121264e",
"is_domain": false,
"name": "spectrum-discover",
"parent_id": "default",
"tags": []
},
{
"description": "This is a test collection",
"domain_id": "default",
"enabled": true,
"id": "51d5bf6c7c4e4fd3b35c53ca91d95705",
"is_domain": false,
"name": "test-collection",
"parent_id": "default",
"tags": [
"tag1",
"tag2"
]
}
]
}