Label Studio · Capability

API Reference — subpackage_views

API Reference — subpackage_views. 7 operations. Lead operation: List views. Self-contained Naftiko capability covering one Label Studio business surface.

Run with Naftiko Label Studiosubpackage_views

What You Can Do

GET
List — List views
/v1/api/dm/views
POST
Create — Create view
/v1/api/dm/views
POST
Updateorder — Update order of views
/v1/api/dm/views/order
DELETE
Deleteall — Delete all project views
/v1/api/dm/views/reset
GET
Get — Get view details
/v1/api/dm/views/{id}
DELETE
Delete — Delete view
/v1/api/dm/views/{id}
PATCH
Update — Update view
/v1/api/dm/views/{id}

MCP Tools

list-views

List views

read-only idempotent
create-view

Create view

update-order-views

Update order of views

delete-all-project-views

Delete all project views

idempotent
get-view-details

Get view details

read-only idempotent
delete-view

Delete view

idempotent
update-view

Update view

idempotent

Capability Spec

label-studio-subpackage-views.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: API Reference — subpackage_views
  description: 'API Reference — subpackage_views. 7 operations. Lead operation: List views. Self-contained Naftiko capability
    covering one Label Studio business surface.'
  tags:
  - Label Studio
  - subpackage_views
  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-views
    baseUri: http://localhost:8000
    description: API Reference — subpackage_views business capability. Self-contained, no shared references.
    resources:
    - name: api-dm-views
      path: /api/dm/views/
      operations:
      - name: list
        method: GET
        description: List views
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: project
          in: query
          type: integer
          description: Project ID
        - 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 view
        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-dm-views-order
      path: /api/dm/views/order/
      operations:
      - name: updateorder
        method: POST
        description: Update order of views
        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-dm-views-reset
      path: /api/dm/views/reset/
      operations:
      - name: deleteall
        method: DELETE
        description: Delete all project views
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: project
          in: query
          type: integer
          description: Project 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: api-dm-views-id
      path: /api/dm/views/{id}/
      operations:
      - name: get
        method: GET
        description: Get view details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: View 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: delete
        method: DELETE
        description: Delete view
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: View 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: update
        method: PATCH
        description: Update view
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: View 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-views-rest
    port: 8080
    description: REST adapter for API Reference — subpackage_views. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/dm/views
      name: api-dm-views
      description: REST surface for api-dm-views.
      operations:
      - method: GET
        name: list
        description: List views
        call: label-studio-subpackage-views.list
        with:
          project: rest.project
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: create
        description: Create view
        call: label-studio-subpackage-views.create
        with:
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/dm/views/order
      name: api-dm-views-order
      description: REST surface for api-dm-views-order.
      operations:
      - method: POST
        name: updateorder
        description: Update order of views
        call: label-studio-subpackage-views.updateorder
        with:
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/dm/views/reset
      name: api-dm-views-reset
      description: REST surface for api-dm-views-reset.
      operations:
      - method: DELETE
        name: deleteall
        description: Delete all project views
        call: label-studio-subpackage-views.deleteall
        with:
          project: rest.project
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/dm/views/{id}
      name: api-dm-views-id
      description: REST surface for api-dm-views-id.
      operations:
      - method: GET
        name: get
        description: Get view details
        call: label-studio-subpackage-views.get
        with:
          id: rest.id
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Delete view
        call: label-studio-subpackage-views.delete
        with:
          id: rest.id
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: update
        description: Update view
        call: label-studio-subpackage-views.update
        with:
          id: rest.id
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: label-studio-subpackage-views-mcp
    port: 9090
    transport: http
    description: MCP adapter for API Reference — subpackage_views. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-views
      description: List views
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-views.list
      with:
        project: tools.project
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: create-view
      description: Create view
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: label-studio-subpackage-views.create
      with:
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: update-order-views
      description: Update order of views
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: label-studio-subpackage-views.updateorder
      with:
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-all-project-views
      description: Delete all project views
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: label-studio-subpackage-views.deleteall
      with:
        project: tools.project
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: get-view-details
      description: Get view details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: label-studio-subpackage-views.get
      with:
        id: tools.id
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-view
      description: Delete view
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: label-studio-subpackage-views.delete
      with:
        id: tools.id
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: update-view
      description: Update view
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: label-studio-subpackage-views.update
      with:
        id: tools.id
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.