Label Studio · Capability

API Reference — subpackage_annotations

API Reference — subpackage_annotations. 7 operations. Lead operation: Bulk delete annotations by IDs. Self-contained Naftiko capability covering one Label Studio business surface.

Run with Naftiko Label Studiosubpackage_annotations

What You Can Do

POST
Deletebulk — Bulk delete annotations by IDs
/v1/api/annotations/bulk-delete
POST
Createbulk — Bulk create annotations
/v1/api/annotations/bulk
GET
Get — Get annotation by its ID
/v1/api/annotations/{id}
DELETE
Delete — Delete annotation
/v1/api/annotations/{id}
PATCH
Update — Update annotation
/v1/api/annotations/{id}
GET
List — Get all task annotations
/v1/api/tasks/{id}/annotations
POST
Create — Create annotation
/v1/api/tasks/{id}/annotations

MCP Tools

bulk-delete-annotations-ids

Bulk delete annotations by IDs

bulk-create-annotations

Bulk create annotations

get-annotation-its-id

Get annotation by its ID

read-only idempotent
delete-annotation

Delete annotation

idempotent
update-annotation

Update annotation

idempotent
get-all-task-annotations

Get all task annotations

read-only idempotent
create-annotation

Create annotation

Capability Spec

label-studio-subpackage-annotations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: API Reference — subpackage_annotations
  description: 'API Reference — subpackage_annotations. 7 operations. Lead operation: Bulk delete annotations by IDs. Self-contained
    Naftiko capability covering one Label Studio business surface.'
  tags:
  - Label Studio
  - subpackage_annotations
  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-annotations
    baseUri: http://localhost:8000
    description: API Reference — subpackage_annotations business capability. Self-contained, no shared references.
    resources:
    - name: api-annotations-bulk-delete
      path: /api/annotations/bulk-delete/
      operations:
      - name: deletebulk
        method: POST
        description: Bulk delete annotations by IDs
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - 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-annotations-bulk
      path: /api/annotations/bulk/
      operations:
      - name: createbulk
        method: POST
        description: Bulk create annotations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - 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-annotations-id
      path: /api/annotations/{id}/
      operations:
      - name: get
        method: GET
        description: Get annotation by its ID
        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 annotation
        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 annotation
        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-tasks-id-annotations
      path: /api/tasks/{id}/annotations/
      operations:
      - name: list
        method: GET
        description: Get all task annotations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Task ID
          required: true
        - 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: create
        method: POST
        description: Create annotation
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: integer
          description: Task ID
          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
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.LABEL_STUDIO_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: label-studio-subpackage-annotations-rest
    port: 8080
    description: REST adapter for API Reference — subpackage_annotations. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/annotations/bulk-delete
      name: api-annotations-bulk-delete
      description: REST surface for api-annotations-bulk-delete.
      operations:
      - method: POST
        name: deletebulk
        description: Bulk delete annotations by IDs
        call: label-studio-subpackage-annotations.deletebulk
        with:
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/annotations/bulk
      name: api-annotations-bulk
      description: REST surface for api-annotations-bulk.
      operations:
      - method: POST
        name: createbulk
        description: Bulk create annotations
        call: label-studio-subpackage-annotations.createbulk
        with:
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/annotations/{id}
      name: api-annotations-id
      description: REST surface for api-annotations-id.
      operations:
      - method: GET
        name: get
        description: Get annotation by its ID
        call: label-studio-subpackage-annotations.get
        with:
          id: rest.id
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Delete annotation
        call: label-studio-subpackage-annotations.delete
        with:
          id: rest.id
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: update
        description: Update annotation
        call: label-studio-subpackage-annotations.update
        with:
          id: rest.id
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/tasks/{id}/annotations
      name: api-tasks-id-annotations
      description: REST surface for api-tasks-id-annotations.
      operations:
      - method: GET
        name: list
        description: Get all task annotations
        call: label-studio-subpackage-annotations.list
        with:
          id: rest.id
          ordering: rest.ordering
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: create
        description: Create annotation
        call: label-studio-subpackage-annotations.create
        with:
          id: rest.id
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: label-studio-subpackage-annotations-mcp
    port: 9090
    transport: http
    description: MCP adapter for API Reference — subpackage_annotations. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: bulk-delete-annotations-ids
      description: Bulk delete annotations by IDs
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: label-studio-subpackage-annotations.deletebulk
      with:
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: bulk-create-annotations
      description: Bulk create annotations
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: label-studio-subpackage-annotations.createbulk
      with:
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-annotation-its-id
      description: Get annotation by its ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-annotations.get
      with:
        id: tools.id
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-annotation
      description: Delete annotation
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: label-studio-subpackage-annotations.delete
      with:
        id: tools.id
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: update-annotation
      description: Update annotation
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: label-studio-subpackage-annotations.update
      with:
        id: tools.id
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-task-annotations
      description: Get all task annotations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-annotations.list
      with:
        id: tools.id
        ordering: tools.ordering
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: create-annotation
      description: Create annotation
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: label-studio-subpackage-annotations.create
      with:
        id: tools.id
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.