Lightly Datasources API

Configure and inspect the cloud datasource backing a dataset.

OpenAPI Specification

lightly-ai-datasources-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: LightlyOne Platform Datasets Datasources API
  description: REST API for the LightlyOne data-curation and active-learning platform for computer vision. The API manages datasets, samples, embeddings, cloud datasources, selection / active-learning runs (the LightlyOne Worker), tags, and asynchronous jobs. Paths and verbs mirror the OpenAPI-generated client shipped inside the open-source `lightly` Python package (lightly.openapi_generated.swagger_client). The open-source self-supervised learning SDK is a separate, pip-installable library and is not part of this HTTP surface.
  termsOfService: https://www.lightly.ai/terms-of-service
  contact:
    name: Lightly Support
    email: support@lightly.ai
    url: https://www.lightly.ai
  license:
    name: Proprietary
    url: https://www.lightly.ai/terms-of-service
  version: '1.0'
servers:
- url: https://api.lightly.ai
  description: LightlyOne platform production API
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Datasources
  description: Configure and inspect the cloud datasource backing a dataset.
paths:
  /v1/datasets/{datasetId}/datasource:
    get:
      operationId: getDatasourceByDatasetId
      tags:
      - Datasources
      summary: Get the datasource configured for a dataset.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      responses:
        '200':
          description: The datasource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasourceConfig'
  /v1/datasets/{datasetId}/datasource/processedUntilTimestamp:
    get:
      operationId: getDatasourceProcessedUntilTimestampByDatasetId
      tags:
      - Datasources
      summary: Get the processed-until timestamp for incremental ingestion.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      responses:
        '200':
          description: A unix timestamp.
          content:
            application/json:
              schema:
                type: integer
                format: int64
  /v1/datasets/{datasetId}/datasource/list:
    get:
      operationId: getListOfRawSamplesFromDatasource
      tags:
      - Datasources
      summary: List raw sample files available in the datasource.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      - name: from
        in: query
        required: false
        schema:
          type: integer
          format: int64
      - name: to
        in: query
        required: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: A page of datasource files with signed read URLs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatasourceRawSamplesData'
components:
  parameters:
    DatasetId:
      name: datasetId
      in: path
      required: true
      schema:
        type: string
  schemas:
    DatasourceRawSamplesData:
      type: object
      properties:
        hasMore:
          type: boolean
        cursor:
          type: string
        data:
          type: array
          items:
            type: object
            properties:
              fileName:
                type: string
              readUrl:
                type: string
    DatasourceConfig:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - S3
          - S3DelegatedAccess
          - GCS
          - AZURE
          - LOCAL
        fullPath:
          type: string
        thumbSuffix:
          type: string
        purpose:
          type: string
          enum:
          - INPUT
          - LIGHTLY
      required:
      - type
      - fullPath
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: token
      description: LightlyOne API token passed as the `token` query parameter. Find your token in the preferences menu of the LightlyOne Platform.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Public JWT bearer token passed in the `Authorization: Bearer <token>` header for browser / public-token authenticated calls.'