openapi: 3.1.0
info:
title: API Reference subpackage_actions subpackage_projects.subpackage_projects/exports API
version: 1.0.0
servers:
- url: http://localhost:8000
tags:
- name: subpackage_projects.subpackage_projects/exports
paths:
/api/projects/{id}/export:
get:
operationId: download-sync
summary: '[Deprecated] Easy export of tasks and annotations'
description: "\n This endpoint is deprecated in Enterprise. Use the async export API instead:\n POST /api/projects/{id}/exports/ (see [Create new export](/api#operation/api_projects_exports_create)).\n\n In Label Studio Enterprise, this endpoint will always return a 404 Not Found response with instructions to use the async export API.\n\n Note: if you have a large project it's recommended to use\n export snapshots, this easy export endpoint might have timeouts.
\n Export annotated tasks as a file in a specific format.\n For example, to export JSON annotations for a project to a file called `annotations.json`,\n run the following from the command line:\n ```bash\n curl -X GET http://localhost:8000/api/projects/{id}/export?exportType=JSON -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n To export all tasks, including skipped tasks and others without annotations, run the following from the command line:\n ```bash\n curl -X GET http://localhost:8000/api/projects/{id}/export?exportType=JSON&download_all_tasks=true -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n To export specific tasks with IDs of 123 and 345, run the following from the command line:\n ```bash\n curl -X GET 'http://localhost:8000/api/projects/{id}/export?ids[]=123&ids[]=345' -H 'Authorization: Token abc123' --output 'annotations.json'\n ```\n "
tags:
- subpackage_projects.subpackage_projects/exports
parameters:
- name: id
in: path
description: A unique integer value identifying this project.
required: true
schema:
type: integer
- name: download_all_tasks
in: query
description: If true, download all tasks regardless of status. If false, download only annotated tasks.
required: false
schema:
type: boolean
- name: download_resources
in: query
description: If true, download all resource files such as images, audio, and others relevant to the tasks.
required: false
schema:
type: boolean
- name: export_type
in: query
description: Selected export format (JSON by default)
required: false
schema:
type: string
- name: ids
in: query
description: Specify a list of task IDs to retrieve only the details for those tasks.
required: false
schema:
type: array
items:
type: string
- name: Authorization
in: header
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: Exported data
content:
application/json:
schema:
type: string
format: binary
/api/projects/{id}/export/formats:
get:
operationId: list-formats
summary: '[Deprecated] Get export formats'
description: "\n This endpoint is deprecated in Enterprise. Use the async export API instead:\n POST /api/projects/{{id}}/exports/ (see [Create new export](/api#operation/api_projects_exports_create)).\n\n In Label Studio Enterprise, this endpoint will always return a 404 Not Found response with instructions to use the async export API.\n\n Retrieve the available export formats for the current project by ID."
tags:
- subpackage_projects.subpackage_projects/exports
parameters:
- name: id
in: path
description: A unique integer value identifying this project.
required: true
schema:
type: integer
- name: Authorization
in: header
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: Export formats
content:
application/json:
schema:
type: array
items:
type: string
/api/projects/{id}/exports/:
get:
operationId: list
summary: List all export snapshots
description: Returns a list of exported files for a specific project by ID.
tags:
- subpackage_projects.subpackage_projects/exports
parameters:
- name: id
in: path
description: A unique integer value identifying this project.
required: true
schema:
type: integer
- name: ordering
in: query
description: Which field to use when ordering the results.
required: false
schema:
type: string
- name: Authorization
in: header
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Export'
post:
operationId: create
summary: Create new export snapshot
description: Create a new export request to start a background task and generate an export file for a specific project by ID.
tags:
- subpackage_projects.subpackage_projects/exports
parameters:
- name: id
in: path
description: A unique integer value identifying this project.
required: true
schema:
type: integer
- name: Authorization
in: header
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/LseExportCreate'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LseExportCreateRequest'
/api/projects/{id}/exports/{export_pk}:
get:
operationId: get
summary: Get export snapshot by ID
description: Retrieve information about an export file by export ID for a specific project.
tags:
- subpackage_projects.subpackage_projects/exports
parameters:
- name: export_pk
in: path
description: Primary key identifying the export file.
required: true
schema:
type: integer
- name: id
in: path
description: A unique integer value identifying this project.
required: true
schema:
type: integer
- name: Authorization
in: header
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/Export'
delete:
operationId: delete
summary: Delete export snapshot
description: Delete an export file by specified export ID.
tags:
- subpackage_projects.subpackage_projects/exports
parameters:
- name: export_pk
in: path
description: Primary key identifying the export file.
required: true
schema:
type: integer
- name: id
in: path
description: A unique integer value identifying this project.
required: true
schema:
type: integer
- name: Authorization
in: header
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: Successful response
/api/projects/{id}/exports/{export_pk}/convert:
post:
operationId: convert
summary: Export conversion
description: Convert export snapshot to selected format
tags:
- subpackage_projects.subpackage_projects/exports
parameters:
- name: export_pk
in: path
description: Primary key identifying the export file.
required: true
schema:
type: integer
- name: id
in: path
description: A unique integer value identifying this project.
required: true
schema:
type: integer
- name: Authorization
in: header
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/projects_exports_convert_Response_200'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ExportConvertRequest'
/api/projects/{id}/exports/{export_pk}/download:
get:
operationId: download
summary: Download export snapshot as file in specified format
description: "\n Download an export file in the specified format for a specific project. Specify the project ID with the `id`\n parameter in the path and the ID of the export file you want to download using the `export_pk` parameter\n in the path.\n\n Get the `export_pk` from the response of the request to [Create new export](/api#operation/api_projects_exports_create)\n or after [listing export files](/api#operation/api_projects_exports_list).\n "
tags:
- subpackage_projects.subpackage_projects/exports
parameters:
- name: export_pk
in: path
description: Primary key identifying the export file.
required: true
schema:
type: integer
- name: id
in: path
description: A unique integer value identifying this project.
required: true
schema:
type: integer
- name: exportType
in: query
description: Selected export format
required: false
schema:
type: string
- name: Authorization
in: header
description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example: curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'
required: true
schema:
type: string
responses:
'200':
description: Export file
content:
application/octet-stream:
schema:
type: string
format: binary
components:
schemas:
ExportConvertRequest:
type: object
properties:
download_resources:
type: boolean
description: Download resources in converter.
export_type:
type: string
description: Export file format.
required:
- export_type
title: ExportConvertRequest
ReviewedEnum:
type: string
enum:
- only
- exclude
description: '* `only` - only
* `exclude` - exclude
* `None` - None'
title: ReviewedEnum
LseAnnotationFilterOptionsRequest:
type: object
properties:
ground_truth:
type:
- boolean
- 'null'
description: Include ground truth annotations
reviewed:
oneOf:
- $ref: '#/components/schemas/ReviewedEnum'
- type: 'null'
description: '`only` - include all tasks with at least one not reviewed annotationcurl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"'