Lightly Tags API

Manage and export dataset tags.

OpenAPI Specification

lightly-ai-tags-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: LightlyOne Platform Datasets Tags 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: Tags
  description: Manage and export dataset tags.
paths:
  /v1/datasets/{datasetId}/tags:
    post:
      operationId: createTagByDatasetId
      tags:
      - Tags
      summary: Create a tag in a dataset.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagCreateRequest'
      responses:
        '201':
          description: The created tag id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEntityResponse'
  /v1/datasets/{datasetId}/tags/{tagId}:
    delete:
      operationId: deleteTagByTagId
      tags:
      - Tags
      summary: Delete a tag by id.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      - name: tagId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Deleted.
  /v1/datasets/{datasetId}/tags/{tagId}/export/LabelStudio/tasks:
    get:
      operationId: exportTagToLabelStudioTasks
      tags:
      - Tags
      summary: Export a tagged subset as Label Studio tasks.
      parameters:
      - $ref: '#/components/parameters/DatasetId'
      - name: tagId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Label Studio tasks JSON.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: true
components:
  schemas:
    CreateEntityResponse:
      type: object
      properties:
        id:
          type: string
      required:
      - id
    TagCreateRequest:
      type: object
      properties:
        name:
          type: string
        prevTagId:
          type: string
        bitMaskData:
          type: string
          description: Hex bitmask of selected samples relative to the previous tag.
      required:
      - name
  parameters:
    DatasetId:
      name: datasetId
      in: path
      required: true
      schema:
        type: string
  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.'