/db2whrest/v1/bulk_add_tags/docs: POST

Searches a database for data.

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 Χ Χ
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
Supported response formats:
  • JSON

Examples

  1. The following example shows how to define search parameters and format the data that is returned:
    1. 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",
                }
            },
        }
      }
      
    2. 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"
      
    The following response is returned:
    (200 OK)
    {"status": "success"}