JupyterHub Authorizations API

Token and cookie verification.

OpenAPI Specification

jupyterhub-authorizations-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: JupyterHub REST Activity Authorizations API
  description: REST API for JupyterHub, the multi-user server for Jupyter notebooks. Provides endpoints for managing users, groups, services, shared servers, OAuth2 authorization, the proxy, and the hub itself. JupyterHub spawns, manages, and proxies multiple instances of the single-user Jupyter notebook server.
  version: 5.2.0
  license:
    name: BSD-3-Clause
    url: https://opensource.org/licenses/BSD-3-Clause
  contact:
    name: Jupyter Project
    url: https://jupyterhub.readthedocs.io
    email: jupyter@googlegroups.com
servers:
- url: http://localhost:8000/hub/api
  description: Local JupyterHub server
security:
- token: []
tags:
- name: Authorizations
  description: Token and cookie verification.
paths:
  /authorizations/token:
    post:
      operationId: requestToken
      summary: JupyterHub Request token
      description: Requests a new token, given a username and password.
      tags:
      - Authorizations
      security: []
      responses:
        '200':
          description: Newly issued token.
  /authorizations/token/{token}:
    get:
      operationId: identifyToken
      summary: JupyterHub Identify token
      description: Identifies the user or service that owns the given token.
      tags:
      - Authorizations
      parameters:
      - name: token
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Identity for the token.
  /authorizations/cookie/{cookie_name}/{cookie_value}:
    get:
      operationId: identifyCookie
      summary: JupyterHub Identify cookie
      description: Identifies the user that owns a given cookie.
      tags:
      - Authorizations
      parameters:
      - name: cookie_name
        in: path
        required: true
        schema:
          type: string
      - name: cookie_value
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Identity for the cookie.
components:
  securitySchemes:
    token:
      type: apiKey
      in: header
      name: Authorization
      description: 'Token-based authentication. Use the form: Authorization: token <token>'
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: /hub/api/oauth2/authorize
          tokenUrl: /hub/api/oauth2/token
          scopes:
            self: Access to the current user.
            admin:users: Administer users.
            admin:servers: Administer single-user servers.
            read:users: Read user information.
            list:users: List users.
            read:groups: Read group information.
            admin:groups: Administer groups.
            read:services: Read service information.
            proxy: Manage the proxy.
externalDocs:
  description: JupyterHub REST API documentation
  url: https://jupyterhub.readthedocs.io/en/stable/reference/rest-api.html