> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clinia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List all collections in a source

> List all collections in a registry.




## OpenAPI

````yaml /api-reference/registry.yml get /sources/{sourceKey}/v1/collections
openapi: 3.0.1
info:
  title: Registry API
  version: 1.0.0
servers:
  - url: https://api.{workspaceId}.clinia.cloud
    variables:
      workspaceId:
        default: ''
        description: The workspace id.
security:
  - apiKey: []
  - basicHttpAuth: []
  - bearerHttpAuth: []
tags:
  - name: Collections
    description: Management of collections in a registry.
  - name: Relationships
    description: Management of relationships in a registry.
  - name: Resources
    description: Management of resources in a registry.
paths:
  /sources/{sourceKey}/v1/collections:
    get:
      tags:
        - Collections
      summary: List all collections in a source
      description: |
        List all collections in a registry.
      operationId: ListRegistryCollections
      parameters:
        - name: sourceKey
          in: path
          description: The key of the source.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Return all collections available in the source.
          content:
            application/json:
              schema:
                required:
                  - meta
                  - data
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/v1ListResponseMeta'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/v1Collection'
        '400':
          description: Returned when the request is malformed or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1RegistryError'
        '404':
          description: The source does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1RegistryError'
        '429':
          $ref: '#/components/responses/v1TooManyRequestError'
        '504':
          $ref: '#/components/responses/v1GatewayTimeoutError'
