Skip to main content
POST
/
partitions
/
{partitionKey}
/
v1
/
queries
Run multiple queries
curl --request POST \
  --url https://{workspaceId}.clinia.cloud/partitions/{partitionKey}/v1/queries \
  --header 'Content-Type: application/json' \
  --header 'X-Clinia-API-Key: <api-key>' \
  --data '{
  "requests": [
    {
      "collectionKeys": [
        "<string>"
      ],
      "params": {
        "semanticQuery": {
          "value": "<string>",
          "paths": {
            "include": [
              "<string>"
            ],
            "exclude": [
              "<string>"
            ]
          }
        },
        "query": {
          "id": "<string>",
          "and": [
            "<any>"
          ]
        },
        "filter": {
          "id": "<string>",
          "and": [
            "<any>"
          ]
        },
        "properties": {
          "include": [
            "<string>"
          ],
          "exclude": [
            "<string>"
          ]
        },
        "highlighting": [
          "<string>"
        ],
        "page": 123,
        "perPage": 20,
        "sort": {
          "direction": "DESC",
          "path": "<string>"
        },
        "ranking": {
          "type": "DEFAULT"
        },
        "aggregations": [
          {
            "type": "LEXICAL",
            "path": "<string>",
            "prefix": "<string>",
            "size": 20
          }
        ],
        "traversedProperties": [
          "<string>"
        ]
      }
    }
  ]
}'
{
  "responses": [
    {
      "collectionKeys": [
        "<string>"
      ],
      "response": {
        "semanticQueryInfo": {
          "reasoning": "<string>",
          "originalQuery": "<string>",
          "query": {
            "id": "<string>",
            "and": [
              "<any>"
            ]
          },
          "filter": {
            "id": "<string>",
            "and": [
              "<any>"
            ]
          }
        },
        "hits": [
          {
            "hitType": "RESOURCE",
            "score": 123,
            "resource": {},
            "traversedProperties": {},
            "highlighting": {}
          }
        ],
        "meta": {
          "numPages": 123,
          "page": 123,
          "perPage": 123,
          "total": 123,
          "filter": {
            "id": "<string>",
            "and": [
              "<any>"
            ]
          }
        },
        "aggregates": [
          {
            "type": "LEXICAL",
            "path": "<string>",
            "aggregate": [
              {
                "value": "<string>",
                "count": 123
              }
            ]
          }
        ]
      }
    }
  ]
}

Authorizations

X-Clinia-API-Key
string
header
required

Path Parameters

partitionKey
string
required

The partition from which to execute the query.

Body

application/json

The list of queries to execute. It is possible to send multiple query items, where each of the item can be either a regular query or a federated query.

requests
object[]
required

The list of queries to execute.

Response

A successful response.

The list of responses for the multi query. The responses are returned in the same order as the requests.

responses
object[]
required

The responses for each corresponding requests.

I