Label Studio · Capability

API Reference — subpackage_files

API Reference — subpackage_files. 6 operations. Lead operation: Get file upload. Self-contained Naftiko capability covering one Label Studio business surface.

Run with Naftiko Label Studiosubpackage_files

What You Can Do

GET
Get — Get file upload
/v1/api/import/file-upload/{id}
DELETE
Delete — Delete file upload
/v1/api/import/file-upload/{id}
PATCH
Update — Update file upload
/v1/api/import/file-upload/{id}
GET
List — Get files list
/v1/api/projects/{id}/file-uploads
DELETE
Deletemany — Delete files
/v1/api/projects/{id}/file-uploads
GET
Download — Download file
/v1/data/upload/{filename}

MCP Tools

get-file-upload

Get file upload

read-only idempotent
delete-file-upload

Delete file upload

idempotent
update-file-upload

Update file upload

idempotent
get-files-list

Get files list

read-only idempotent
delete-files

Delete files

idempotent
download-file

Download file

read-only idempotent

Capability Spec

label-studio-subpackage-files.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: API Reference — subpackage_files
  description: 'API Reference — subpackage_files. 6 operations. Lead operation: Get file upload. Self-contained Naftiko capability
    covering one Label Studio business surface.'
  tags:
  - Label Studio
  - subpackage_files
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    LABEL_STUDIO_API_KEY: LABEL_STUDIO_API_KEY
capability:
  consumes:
  - type: http
    namespace: label-studio-subpackage-files
    baseUri: http://localhost:8000
    description: API Reference — subpackage_files business capability. Self-contained, no shared references.
    resources:
    - name: api-import-file-upload-id
      path: /api/import/file-upload/{id}
      operations:
      - name: get
        method: GET
        description: Get file upload
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: Authorization
          in: header
          type: string
          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: <br><pre><code class='
          required: true
      - name: delete
        method: DELETE
        description: Delete file upload
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: Authorization
          in: header
          type: string
          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: <br><pre><code class='
          required: true
      - name: update
        method: PATCH
        description: Update file upload
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: Authorization
          in: header
          type: string
          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: <br><pre><code class='
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: api-projects-id-file-uploads
      path: /api/projects/{id}/file-uploads
      operations:
      - name: list
        method: GET
        description: Get files list
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: all
          in: query
          type: boolean
          description: Set to "true" if you want to retrieve all file uploads
        - name: ids
          in: query
          type: array
          description: Specify the list of file upload IDs to retrieve, e.g. ids=[1,2,3]
        - name: ordering
          in: query
          type: string
          description: Which field to use when ordering the results.
        - name: Authorization
          in: header
          type: string
          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: <br><pre><code class='
          required: true
      - name: deletemany
        method: DELETE
        description: Delete files
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          required: true
        - name: Authorization
          in: header
          type: string
          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: <br><pre><code class='
          required: true
    - name: data-upload-filename
      path: /data/upload/{filename}
      operations:
      - name: download
        method: GET
        description: Download file
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: filename
          in: path
          type: string
          required: true
        - name: Authorization
          in: header
          type: string
          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: <br><pre><code class='
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.LABEL_STUDIO_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: label-studio-subpackage-files-rest
    port: 8080
    description: REST adapter for API Reference — subpackage_files. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/import/file-upload/{id}
      name: api-import-file-upload-id
      description: REST surface for api-import-file-upload-id.
      operations:
      - method: GET
        name: get
        description: Get file upload
        call: label-studio-subpackage-files.get
        with:
          id: rest.id
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Delete file upload
        call: label-studio-subpackage-files.delete
        with:
          id: rest.id
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: update
        description: Update file upload
        call: label-studio-subpackage-files.update
        with:
          id: rest.id
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/projects/{id}/file-uploads
      name: api-projects-id-file-uploads
      description: REST surface for api-projects-id-file-uploads.
      operations:
      - method: GET
        name: list
        description: Get files list
        call: label-studio-subpackage-files.list
        with:
          id: rest.id
          all: rest.all
          ids: rest.ids
          ordering: rest.ordering
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletemany
        description: Delete files
        call: label-studio-subpackage-files.deletemany
        with:
          id: rest.id
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/data/upload/{filename}
      name: data-upload-filename
      description: REST surface for data-upload-filename.
      operations:
      - method: GET
        name: download
        description: Download file
        call: label-studio-subpackage-files.download
        with:
          filename: rest.filename
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: label-studio-subpackage-files-mcp
    port: 9090
    transport: http
    description: MCP adapter for API Reference — subpackage_files. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-file-upload
      description: Get file upload
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-files.get
      with:
        id: tools.id
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-file-upload
      description: Delete file upload
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: label-studio-subpackage-files.delete
      with:
        id: tools.id
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: update-file-upload
      description: Update file upload
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: label-studio-subpackage-files.update
      with:
        id: tools.id
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-files-list
      description: Get files list
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-files.list
      with:
        id: tools.id
        all: tools.all
        ids: tools.ids
        ordering: tools.ordering
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-files
      description: Delete files
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: label-studio-subpackage-files.deletemany
      with:
        id: tools.id
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: download-file
      description: Download file
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-files.download
      with:
        filename: tools.filename
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.