/auth/v1/collections: POST
Creates a collection.
The following table shows which roles can access this REST API endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
✓ | Χ | Χ | ✓ | Χ |
Synopsis of the request URL
curl -k -H 'Content-Type: application/json' -H ‘Authorization: Bearer <token>’ –X POST https://<spectrum_discover_host>/auth/v1/collections -d '{details of the collection}'
The details that can be specified are:
- Name
- Description
- Tags Important: IBM Spectrum® Discover does not use collection tags. These collection tags are not related to the IBM Spectrum Discover metadata tags.
Supported request types and response formats
Supported request types:
- POST
- JSON
Examples
The following example shows how to create a collection.
Request:
curl -k -H 'Content-Type: application/json' -H ‘Authorization: Bearer <token>’
https://<spectrum_discover_host>/auth/v1/collections -d ‘{"name": "test-collection", "description": "Test Collection 1","tags": ["tag1", "tag2"]}’
Response:
201 Created