JupyterHub · Capability

JupyterHub REST API — Groups

JupyterHub REST API — Groups. 7 operations. Lead operation: JupyterHub List groups. Self-contained Naftiko capability covering one Jupyterhub business surface.

Run with Naftiko JupyterhubGroups

What You Can Do

GET
Listgroups — JupyterHub List groups
/v1/groups
POST
Creategroups — JupyterHub Create groups
/v1/groups
GET
Getgroup — JupyterHub Get group
/v1/groups/{name}
POST
Creategroup — JupyterHub Create group
/v1/groups/{name}
DELETE
Deletegroup — JupyterHub Delete group
/v1/groups/{name}
POST
Addgroupusers — JupyterHub Add users to group
/v1/groups/{name}/users
DELETE
Removegroupusers — JupyterHub Remove users from group
/v1/groups/{name}/users

MCP Tools

jupyterhub-list-groups

JupyterHub List groups

read-only idempotent
jupyterhub-create-groups

JupyterHub Create groups

jupyterhub-get-group

JupyterHub Get group

read-only idempotent
jupyterhub-create-group

JupyterHub Create group

jupyterhub-delete-group

JupyterHub Delete group

idempotent
jupyterhub-add-users-group

JupyterHub Add users to group

jupyterhub-remove-users-group

JupyterHub Remove users from group

idempotent

Capability Spec

rest-groups.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: JupyterHub REST API — Groups
  description: 'JupyterHub REST API — Groups. 7 operations. Lead operation: JupyterHub List groups. Self-contained Naftiko
    capability covering one Jupyterhub business surface.'
  tags:
  - Jupyterhub
  - Groups
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    JUPYTERHUB_API_KEY: JUPYTERHUB_API_KEY
capability:
  consumes:
  - type: http
    namespace: rest-groups
    baseUri: http://localhost:8000/hub/api
    description: JupyterHub REST API — Groups business capability. Self-contained, no shared references.
    resources:
    - name: groups
      path: /groups
      operations:
      - name: listgroups
        method: GET
        description: JupyterHub List groups
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: creategroups
        method: POST
        description: JupyterHub Create groups
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: groups-name
      path: /groups/{name}
      operations:
      - name: getgroup
        method: GET
        description: JupyterHub Get group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: creategroup
        method: POST
        description: JupyterHub Create group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: deletegroup
        method: DELETE
        description: JupyterHub Delete group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
    - name: groups-name-users
      path: /groups/{name}/users
      operations:
      - name: addgroupusers
        method: POST
        description: JupyterHub Add users to group
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
      - name: removegroupusers
        method: DELETE
        description: JupyterHub Remove users from group
        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-groups-rest
    port: 8080
    description: REST adapter for JupyterHub REST API — Groups. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/groups
      name: groups
      description: REST surface for groups.
      operations:
      - method: GET
        name: listgroups
        description: JupyterHub List groups
        call: rest-groups.listgroups
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: creategroups
        description: JupyterHub Create groups
        call: rest-groups.creategroups
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/groups/{name}
      name: groups-name
      description: REST surface for groups-name.
      operations:
      - method: GET
        name: getgroup
        description: JupyterHub Get group
        call: rest-groups.getgroup
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: creategroup
        description: JupyterHub Create group
        call: rest-groups.creategroup
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletegroup
        description: JupyterHub Delete group
        call: rest-groups.deletegroup
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/groups/{name}/users
      name: groups-name-users
      description: REST surface for groups-name-users.
      operations:
      - method: POST
        name: addgroupusers
        description: JupyterHub Add users to group
        call: rest-groups.addgroupusers
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: removegroupusers
        description: JupyterHub Remove users from group
        call: rest-groups.removegroupusers
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: rest-groups-mcp
    port: 9090
    transport: http
    description: MCP adapter for JupyterHub REST API — Groups. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: jupyterhub-list-groups
      description: JupyterHub List groups
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-groups.listgroups
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-create-groups
      description: JupyterHub Create groups
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-groups.creategroups
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-get-group
      description: JupyterHub Get group
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: rest-groups.getgroup
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-create-group
      description: JupyterHub Create group
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-groups.creategroup
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-delete-group
      description: JupyterHub Delete group
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-groups.deletegroup
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-add-users-group
      description: JupyterHub Add users to group
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: rest-groups.addgroupusers
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: jupyterhub-remove-users-group
      description: JupyterHub Remove users from group
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: rest-groups.removegroupusers
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.