---
title: "Query pipeline executions"
method: POST
path: "/sources/{sourceKey}/v1/pipelines/query"
tags: ["Pipeline Executions"]
---

# Query pipeline executions

`POST /sources/{sourceKey}/v1/pipelines/query`

Query the pipeline executions of a source.
The fields that can be used to filter or sort pipeline executions are:
- `id`: The pipeline execution id.
- `pipelineDefinitionId`: The pipeline definition id.
- `createdAt`: The pipeline execution creation timestamp.
- `updatedAt`: The pipeline execution last update timestamp.
- `status`: The pipeline execution status.
- `operation.action`: The action of the operation that triggered the pipeline execution.
- `operation.taskId`: The id of the task that triggered the pipeline execution.
- `operation.target.targetType`: The type of the target that triggered the pipeline execution. It can be 'RESOURCE' or 'RELATIONSHIP'.
- `operation.target.type`: The type of the resource or relationship that triggered the pipeline execution.
- `operation.target.id`: The id of the resource or relationship that triggered the pipeline execution.
Note: It is also possible to filter or sort on fields under `processedOperation`, which represents the operation as processed by the pipeline execution.

## Path parameters

- `sourceKey` string, required

## Query parameters

- `withOperationBody` boolean

## Request body

- V1SearchParameters
  - `filter` union
    - object
      - `id` string
      - `and` V1Operator[], required
    - object
      - `id` string
      - `or` V1Operator[], required
    - object
      - `id` string
      - `all` object, required
    - object
      - `id` string
      - `any` object, required
    - object
      - `id` string
      - `composite` object, required
    - object
      - `id` string
      - `eq` object, required
    - object
      - `id` string
      - `knn` object, required
    - object
      - `id` string
      - `geoDistance` object, required
    - object
      - `id` string
      - `gt` object, required
    - object
      - `id` string
      - `lt` object, required
    - object
      - `id` string
      - `match` object, required
    - object
      - `id` string
      - `not` V1Operator, required — recursive
  - `query` union
    - object
      - `id` string
      - `and` V1Operator[], required
    - object
      - `id` string
      - `or` V1Operator[], required
    - object
      - `id` string
      - `all` object, required
    - object
      - `id` string
      - `any` object, required
    - object
      - `id` string
      - `composite` object, required
    - object
      - `id` string
      - `eq` object, required
    - object
      - `id` string
      - `knn` object, required
    - object
      - `id` string
      - `geoDistance` object, required
    - object
      - `id` string
      - `gt` object, required
    - object
      - `id` string
      - `lt` object, required
    - object
      - `id` string
      - `match` object, required
    - object
      - `id` string
      - `not` V1Operator, required — recursive
  - `highlighting` string[]
  - `page` integer
  - `perPage` integer
  - `sort` V1Sort
    - `direction` 'DESC' | 'ASC'
    - `path` string, required
  - `ranking` union
    - object
      - `type` 'DEFAULT' | 'SEMANTIC', required
    - object
      - `type` 'DEFAULT' | 'SEMANTIC', required
      - `query` string, required
      - `path` string, required
      - `modelId` string, required
  - `aggregations` V1Aggregation[]
    - `type` 'LEXICAL', required
    - `path` string, required — The path of the property to aggregate.
    - `prefix` string — The prefix is an optional query to filter the values to aggregate (e.g. 'mont' would match 'montreal', 'Montecarlo', etc.).
    - `size` integer — The maximum number of unique values to return in the aggregation.
  - `traversedProperties` 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 `200`

A successful response.

- V1QueryResponse
  - `hits` V1Hit[], required
    - `hitType` 'RESOURCE' | 'RELATIONSHIP' | 'OBJECT' | 'CONCEPT' | 'PIPELINE_EXECUTION' | 'RESOLUTION_QUEUED_ITEM', required
    - `score` number, double, required — The score of the hit in the search results, indicating its relevance.
    - `resource` object, required
    - `traversedProperties` unknown
    - `highlighting` unknown
  - `meta` V1QueryResponseMeta, required
    - `numPages` integer, required
    - `page` integer, required
    - `perPage` integer, required
    - `total` integer, required
    - `filter` union
      - object
        - `id` string
        - `and` V1Operator[], required
      - object
        - `id` string
        - `or` V1Operator[], required
      - object
        - `id` string
        - `all` object, required
      - object
        - `id` string
        - `any` object, required
      - object
        - `id` string
        - `composite` object, required
      - object
        - `id` string
        - `eq` object, required
      - object
        - `id` string
        - `knn` object, required
      - object
        - `id` string
        - `geoDistance` object, required
      - object
        - `id` string
        - `gt` object, required
      - object
        - `id` string
        - `lt` object, required
      - object
        - `id` string
        - `match` object, required
      - object
        - `id` string
        - `not` V1Operator, required — recursive
  - `aggregates` V1Aggregate[], required
    - `type` 'LEXICAL', required
    - `path` string, required — The path of the property to aggregate.
    - `aggregate` V1LexicalAggregateItem[], required
      - `value` string, required
      - `count` integer, required

## Other responses

- `400` — Returned when the request is malformed or invalid.
- `404` — Returned when the source or pipeline does not exist.

---

[API](https://skmtc.dev/clinia/apis/registry-api.md) · [All operations](https://skmtc.dev/clinia/apis/registry-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/clinia/registry-api/revisions/3a9197b11351/schema)
