/db2whrest/v1/bulk_add_tags/docs: POST
Searches a database for data.
The following table shows which roles can access this REST API endpoint:
Data admin | Data user | Collection Admin | Admin | Service user |
---|---|---|---|---|
✔ | ✔1 | ✔1 | Χ | Χ |
1The search is restricted to documents that are tagged with collections to which the user ID has a datauser role assigned. |
Synopsis of the request URL
curl -k -H 'Authorization: Bearer <token>' https://<spectrum_discover_host>/db2whrest/v1/bulk_add_tags/docs -X POST -d@bulk_of_docs.json -H "Content-type: application/json"
Supported request types and response formats
Supported request types:
- POST
- JSON
Examples
- The following example shows how to define search parameters and format the data that is returned:
- Step 1: Define the search parameters in a file named
bulk_of_docs.json:
{ "docs": { "fkey1": { "tags": { "tag1": "This is the value for tag1", "tag2": "This is the value for tag2", "tag3": "This is the value for tag3", } }, "fkey2": { "tags": { "tag4": "This is the value for tag4", "tag5": "This is the value for tag5", "tag6": "This is the value for tag6", } }, } }
- Step 2: Submit the
request:
curl -k -H 'Authorization: Bearer <token>' https://<spectrum_discover_host>/db2whrest/v1/bulk_add_tags/docs -X POST -d@bulk_of_docs.json -H "Content-Type: application/json"
(200 OK) {"status": "success"}
- Step 1: Define the search parameters in a file named
bulk_of_docs.json: