Clinia
Data PartitionSearch

Search relationships of a specific type in the data partition

POST
/partitions/{partitionKey}/v1/relationships/{relationshipType}/query

Search relationships of a specific type in the data partition.

headerX-Clinia-API-Key<token>
partitionKey*string

The partition from which to execute the query.

relationshipType*string

The relationship type.

application/json
  1. body

Use dot-notation paths (e.g., name, meta.updatedAt, address.city). To include properties from relationships or adjacent records, request them via traversedProperties and reference with @ (e.g., @worksAt.*, @worksAt.@clinic.name). Some endpoints require federated paths such as resources.<collectionKey>.<propertyKey> or relationships.<collectionKey>.<propertyKey>.

semanticQuery?

A semantic query is a high-level representation of the user's intent. When specified, it will trigger our query understanding capabilities and generate a query and filter operator that will be applied to the search parameters.

query?|||||||||||

An operator that will be used to filter the targeted collections. The filtering operator excludes results that do not match the specified criteria.

filter?|||||||||||

An operator that will be used to filter the targeted collections. The filtering operator excludes results that do not match the specified criteria.

properties?

Limits the semantic paths the LLM can consider. Accepts collection-scoped paths or federated paths depending on the endpoint.

highlighting?array<string>
page?integer
Formatint32
perPage?integer
Formatint32
Default20
sort?
aggregations?array<>
traversedProperties?array<string>

The properties from the relationships or adjacent records that will be returned in the search response. The wildcard '*' can be used in itself or in combination with a prefix

  • * will return all traversed properties.
  • @worksAt.* will return all traversed properties from the relationship 'worksAt'.
  • @worksAt.@clinic.* will return all traversed properties from an adjacent 'clinic' connected with a 'worksAt' relationship.

Response Body

A successful response.

application/json
  1. response
semanticQueryInfo?
hits*array<>
meta*
aggregates*array<>
Example Request
curl -X POST 'https://api..clinia.cloud/partitions/string/v1/relationships/string/query' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "semanticQueryInfo": {    "reasoning": "string",    "originalQuery": "string",    "query": {      "id": "string",      "and": [        null      ]    },    "filter": {      "id": "string",      "and": [        null      ]    }  },  "hits": [    {      "hitType": "RESOURCE",      "score": 0.1,      "resource": {},      "traversedProperties": {        "property1": [          {            "type": "address",            "value": {},            "relationshipId": "string",            "relationshipType": "string",            "recordId": "string",            "recordType": "string"          }        ],        "property2": [          {            "type": "address",            "value": {},            "relationshipId": "string",            "relationshipType": "string",            "recordId": "string",            "recordType": "string"          }        ]      },      "highlighting": {        "property1": [          {            "type": "textual",            "highlight": "string"          }        ],        "property2": [          {            "type": "textual",            "highlight": "string"          }        ]      }    }  ],  "meta": {    "numPages": 0,    "page": 0,    "perPage": 0,    "total": 0,    "filter": {      "id": "string",      "and": [        null      ]    }  },  "aggregates": [    {      "type": "LEXICAL",      "path": "string",      "aggregate": [        {          "value": "string",          "count": 0        }      ]    }  ]}