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

# Retrieve data source

> Retrieve a data source (formerly known as "inference pipeline") by its ID.



## OpenAPI

````yaml get /inference-pipelines/{inferencePipelineId}
openapi: 3.0.3
info:
  contact:
    email: support@openlayer.com
    name: Openlayer
    url: https://openlayer.com/
  description: API for interacting with the Openlayer server.
  title: Openlayer API
  version: '1.0'
  x-logo:
    url: https://logo.clearbit.com/openlayer.com
servers:
  - url: https://api.openlayer.com/v1
    description: Our prod backend
security:
  - bearerAuth: []
paths:
  /inference-pipelines/{inferencePipelineId}:
    get:
      tags:
        - Monitoring
      description: Retrieve inference pipeline.
      parameters:
        - $ref: '#/components/parameters/inferencePipelineId'
        - name: expand
          in: query
          description: Expand specific nested objects.
          required: false
          schema:
            type: array
            items:
              type: string
              enum:
                - project
                - workspace
      responses:
        '200':
          description: Status OK.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferencePipeline'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: python
          source: |
            from openlayer import Openlayer

            client = Openlayer()
            inference_pipeline = client.inference_pipelines.retrieve(
                inference_pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
        - lang: typescript
          source: |
            import Openlayer from 'openlayer';

            const openlayer = new Openlayer();
            await openlayer.inferencePipelines.retrieve(
              inferencePipelineId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            );
        - lang: go
          source: |
            package main

            import (
              "context"

              "github.com/openlayer-ai/openlayer-go"
              "github.com/openlayer-ai/openlayer-go/option"
            )

            client := openlayer.NewClient()
            client.Projects.InferencePipelines.Get(
              context.TODO(),
              inferencePipelineId: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
        - lang: java
          source: >
            import com.openlayer.api.client.OpenlayerClient;

            import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;

            import com.openlayer.api.models.ProjectInferencePipelineGetParams;

            import com.openlayer.api.models.ProjectInferencePipelineGetResponse;


            OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();


            ProjectInferencePipelineGetParams params =
            ProjectInferencePipelineGetParams.builder()
                .inferencePipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                .build();

            ProjectInferencePipelineGetResponse response =
            client.projects().inferencePipelines().get(params);
        - lang: curl
          source: |
            curl --request GET \
              --url https://api.openlayer.com/v1/projects/{projectId}/inference-pipelines/{inferencePipelineId} \
              --header 'Authorization: Bearer <token>'
components:
  parameters:
    inferencePipelineId:
      name: inferencePipelineId
      in: path
      description: The inference pipeline id (a UUID).
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    InferencePipeline:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The inference pipeline id.
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        projectId:
          type: string
          format: uuid
          readOnly: true
          description: The project id.
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        workspaceId:
          type: string
          format: uuid
          readOnly: true
          description: The workspace id.
          example: 055fddb1-261f-4654-8598-f6347ee46a09
        project:
          $ref: '#/components/schemas/Project'
          nullable: true
        workspace:
          $ref: '#/components/schemas/Workspace'
          nullable: true
        name:
          type: string
          maxLength: 100
          description: The inference pipeline name.
          example: production
        dateCreated:
          type: string
          format: date-time
          readOnly: true
          description: The creation date.
          example: '2024-03-22T11:31:01.185Z'
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
          description: The last updated date.
          example: '2024-03-22T11:31:01.185Z'
        dateLastSampleReceived:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: The last data sample received date.
          example: '2024-03-22T11:31:01.185Z'
        dateLastPolled:
          type: string
          format: date-time
          description: The last time the data was polled.
          nullable: true
          readOnly: true
        totalRecordsCount:
          type: integer
          minimum: 0
          nullable: true
          readOnly: true
          description: The total number of records in the data backend.
          example: 1000
        description:
          type: string
          maxLength: 500
          nullable: true
          description: The inference pipeline description.
          example: This pipeline is used for production.
        dateLastEvaluated:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: The last test evaluation date.
          example: '2024-03-22T11:31:01.185Z'
        dateOfNextEvaluation:
          type: string
          format: date-time
          nullable: true
          readOnly: true
          description: The next test evaluation date.
          example: '2024-03-22T11:31:01.185Z'
        passingGoalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of tests passing.
          example: 5
        failingGoalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of tests failing.
          example: 1
        totalGoalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The total number of tests.
          example: 6
        status:
          type: string
          readOnly: true
          description: The status of test evaluation for the inference pipeline.
          example: completed
          enum:
            - queued
            - running
            - paused
            - failed
            - completed
            - unknown
        statusMessage:
          type: string
          nullable: true
          readOnly: true
          description: The status message of test evaluation for the inference pipeline.
          example: Tests successfully evaluated
        links:
          type: object
          readOnly: true
          required:
            - app
          properties:
            app:
              type: string
              example: >-
                https://app.openlayer.com/myWorkspace/3fa85f64-5717-4562-b3fc-2c963f66afa6/inference-pipeline/3fa85f64-5717-4562-b3fc-2c963f66afa6
        dataBackend:
          $ref: '#/components/schemas/DataBackend'
          nullable: true
      required:
        - id
        - name
        - dateCreated
        - dateUpdated
        - dateLastSampleReceived
        - dateLastEvaluated
        - dateOfNextEvaluation
        - description
        - projectId
        - passingGoalCount
        - failingGoalCount
        - totalGoalCount
        - status
        - statusMessage
        - links
    Project:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: The project id.
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        workspaceId:
          type: string
          nullable: true
          format: uuid
          readOnly: true
          description: The workspace id.
          example: 055fddb1-261f-4654-8598-f6347ee46a09
        creatorId:
          type: string
          nullable: true
          format: uuid
          readOnly: true
          description: The project creator id.
          example: 589ece63-49a2-41b4-98e1-10547761d4b0
        name:
          type: string
          maxLength: 64
          description: The project name.
          example: My Project
        dateCreated:
          type: string
          format: date-time
          readOnly: true
          description: The project creation date.
          example: '2024-03-22T11:31:01.185Z'
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
          description: The project last updated date.
          example: '2024-03-22T11:31:01.185Z'
        description:
          type: string
          maxLength: 280
          nullable: true
          description: The project description.
          example: My project description.
        source:
          type: string
          readOnly: true
          nullable: true
          enum:
            - web
            - api
            - 'null'
          description: The source of the project.
        taskType:
          type: string
          enum:
            - llm-base
            - tabular-classification
            - tabular-regression
            - text-classification
          description: The task type of the project.
        versionCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of versions (commits) in the project.
          example: 2
        inferencePipelineCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of inference pipelines in the project.
          example: 1
        goalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The total number of tests in the project.
          example: 10
        developmentGoalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of tests in the development mode of the project.
          example: 5
        monitoringGoalCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of tests in the monitoring mode of the project.
          example: 5
        links:
          type: object
          readOnly: true
          required:
            - app
          properties:
            app:
              type: string
              example: >-
                https://app.openlayer.com/myWorkspace/3fa85f64-5717-4562-b3fc-2c963f66afa6
          description: Links to the project.
        gitRepo:
          $ref: '#/components/schemas/GitRepo'
          readOnly: true
          nullable: true
      required:
        - id
        - workspaceId
        - creatorId
        - name
        - dateCreated
        - dateUpdated
        - source
        - taskType
        - versionCount
        - inferencePipelineCount
        - goalCount
        - developmentGoalCount
        - monitoringGoalCount
        - links
    Workspace:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The workspace id.
          readOnly: true
        name:
          type: string
          maxLength: 80
          example: Openlayer
          description: The workspace name.
        slug:
          type: string
          maxLength: 32
          example: openlayer
          pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
          description: The workspace slug.
        dateCreated:
          type: string
          format: date-time
          readOnly: true
          description: The workspace creation date.
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
          description: The workspace last updated date.
        creatorId:
          type: string
          format: uuid
          nullable: true
          readOnly: true
          description: The workspace creator id.
        inviteCode:
          type: string
          nullable: false
          writeOnly: true
          description: The workspace invite code.
        wildcardDomains:
          type: array
          items:
            type: string
        projectCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of projects in the workspace.
        memberCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of members in the workspace.
        monthlyUsage:
          type: array
          readOnly: true
          items:
            type: object
            properties:
              monthYear:
                type: string
                format: date
              predictionCount:
                type: integer
                minimum: 0
              executionTimeMs:
                type: integer
                nullable: true
                minimum: 0
        inviteCount:
          type: integer
          minimum: 0
          readOnly: true
          description: The number of invites in the workspace.
        periodStartDate:
          type: string
          nullable: true
          format: date-time
          readOnly: true
          description: The start date of the current billing period.
        periodEndDate:
          type: string
          nullable: true
          format: date-time
          readOnly: true
          description: The end date of the current billing period.
        samlOnlyAccess:
          type: boolean
          description: Whether the workspace only allows SAML authentication.
        status:
          type: string
          enum:
            - active
            - past_due
            - unpaid
            - canceled
            - incomplete
            - incomplete_expired
            - trialing
            - paused
          readOnly: true
      required:
        - id
        - name
        - slug
        - dateCreated
        - dateUpdated
        - creatorId
        - projectCount
        - memberCount
        - inviteCount
        - periodStartDate
        - periodEndDate
        - status
    DataBackend:
      oneOf:
        - title: BigQueryDataBackend
          type: object
          properties:
            backendType:
              type: string
              nullable: false
              enum:
                - bigquery
            bigqueryConnectionId:
              type: string
              format: uuid
              nullable: true
            projectId:
              type: string
              nullable: false
              maxLength: 120
              example: my-project
            datasetId:
              type: string
              nullable: false
              maxLength: 120
              example: my-dataset
            tableId:
              type: string
              nullable: true
              maxLength: 120
              example: my-table
            partitionType:
              type: string
              nullable: true
              enum:
                - DAY
                - MONTH
                - YEAR
            config:
              $ref: '#/components/schemas/DatastreamConfigUpdate'
              writeOnly: true
          required:
            - backendType
            - bigqueryConnectionId
            - projectId
            - datasetId
            - tableId
            - config
        - title: DefaultDataBackend
          type: object
          properties:
            backendType:
              type: string
              nullable: false
              enum:
                - default
          required:
            - backendType
        - title: SnowflakeDataBackend
          type: object
          properties:
            backendType:
              type: string
              nullable: false
              enum:
                - snowflake
            snowflakeConnectionId:
              type: string
              format: uuid
              nullable: true
            database:
              type: string
              nullable: false
              maxLength: 120
              example: my-database
            schema:
              type: string
              nullable: false
              maxLength: 120
              example: my-schema
            table:
              type: string
              nullable: true
              maxLength: 120
              example: my-table
            config:
              $ref: '#/components/schemas/DatastreamConfigUpdate'
              writeOnly: true
          required:
            - backendType
            - snowflakeConnectionId
            - database
            - schema
            - table
            - config
        - title: DatabricksDtlDataBackend
          type: object
          properties:
            backendType:
              type: string
              nullable: false
              enum:
                - databricks_dtl
            databricksDtlConnectionId:
              type: string
              format: uuid
              nullable: true
            tableId:
              type: string
              nullable: true
              maxLength: 120
              example: my-table
            config:
              $ref: '#/components/schemas/DatastreamConfigUpdate'
              writeOnly: true
          required:
            - backendType
            - databricksDtlConnectionId
            - tableId
            - config
        - title: RedshiftDataBackend
          type: object
          properties:
            backendType:
              type: string
              nullable: false
              enum:
                - redshift
            redshiftConnectionId:
              type: string
              format: uuid
              nullable: true
            schemaName:
              type: string
              nullable: false
            tableName:
              type: string
              nullable: false
            config:
              $ref: '#/components/schemas/DatastreamConfigUpdate'
              writeOnly: true
          required:
            - backendType
            - redshiftConnectionId
            - schemaName
            - tableName
            - config
        - title: PostgresDataBackend
          type: object
          properties:
            backendType:
              type: string
              nullable: false
              enum:
                - postgres
            postgresConnectionId:
              type: string
              format: uuid
              nullable: true
            database:
              type: string
              nullable: false
              maxLength: 120
              example: my-database
            schema:
              type: string
              nullable: false
              maxLength: 120
              example: my-schema
            table:
              type: string
              nullable: true
              maxLength: 120
              example: my-table
            config:
              $ref: '#/components/schemas/DatastreamConfigUpdate'
              writeOnly: true
          required:
            - backendType
            - postgresConnectionId
            - database
            - schema
            - table
            - config
    GitRepo:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        gitId:
          type: integer
        dateConnected:
          type: string
          format: date-time
          readOnly: true
        dateUpdated:
          type: string
          format: date-time
          readOnly: true
        branch:
          type: string
        name:
          type: string
          readOnly: true
        private:
          type: boolean
          readOnly: true
        slug:
          type: string
          readOnly: true
        url:
          type: string
          format: url
          readOnly: true
        rootDir:
          type: string
        projectId:
          type: string
          format: uuid
          readOnly: true
        gitAccountId:
          type: string
          format: uuid
      required:
        - id
        - gitId
        - dateConnected
        - dateUpdated
        - name
        - private
        - slug
        - url
        - projectId
        - gitAccountId
    DatastreamConfigUpdate:
      type: object
      properties:
        inferenceIdColumnName:
          type: string
          description: >-
            Name of the column with the inference ids. This is useful if you
            want to update rows at a later point in time. If not provided, a
            unique id is generated by Openlayer.
          example: id
          writeOnly: true
          nullable: true
        latencyColumnName:
          type: string
          description: Name of the column with the latencies.
          example: latency
          nullable: true
        timestampColumnName:
          type: string
          nullable: true
          description: >-
            Name of the column with the timestamps. Timestamps must be in UNIX
            sec format. If not provided, the upload timestamp is used.
          example: timestamp
        groundTruthColumnName:
          type: string
          description: Name of the column with the ground truths.
          example: ground_truth
          nullable: true
        humanFeedbackColumnName:
          type: string
          description: Name of the column with human feedback.
          example: human_feedback
          nullable: true
  responses:
    UnexpectedError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - error
            properties:
              code:
                type: integer
                format: int32
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your workspace API key. See [Find your API
        key](https://www.openlayer.com/docs/workspace-and-projects/find-your-api-key)
        for more information.

````