components:
  schemas:
    v1ListResponseMeta:
      type: object
      required:
        - numPages
        - page
        - perPage
        - total
      properties:
        numPages:
          type: integer
          format: int32
        page:
          type: integer
          format: int32
        perPage:
          type: integer
          format: int32
        total:
          type: integer
          format: int32
    v1Collection:
      oneOf:
        - $ref: '#/components/schemas/v1CollectionResource'
        - $ref: '#/components/schemas/v1CollectionRelationship'
      discriminator:
        propertyName: type
        mapping:
          resources:
            $ref: '#/components/schemas/v1CollectionResource'
          relationships:
            $ref: '#/components/schemas/v1CollectionRelationship'
    v1RegistryError:
      allOf:
        - $ref: '#/components/schemas/v1Error'
        - type: object
          properties:
            code:
              $ref: '#/components/schemas/v1ErrorCode'
            applicationErrorCode:
              type: string
              enum:
                - REGISTRY_DUPLICATE_IDENTIFIER
                - REGISTRY_INVALID_COLLECTION_TYPE
                - REGISTRY_INVALID_CONTENT_TYPE
                - REGISTRY_INVALID_PIPELINE_STEP_DEFINITION
                - REGISTRY_INVALID_REQUEST_BODY
                - REGISTRY_INVALID_REVISION_ID
                - REGISTRY_PAYLOAD_PARSE_ERROR
                - REGISTRY_REQUIRED_FIELD_MISSING
                - REGISTRY_RESOURCE_TYPE_NOT_FOUND
                - REGISTRY_UNAVAILABLE_UPSTREAM_SERVICE
                - REGISTRY_BROWSE_SESSION_EXPIRED
                - REGISTRY_BULK_OPERATION_NOT_FOUND
                - REGISTRY_COLLECTION_NOT_FOUND
                - REGISTRY_CONTAINED_DEFINITION_NOT_FOUND
                - REGISTRY_PIPELINE_EXECUTION_NOT_FOUND
                - REGISTRY_PROFILE_NOT_FOUND
                - REGISTRY_PURGE_NOT_FOUND
                - REGISTRY_RELATIONSHIP_COLLECTION_NOT_FOUND
                - REGISTRY_RELATIONSHIP_DEFINITION_NOT_FOUND
                - REGISTRY_RELATIONSHIP_NOT_FOUND
                - REGISTRY_RESOURCE_NOT_FOUND
                - REGISTRY_RESOURCE_COLLECTION_NOT_FOUND
                - REGISTRY_SOURCE_NOT_FOUND
                - REGISTRY_TASK_NOT_FOUND
                - REGISTRY_VERSION_HISTORY_ITEM_NOT_FOUND
                - REGISTRY_REQUEST_CANCELLED
                - REGISTRY_REQUEST_TIMEOUT
                - REGISTRY_COLLECTION_ALREADY_EXISTS
                - REGISTRY_DUPLICATE_OPERATION_IN_BUNDLE
                - REGISTRY_IDENTIFIER_ALREADY_EXISTS
                - REGISTRY_RELATIONSHIP_ALREADY_EXISTS
                - REGISTRY_RELATIONSHIP_FROM_REF_ALREADY_EXISTS
                - REGISTRY_RELATIONSHIP_TO_REF_ALREADY_EXISTS
                - REGISTRY_RESOURCE_ALREADY_EXISTS
    v1CollectionResource:
      allOf:
        - $ref: '#/components/schemas/v1CollectionBaseWithPipelineDefinition'
        - type: object
          required:
            - profile
          properties:
            profile:
              $ref: '#/components/schemas/v1Profile'
              description: The profile of the collection.
          additionalProperties: false
    v1CollectionRelationship:
      allOf:
        - $ref: '#/components/schemas/v1CollectionBaseWithPipelineDefinition'
        - type: object
          required:
            - relationshipDefinition
          properties:
            relationshipDefinition:
              $ref: '#/components/schemas/v1RelationshipDefinition'
              description: The relationship definition of the collection.
          additionalProperties: false
    v1Error:
      type: object
      required:
        - code
        - message
        - type
      properties:
        code:
          $ref: '#/components/schemas/v1ErrorCode'
        message:
          type: string
        type:
          $ref: '#/components/schemas/v1ErrorType'
        details:
          description: list of errors that occurred if applicable.
          type: array
          items:
            $ref: '#/components/schemas/v1Error'
        additionalContext:
          type: object
          additionalProperties: true
    v1ErrorCode:
      type: integer
      format: int32
      enum:
        - 400
        - 401
        - 403
        - 404
        - 408
        - 409
        - 413
        - 429
        - 500
        - 501
        - 504
    v1CollectionBaseWithPipelineDefinition:
      allOf:
        - $ref: '#/components/schemas/v1CollectionBase'
        - type: object
          properties:
            pipeline:
              $ref: '#/components/schemas/v1PipelineDefinition'
              description: The ingestion pipeline of the collection.
          additionalProperties: false
    v1Profile:
      allOf:
        - $ref: '#/components/schemas/v1ProfileUpsert'
        - type: object
          required:
            - key
          properties:
            key:
              type: string
              readOnly: true
      additionalProperties: false
    v1RelationshipDefinition:
      allOf:
        - $ref: '#/components/schemas/v1RelationshipDefinitionUpsert'
        - type: object
          required:
            - key
          properties:
            key:
              type: string
              readOnly: true
      additionalProperties: false
    v1ErrorType:
      type: string
      enum:
        - ALREADY_EXISTS
        - FAILED_PRECONDITION
        - INTERNAL
        - INVALID_ARGUMENT
        - NOT_FOUND
        - OUT_OF_RANGE
        - UNIMPLEMENTED
        - PERMISSION_DENIED
        - UNAUTHENTICATED
        - CONTENT_TOO_LARGE
        - REQUEST_TIMEOUT
        - TOO_MANY_REQUEST
        - GATEWAY_TIMEOUT
    v1CollectionBase:
      type: object
      required:
        - type
        - key
      properties:
        type:
          $ref: '#/components/schemas/v1CollectionType'
          description: The type of the collection.
        key:
          readOnly: true
          type: string
          description: The key of the collection.
      additionalProperties: false
    v1PipelineDefinition:
      description: >
        Configuration of a pipeline that can be executed on data ingestion. Each
        step will be executed with the ingested data if the

        triggers matches. These steps are executed before the data is persisted
        in the datasource and they are done async.
      type: object
      required:
        - steps
      properties:
        id:
          $ref: '#/components/schemas/v1RevisionId'
          readOnly: true
          description: The unique identifier of the pipeline definition.
        steps:
          description: >
            List of steps to evaluate and execute on ingested data before
            persistence.
          type: array
          items:
            $ref: '#/components/schemas/v1PipelineStepDefinition'
      additionalProperties: false
    v1ProfileUpsert:
      type: object
      required:
        - properties
      properties:
        description:
          type: string
          description: Description of the profile.
        properties:
          type: object
          description: >
            Properties of the profile. It must follow pattern:
            `^[a-zA-Z0-9-][\w-]{0,61}$`.
          additionalProperties:
            $ref: '#/components/schemas/v1PropertyDefinition'
        contained:
          type: object
          description: >
            Contained of the profile. It must follow pattern:
            `^[a-zA-Z0-9-][\w-]{0,61}$`.
          additionalProperties:
            $ref: '#/components/schemas/v1ContainedDefinition'
      additionalProperties: false
    v1RelationshipDefinitionUpsert:
      type: object
      required:
        - from
        - to
        - properties
      properties:
        from:
          $ref: '#/components/schemas/v1RelationshipRefDefinition'
        to:
          $ref: '#/components/schemas/v1RelationshipRefDefinition'
        description:
          type: string
          description: Description of the relationship definition.
        properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/v1PropertyDefinition'
      additionalProperties: false
    v1CollectionType:
      type: string
      enum:
        - resources
        - relationships
    v1RevisionId:
      type: string
      description: |
        The id with version in the format `<id>.<version>`.
      pattern: ^[a-zA-Z0-9_-]+.[0-9]+$
    v1PipelineStepDefinition:
      oneOf:
        - $ref: '#/components/schemas/v1PipelineVectorizerStepDefinition'
        - $ref: '#/components/schemas/v1PipelineActionableStepDefinition'
        - $ref: '#/components/schemas/v1PipelineSchemaValidatorStepDefinition'
        - $ref: '#/components/schemas/v1PipelineCliniaFunctionStepDefinition'
        - $ref: '#/components/schemas/v1PipelineDiffEvaluatorStepDefinition'
      discriminator:
        propertyName: type
        mapping:
          VECTORIZER:
            $ref: '#/components/schemas/v1PipelineVectorizerStepDefinition'
          ACTIONABLE:
            $ref: '#/components/schemas/v1PipelineActionableStepDefinition'
          SCHEMA_VALIDATOR:
            $ref: '#/components/schemas/v1PipelineSchemaValidatorStepDefinition'
          CLINIA_FUNCTION:
            $ref: '#/components/schemas/v1PipelineCliniaFunctionStepDefinition'
          DIFF_EVALUATOR:
            $ref: '#/components/schemas/v1PipelineDiffEvaluatorStepDefinition'
    v1PropertyDefinition:
      oneOf:
        - $ref: '#/components/schemas/v1AddressPropertyDefinition'
        - $ref: '#/components/schemas/v1ArrayPropertyDefinition'
        - $ref: '#/components/schemas/v1AttachmentPropertyDefinition'
        - $ref: '#/components/schemas/v1BooleanPropertyDefinition'
        - $ref: '#/components/schemas/v1CodePropertyDefinition'
        - $ref: '#/components/schemas/v1CodingPropertyDefinition'
        - $ref: '#/components/schemas/v1ContactPointPropertyDefinition'
        - $ref: '#/components/schemas/v1DatePropertyDefinition'
        - $ref: '#/components/schemas/v1DateTimePropertyDefinition'
        - $ref: '#/components/schemas/v1DecimalPropertyDefinition'
        - $ref: '#/components/schemas/v1GeoPointPropertyDefinition'
        - $ref: '#/components/schemas/v1HumanNamePropertyDefinition'
        - $ref: '#/components/schemas/v1IdentifierPropertyDefinition'
        - $ref: '#/components/schemas/v1InstantPropertyDefinition'
        - $ref: '#/components/schemas/v1IntegerPropertyDefinition'
        - $ref: '#/components/schemas/v1MarkdownPropertyDefinition'
        - $ref: '#/components/schemas/v1ObjectPropertyDefinition'
        - $ref: '#/components/schemas/v1PeriodPropertyDefinition'
        - $ref: '#/components/schemas/v1ReferencePropertyDefinition'
        - $ref: '#/components/schemas/v1SymbolPropertyDefinition'
        - $ref: '#/components/schemas/v1TimePropertyDefinition'
        - $ref: '#/components/schemas/v1UriPropertyDefinition'
        - $ref: '#/components/schemas/v1UrlPropertyDefinition'
        - $ref: '#/components/schemas/v1XhtmlPropertyDefinition'
      discriminator:
        propertyName: type
        mapping:
          address:
            $ref: '#/components/schemas/v1AddressPropertyDefinition'
          attachment:
            $ref: '#/components/schemas/v1AttachmentPropertyDefinition'
          boolean:
            $ref: '#/components/schemas/v1BooleanPropertyDefinition'
          code:
            $ref: '#/components/schemas/v1CodePropertyDefinition'
          coding:
            $ref: '#/components/schemas/v1CodingPropertyDefinition'
          contactpoint:
            $ref: '#/components/schemas/v1ContactPointPropertyDefinition'
          date:
            $ref: '#/components/schemas/v1DatePropertyDefinition'
          datetime:
            $ref: '#/components/schemas/v1DateTimePropertyDefinition'
          decimal:
            $ref: '#/components/schemas/v1DecimalPropertyDefinition'
          geopoint:
            $ref: '#/components/schemas/v1GeoPointPropertyDefinition'
          humanname:
            $ref: '#/components/schemas/v1HumanNamePropertyDefinition'
          identifier:
            $ref: '#/components/schemas/v1IdentifierPropertyDefinition'
          instant:
            $ref: '#/components/schemas/v1InstantPropertyDefinition'
          integer:
            $ref: '#/components/schemas/v1IntegerPropertyDefinition'
          markdown:
            $ref: '#/components/schemas/v1MarkdownPropertyDefinition'
          period:
            $ref: '#/components/schemas/v1PeriodPropertyDefinition'
          reference:
            $ref: '#/components/schemas/v1ReferencePropertyDefinition'
          symbol:
            $ref: '#/components/schemas/v1SymbolPropertyDefinition'
          time:
            $ref: '#/components/schemas/v1TimePropertyDefinition'
          uri:
            $ref: '#/components/schemas/v1UriPropertyDefinition'
          url:
            $ref: '#/components/schemas/v1UrlPropertyDefinition'
          xhtml:
            $ref: '#/components/schemas/v1XhtmlPropertyDefinition'
          array:
            $ref: '#/components/schemas/v1ArrayPropertyDefinition'
          object:
            $ref: '#/components/schemas/v1ObjectPropertyDefinition'
    v1ContainedDefinition:
      type: object
      required:
        - properties
      properties:
        description:
          type: string
          description: Description of the contained definition.
        cardinality:
          $ref: '#/components/schemas/v1Cardinality'
        depth:
          type: integer
          description: Maximum nesting depth of the contained resources. Defaults to 1.
          minimum: 1
        properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/v1PropertyDefinition'
      additionalProperties: false
    v1RelationshipRefDefinition:
      type: object
      required:
        - profileKey
        - includeKey
        - includeCardinality
      properties:
        profileKey:
          type: string
        includeKey:
          type: string
        includeCardinality:
          $ref: '#/components/schemas/v1IncludeCardinality'
      additionalProperties: false
    v1PipelineVectorizerStepDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepDefinition'
        - type: object
          description: >
            Step that allows converting text into numerical representations
            (vectors) that a machine learning model can understand and records
            result in an enriched property.

            This step is an **Augmentation** step type.
          required:
            - vectorizer
          properties:
            vectorizer:
              type: object
              description: The vectorizer configuration.
              required:
                - inputProperty
                - propertyKey
                - provider
                - modelId
                - dimensions
              properties:
                inputProperty:
                  minLength: 1
                  type: string
                  description: The input property path to vectorize.
                  example: content.passages
                propertyKey:
                  type: string
                  minLength: 1
                  description: >
                    The key of the property to store the segments. The property
                    key will be accessible as a sub property of the input
                    property.

                    It must follow pattern: `^[a-zA-Z0-9-][\w-]{0,61}$`.

                    Therefore for an input property `content.passages` and a
                    property key `vector`, the segments will be accessible as
                    `content.passages.vector`.
                  example: vector
                propertyDescription:
                  type: string
                  description: The description of the property.
                  example: The vectorized content
                provider:
                  $ref: '#/components/schemas/v1AIProvider'
                modelId:
                  minLength: 1
                  type: string
                  description: >-
                    The model to use for vectorization available in the AI
                    provider.
                  example: text-embedding-004
                dimensions:
                  type: integer
                  description: The dimensions of the output vectors.
                  minimum: 1
                  maximum: 4096
                  example: 768
    v1PipelineActionableStepDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepDefinition'
        - type: object
          description: >
            Step that requires a user interaction with the
            ActOnPipelineExecution endpoint. It defines possible actions that
            can be taken.

            This step is a **Mutation** step type.
          required:
            - actions
          properties:
            actions:
              description: >
                List of possible actions that can be taken when the step is
                acted upon.

                The order of the steps are important. Augmentation type steps
                must always happen after all mutation type steps.
              type: array
              items:
                $ref: '#/components/schemas/v1PipelineStepActionDefinition'
          additionalProperties: false
    v1PipelineSchemaValidatorStepDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepDefinition'
        - type: object
          description: |
            Step that validates the ingested data with the data schema.
            This step is a **Validation** step type.
    v1PipelineCliniaFunctionStepDefinition:
      description: >
        Step that executes a clinia function with the ingested data as input and
        overrides the ingested data with the output.

        Accepted clinia function types are:
         - record-pipeline-execution-post-processing@v1
         - relationship-pipeline-execution-post-processing@v1
        This step is a **Mutation** step type.
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepDefinition'
        - type: object
          required:
            - cliniaFunction
          properties:
            cliniaFunction:
              $ref: '#/components/schemas/v1CliniaFunctionReference'
          additionalProperties: false
    v1PipelineDiffEvaluatorStepDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepDefinition'
        - type: object
          description: >
            Step that retrieved from the storage the persisted version of the
            processed entity.

            This step is a **Mutation** step type.
    v1AddressPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BaseWellKnownObjectPropertyDefinition'
    v1ArrayPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
        - type: object
          required:
            - items
          properties:
            items:
              $ref: '#/components/schemas/v1PropertyDefinition'
    v1AttachmentPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BaseWellKnownObjectPropertyDefinition'
    v1BooleanPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1CodePropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1CodingPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BaseWellKnownObjectPropertyDefinition'
    v1ContactPointPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BaseWellKnownObjectPropertyDefinition'
    v1DatePropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1DateTimePropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1DecimalPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1GeoPointPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1HumanNamePropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BaseWellKnownObjectPropertyDefinition'
    v1IdentifierPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BaseWellKnownObjectPropertyDefinition'
    v1InstantPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1IntegerPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1MarkdownPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1ObjectPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
        - type: object
          required:
            - properties
          properties:
            properties:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/v1PropertyDefinition'
          additionalProperties: false
    v1PeriodPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BaseWellKnownObjectPropertyDefinition'
    v1ReferencePropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BaseWellKnownObjectPropertyDefinition'
    v1SymbolPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1TimePropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1UriPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1UrlPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1XhtmlPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
    v1Cardinality:
      type: string
      default: 0:*
      enum:
        - 0:*
        - '0:1'
        - '1:1'
        - 1:*
      x-enum-varnames:
        - ZERO_TO_MANY
        - ZERO_TO_ONE
        - ONE_TO_ONE
        - ONE_TO_MANY
    v1IncludeCardinality:
      type: string
      default: 0:*
      enum:
        - 0:*
        - '0:1'
      x-enum-varnames:
        - ZERO_TO_MANY
        - ZERO_TO_ONE
    v1BasePipelineStepDefinition:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/v1PipelineStepType'
        trigger:
          $ref: '#/components/schemas/v1PipelineStepTrigger'
          description: >
            The trigger configuration for a step. This is the configuration that
            indicates when a step needs to be executed.

            When this field is not configured, the step is always triggered.
      additionalProperties: false
    v1AIProvider:
      type: string
      description: The provider of an AI model.
      enum:
        - openai
        - google
        - bedrock
    v1PipelineStepActionDefinition:
      oneOf:
        - $ref: '#/components/schemas/v1PipelineStepActionDefinitionAccept'
        - $ref: '#/components/schemas/v1PipelineStepActionDefinitionReject'
      discriminator:
        propertyName: type
        mapping:
          ACCEPT:
            $ref: '#/components/schemas/v1PipelineStepActionDefinitionAccept'
          REJECT:
            $ref: '#/components/schemas/v1PipelineStepActionDefinitionReject'
    v1CliniaFunctionReference:
      type: object
      required:
        - name
        - version
      properties:
        name:
          type: string
          description: The name of the function to be applied.
        version:
          $ref: '#/components/schemas/v1SemVer'
    v1BaseWellKnownObjectPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
        - type: object
          properties:
            properties:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/v1WellKnownObjectPropertyDefinitionRule'
          additionalProperties: false
    v1BasePropertyDefinition:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/v1DataType'
        readOnly:
          type: boolean
          default: false
          description: >-
            If set to true, the property cannot be set as required in the rules
            properties, and can only be set by the ingestion pipeline. Any value
            provided by the user will be ignored.
        description:
          type: string
          description: Description of the property.
        rules:
          type: array
          items:
            $ref: '#/components/schemas/v1PropertyRule'
        binding:
          $ref: '#/components/schemas/v1PropertyBinding'
        modelId:
          type: string
          readOnly: true
          description: >-
            ID of the model. Only used for enriched properties defined via
            pipelines.
        enrichedProperties:
          type: object
          readOnly: true
          additionalProperties:
            $ref: '#/components/schemas/v1EnrichedPropertyDefinition'
      additionalProperties: false
    v1PipelineStepType:
      type: string
      description: The type of the pipeline step.
      enum:
        - VECTORIZER
        - ACTIONABLE
        - SCHEMA_VALIDATOR
        - CLINIA_FUNCTION
        - DIFF_EVALUATOR
    v1PipelineStepTrigger:
      oneOf:
        - $ref: '#/components/schemas/v1PipelineStepOperatorTrigger'
        - $ref: '#/components/schemas/v1PipelineStepAlwaysTrigger'
      discriminator:
        propertyName: type
        mapping:
          OPERATOR:
            $ref: '#/components/schemas/v1PipelineStepOperatorTrigger'
          ALWAYS_TRIGGER:
            $ref: '#/components/schemas/v1PipelineStepAlwaysTrigger'
      additionalProperties: false
    v1PipelineStepActionDefinitionAccept:
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepActionDefinition'
        - type: object
          description: >
            Action configuration for an `ACCEPT` flow. This action will accept
            the ingested data and pass it to the clinia function processing if
            defined.

            Accepted clinia function types are:
             - `record-pipeline-execution-post-processing@v1`.
             - `relationship-pipeline-execution-post-processing@v1`.
          properties:
            cliniaFunction:
              $ref: '#/components/schemas/v1CliniaFunctionReference'
              description: >-
                Optional clinia function configuration that will be executed
                when the action is used.
          additionalProperties: false
    v1PipelineStepActionDefinitionReject:
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepActionDefinition'
        - type: object
          description: >-
            Action configuration for a "REJECT" flow. This action will reject
            the ingested data.
    v1SemVer:
      type: string
      description: Version of the clinia function. Should be a valid semver.
    v1WellKnownObjectPropertyDefinitionRule:
      type: object
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/v1PropertyRule'
        properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/v1WellKnownObjectPropertyDefinitionRule'
        items:
          $ref: '#/components/schemas/v1WellKnownObjectPropertyDefinitionRule'
        binding:
          $ref: '#/components/schemas/v1PropertyBinding'
      additionalProperties: false
    v1DataType:
      type: string
      enum:
        - address
        - attachment
        - boolean
        - code
        - coding
        - contactpoint
        - date
        - datetime
        - decimal
        - geopoint
        - humanname
        - identifier
        - instant
        - integer
        - markdown
        - period
        - reference
        - symbol
        - time
        - uri
        - url
        - xhtml
        - array
        - object
        - densevector
    v1PropertyRule:
      type: object
      properties:
        required:
          type: boolean
        pattern:
          type: string
        enum:
          description: >-
            List of possible values for the property: string and number types
            only.
          type: array
          items:
            oneOf:
              - type: string
              - type: number
          minItems: 1
        min:
          type: integer
          format: int
        max:
          type: integer
          format: int
        when:
          $ref: '#/components/schemas/v1Operator'
          description: >
            An operator that defines when the rule should be applicable.

            Whenever this operator evaluates to true, the rule will be checked;
            when it is evaluated to false, the rule is ignored entirely and none
            of its validation is applied.


            Supported operators are: 'eq', 'lt' and 'gt'.

            TODO: [ENG-4213] Add examples and document [current] and [*]..
      additionalProperties: false
    v1PropertyBinding:
      description: >
        Defines a subset of values the property can take.

        A binding can be defined for a code, a coding, a symbol or an URI
        property.

        In the case of a coding, the binding is applied to the code
        sub-attribute.
      type: object
      required:
        - vocabulary
      properties:
        vocabulary:
          $ref: '#/components/schemas/v1VocabularyBinding'
      additionalProperties: false
    v1EnrichedPropertyDefinition:
      oneOf:
        - $ref: '#/components/schemas/v1AddressPropertyDefinition'
        - $ref: '#/components/schemas/v1ArrayPropertyDefinition'
        - $ref: '#/components/schemas/v1AttachmentPropertyDefinition'
        - $ref: '#/components/schemas/v1BooleanPropertyDefinition'
        - $ref: '#/components/schemas/v1CodePropertyDefinition'
        - $ref: '#/components/schemas/v1CodingPropertyDefinition'
        - $ref: '#/components/schemas/v1ContactPointPropertyDefinition'
        - $ref: '#/components/schemas/v1DatePropertyDefinition'
        - $ref: '#/components/schemas/v1DateTimePropertyDefinition'
        - $ref: '#/components/schemas/v1DecimalPropertyDefinition'
        - $ref: '#/components/schemas/v1GeoPointPropertyDefinition'
        - $ref: '#/components/schemas/v1HumanNamePropertyDefinition'
        - $ref: '#/components/schemas/v1IdentifierPropertyDefinition'
        - $ref: '#/components/schemas/v1InstantPropertyDefinition'
        - $ref: '#/components/schemas/v1IntegerPropertyDefinition'
        - $ref: '#/components/schemas/v1MarkdownPropertyDefinition'
        - $ref: '#/components/schemas/v1ObjectPropertyDefinition'
        - $ref: '#/components/schemas/v1PeriodPropertyDefinition'
        - $ref: '#/components/schemas/v1ReferencePropertyDefinition'
        - $ref: '#/components/schemas/v1SymbolPropertyDefinition'
        - $ref: '#/components/schemas/v1TimePropertyDefinition'
        - $ref: '#/components/schemas/v1UriPropertyDefinition'
        - $ref: '#/components/schemas/v1UrlPropertyDefinition'
        - $ref: '#/components/schemas/v1XhtmlPropertyDefinition'
        - $ref: '#/components/schemas/v1DenseVectorPropertyDefinition'
      discriminator:
        propertyName: type
        mapping:
          address:
            $ref: '#/components/schemas/v1AddressPropertyDefinition'
          attachment:
            $ref: '#/components/schemas/v1AttachmentPropertyDefinition'
          boolean:
            $ref: '#/components/schemas/v1BooleanPropertyDefinition'
          code:
            $ref: '#/components/schemas/v1CodePropertyDefinition'
          coding:
            $ref: '#/components/schemas/v1CodingPropertyDefinition'
          contactpoint:
            $ref: '#/components/schemas/v1ContactPointPropertyDefinition'
          date:
            $ref: '#/components/schemas/v1DatePropertyDefinition'
          datetime:
            $ref: '#/components/schemas/v1DateTimePropertyDefinition'
          decimal:
            $ref: '#/components/schemas/v1DecimalPropertyDefinition'
          geopoint:
            $ref: '#/components/schemas/v1GeoPointPropertyDefinition'
          humanname:
            $ref: '#/components/schemas/v1HumanNamePropertyDefinition'
          identifier:
            $ref: '#/components/schemas/v1IdentifierPropertyDefinition'
          instant:
            $ref: '#/components/schemas/v1InstantPropertyDefinition'
          integer:
            $ref: '#/components/schemas/v1IntegerPropertyDefinition'
          markdown:
            $ref: '#/components/schemas/v1MarkdownPropertyDefinition'
          period:
            $ref: '#/components/schemas/v1PeriodPropertyDefinition'
          reference:
            $ref: '#/components/schemas/v1ReferencePropertyDefinition'
          symbol:
            $ref: '#/components/schemas/v1SymbolPropertyDefinition'
          time:
            $ref: '#/components/schemas/v1TimePropertyDefinition'
          uri:
            $ref: '#/components/schemas/v1UriPropertyDefinition'
          url:
            $ref: '#/components/schemas/v1UrlPropertyDefinition'
          xhtml:
            $ref: '#/components/schemas/v1XhtmlPropertyDefinition'
          array:
            $ref: '#/components/schemas/v1ArrayPropertyDefinition'
          object:
            $ref: '#/components/schemas/v1ObjectPropertyDefinition'
          densevector:
            $ref: '#/components/schemas/v1DenseVectorPropertyDefinition'
    v1PipelineStepOperatorTrigger:
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepTriggerDefinition'
        - type: object
          description: Step trigger that trigger if the operator match.
          required:
            - operator
          properties:
            operator:
              $ref: '#/components/schemas/v1Operator'
          additionalProperties: false
    v1PipelineStepAlwaysTrigger:
      allOf:
        - $ref: '#/components/schemas/v1BasePipelineStepTriggerDefinition'
        - type: object
          description: Step trigger that always trigger.
          properties:
            onlyOnTriggeredPipeline:
              description: >-
                Flag indicating if the step should trigger only if at least one
                other step in the pipeline would be triggered.
              type: boolean
          additionalProperties: false
    v1BasePipelineStepActionDefinition:
      type: object
      required:
        - id
        - type
        - displayName
      properties:
        id:
          type: string
          description: >-
            The ID of the action. This will be used to identify the action when
            taking action on the step.
        type:
          $ref: '#/components/schemas/v1PipelineStepActionType'
        displayName:
          type: object
          description: >-
            The display mapping for the action. This will be used for human
            readable format of the possible action.
          additionalProperties:
            type: string
      additionalProperties: false
    v1Operator:
      description: >
        Logical (`and`, `or`, `not`, `all`, `any`),

        composite (`composite`),

        comparisons (`eq`, `gt`, `lt`),

        text match (`match` with types `phrase`, `phrasePrefix`, `word`,
        `wordPrefix` and optional `fuzziness` up to 3),

        geo (`geoDistance`), and vector (`knn`).
      oneOf:
        - $ref: '#/components/schemas/v1AndOperator'
        - $ref: '#/components/schemas/v1OrOperator'
        - $ref: '#/components/schemas/v1AllOperator'
        - $ref: '#/components/schemas/v1AnyOperator'
        - $ref: '#/components/schemas/v1CompositeOperator'
        - $ref: '#/components/schemas/v1EqOperator'
        - $ref: '#/components/schemas/V1KNNOperator'
        - $ref: '#/components/schemas/v1GeoDistanceOperator'
        - $ref: '#/components/schemas/v1GreaterThanOperator'
        - $ref: '#/components/schemas/v1LessThanOperator'
        - $ref: '#/components/schemas/v1MatchOperator'
        - $ref: '#/components/schemas/v1NotOperator'
    v1VocabularyBinding:
      type: object
      required:
        - key
        - strength
      properties:
        key:
          type: string
        strength:
          $ref: '#/components/schemas/v1BindingStrength'
      additionalProperties: false
    v1DenseVectorPropertyDefinition:
      allOf:
        - $ref: '#/components/schemas/v1BasePropertyDefinition'
        - type: object
          required:
            - modelId
          properties:
            modelId:
              type: string
              readOnly: true
              description: ID of the model used to generate the dense embedding.
          additionalProperties: false
    v1BasePipelineStepTriggerDefinition:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/v1PipelineStepTriggerType'
      additionalProperties: false
    v1PipelineStepActionType:
      type: string
      description: The type of the pipeline actionable step action.
      enum:
        - ACCEPT
        - REJECT
    v1AndOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - and
          properties:
            and:
              type: array
              items:
                $ref: '#/components/schemas/v1Operator'
    v1OrOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - or
          properties:
            or:
              type: array
              items:
                $ref: '#/components/schemas/v1Operator'
    v1AllOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - all
          properties:
            all:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                $ref: '#/components/schemas/v1SupportedPrimitiveArrays'
    v1AnyOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - any
          properties:
            any:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                $ref: '#/components/schemas/v1SupportedPrimitiveArrays'
    v1CompositeOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - composite
          properties:
            composite:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                type: array
                items:
                  $ref: '#/components/schemas/v1Operator'
    v1EqOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - eq
          properties:
            eq:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                $ref: '#/components/schemas/v1EqCondition'
    V1KNNOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - knn
          properties:
            knn:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                $ref: '#/components/schemas/v1KNNCondition'
    v1GeoDistanceOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - geoDistance
          properties:
            geoDistance:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                $ref: '#/components/schemas/v1GeoDistanceCondition'
    v1GreaterThanOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - gt
          properties:
            gt:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                $ref: '#/components/schemas/v1SupportedComparablePrimitives'
    v1LessThanOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - lt
          properties:
            lt:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                $ref: '#/components/schemas/v1SupportedComparablePrimitives'
    v1MatchOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - match
          properties:
            match:
              type: object
              minProperties: 1
              maxProperties: 1
              additionalProperties:
                $ref: '#/components/schemas/v1MatchCondition'
    v1NotOperator:
      allOf:
        - $ref: '#/components/schemas/V1OperatorBase'
        - type: object
          required:
            - not
          properties:
            not:
              $ref: '#/components/schemas/v1Operator'
    v1BindingStrength:
      type: string
      description: |
        The strength with which the binding is asserted.
         - required: To be conformant, the concept in this element shall be from the specified value set.
         - preferred: Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant.
      enum:
        - required
        - preferred
    v1PipelineStepTriggerType:
      type: string
      description: The type of the pipeline step trigger.
      enum:
        - OPERATOR
        - ALWAYS_TRIGGER
    V1OperatorBase:
      type: object
      properties:
        id:
          type: string
    v1SupportedPrimitiveArrays:
      oneOf:
        - $ref: '#/components/schemas/v1ArrayOfStrings'
        - $ref: '#/components/schemas/v1ArrayOfIntegers'
        - $ref: '#/components/schemas/v1ArrayOfDoubles'
    v1EqCondition:
      oneOf:
        - $ref: '#/components/schemas/v1SupportedPrimitives'
        - $ref: '#/components/schemas/v1EqObject'
    v1KNNCondition:
      type: object
      additionalProperties: false
      required:
        - value
      properties:
        value:
          type: string
    v1GeoDistanceCondition:
      type: object
      required:
        - coordinates
        - radius
      properties:
        coordinates:
          $ref: '#/components/schemas/v1GeoDistanceConditionCoordinates'
        radius:
          type: integer
          format: int32
      additionalProperties: false
    v1SupportedComparablePrimitives:
      oneOf:
        - $ref: '#/components/schemas/v1String'
        - $ref: '#/components/schemas/v1Integer'
        - $ref: '#/components/schemas/v1Double'
    v1MatchCondition:
      type: object
      description: The match condition is used to match a string field with a given value.
      additionalProperties: false
      required:
        - value
        - type
      properties:
        value:
          type: string
        type:
          $ref: '#/components/schemas/v1MatchOperatorType'
        fuzziness:
          type: integer
          format: int32
          maximum: 3
    v1ArrayOfStrings:
      type: array
      items:
        type: string
    v1ArrayOfIntegers:
      type: array
      items:
        type: integer
        format: int32
    v1ArrayOfDoubles:
      type: array
      items:
        type: number
        format: double
    v1SupportedPrimitives:
      oneOf:
        - $ref: '#/components/schemas/v1String'
        - $ref: '#/components/schemas/v1Integer'
        - $ref: '#/components/schemas/v1Double'
        - $ref: '#/components/schemas/v1Bool'
    v1EqObject:
      type: object
      description: >
        The eq operator condition with an additional normalized field to support
        queries that require case-insensitive equality.

        Normalized equality is only supported for string values.
      additionalProperties: false
      required:
        - value
      properties:
        value:
          $ref: '#/components/schemas/v1SupportedPrimitives'
        normalized:
          type: boolean
    v1GeoDistanceConditionCoordinates:
      oneOf:
        - $ref: '#/components/schemas/v1GeoPoint'
        - $ref: '#/components/schemas/v1String'
    v1String:
      type: string
    v1Integer:
      pattern: ^[0]|[-+]?[1-9][0-9]*$
      type: integer
      description: A whole number.
      format: int32
    v1Double:
      type: number
      format: double
    v1MatchOperatorType:
      type: string
      enum:
        - phrase
        - phrasePrefix
        - word
        - wordPrefix
    v1Bool:
      type: boolean
    v1GeoPoint:
      type: object
      properties:
        latitude:
          $ref: '#/components/schemas/v1Decimal'
        longitude:
          $ref: '#/components/schemas/v1Decimal'
      additionalProperties: false
      required:
        - latitude
        - longitude
    v1Decimal:
      pattern: ^-?(0|[1-9][0-9]{0,17})(\.[0-9]{1,17})?([eE][+-]?[0-9]{1,9}})?$
      type: number
      format: double
      description: A rational number with implicit precision.
  responses:
    v1TooManyRequestError:
      description: Returned when the server starts throttling the requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/v1Error'
    v1GatewayTimeoutError:
      description: Returned when the request exceeds the server timeout window.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/v1Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Clinia-API-Key
    basicHttpAuth:
      description: Basic HTTP authentication.
      type: http
      scheme: basic
    bearerHttpAuth:
      description: JWT Bearer authentication.
      type: http
      scheme: Bearer
      bearerFormat: JWT

````