JupyterHub · Capability

JupyterHub REST API — Users

JupyterHub REST API — Users. 6 operations. Lead operation: JupyterHub List users. Self-contained Naftiko capability covering one Jupyterhub business surface.

Run with Naftiko JupyterhubUsers

What You Can Do

GET
Listusers — JupyterHub List users
/v1/users
POST
Createusers — JupyterHub Create users
/v1/users
GET
Getuser — JupyterHub Get user
/v1/users/{name}
POST
Createuser — JupyterHub Create user
/v1/users/{name}
PATCH
Updateuser — JupyterHub Update user
/v1/users/{name}
DELETE
Deleteuser — JupyterHub Delete user
/v1/users/{name}

MCP Tools

jupyterhub-list-users

JupyterHub List users

read-only idempotent
jupyterhub-create-users

JupyterHub Create users

jupyterhub-get-user

JupyterHub Get user

read-only idempotent
jupyterhub-create-user

JupyterHub Create user

jupyterhub-update-user

JupyterHub Update user

idempotent
jupyterhub-delete-user

JupyterHub Delete user

idempotent

Capability Spec

rest-users.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: JupyterHub REST API — Users
  description: 'JupyterHub REST API — Users. 6 operations. Lead operation: JupyterHub List users. Self-contained Naftiko capability
    covering one Jupyterhub business surface.'
  tags:
  - Jupyterhub
  - Users
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    JUPYTERHUB_API_KEY: JUPYTERHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-users
    baseUri: http://localhost:8000/hub/api
    description: JupyterHub REST API — Users business capability. Self-contained, no shared references.
    resources:
    - name: users
      path: /users
      operations:
      - name: listusers
        method: GET
        description: JupyterHub List users
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: state
          in: query
          type: string
        - name: offset
          in: query
          type: integer
        - name: limit
          in: query
          type: integer
      - name: createusers
        method: POST
        description: JupyterHub Create users
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: users-name
      path: /users/{name}
      operations:
      - name: getuser
        method: GET
        description: JupyterHub Get user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: createuser
        method: POST
        description: JupyterHub Create user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: updateuser
        method: PATCH
        description: JupyterHub Update user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: deleteuser
        method: DELETE
        description: JupyterHub Delete user
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.JUPYTERHUB_API_KEY}}'
  exposes:
  - type: rest
    namespace: rest-users-rest
    port: 8080
    description: REST adapter for JupyterHub REST API — Users. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/users
      name: users
      description: REST surface for users.
      operations:
      - method: GET
        name: listusers
        description: JupyterHub List users
        call: rest-users.listusers
        with:
          state: rest.state
          offset: rest.offset
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createusers
        description: JupyterHub Create users
        call: rest-users.createusers
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/users/{name}
      name: users-name
      description: REST surface for users-name.
      operations:
      - method: GET
        name: getuser
        description: JupyterHub Get user
        call: rest-users.getuser
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createuser
        description: JupyterHub Create user
        call: rest-users.createuser
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateuser
        description: JupyterHub Update user
        call: rest-users.updateuser
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteuser
        description: JupyterHub Delete user
        call: rest-users.deleteuser
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-users-mcp
    port: 9090
    transport: http
    description: MCP adapter for JupyterHub REST API — Users. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: jupyterhub-list-users
      description: JupyterHub List users
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-users.listusers
      with:
        state: tools.state
        offset: tools.offset
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-create-users
      description: JupyterHub Create users
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-users.createusers
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-get-user
      description: JupyterHub Get user
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-users.getuser
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-create-user
      description: JupyterHub Create user
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-users.createuser
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-update-user
      description: JupyterHub Update user
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: rest-users.updateuser
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-delete-user
      description: JupyterHub Delete user
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-users.deleteuser
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.