/auth/v1/users/<user_ID>/collections: GET

Gets the list of collections that are assigned to a user.

The following table shows which roles can access this REST API endpoint:
Table 1. Access by role
Data admin Data user Collection Admin Admin Service user
1 1 1
1The specified user ID must be the same as the requesting user ID. Otherwise 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/users/<user_ID>/collections

Supported request types and response formats

Supported request types:
  • GET
Supported response formats:
  • JSON

Examples

The following example shows how to get the details of the collections to which the user is assigned.

Request:
curl -k -H ‘Authorization: Bearer <token>’ https://<spectrum_discover_host>/auth/v1/users/4ee5b47f439640d29b6fac7253a64290/collections 

Response:

(200 OK): 
{ 
    "collections": [ 
        { 
            "description": "", 
            "domain_id": "default", 
            "enabled": true, 
            "id": "1d657422853c4c33bde953837c709655", 
            "is_domain": false, 
            "name": "JPGProj", 
            "parent_id": "default", 
            "tags": [] 
        }, 
        { 
            "description": "", 
            "domain_id": "default", 
            "enabled": true, 
            "id": "28bafe9031af4aa7a637b00aa436fb01", 
            "is_domain": false, 
            "name": "XMLProj", 
            "parent_id": "default", 
            "tags": [] 
        }, 
        { 
            "description": "Bootstrap collection for initializing the cloud.", 
            "domain_id": "default", 
            "enabled": true, 
            "id": "c64cafe7f69349d0ba79a8fe931be8d2", 
            "is_domain": false, 
            "name": "spectrum-discover", 
            "parent_id": "default", 
            "tags": [] 
        } 
    ] 
}