Modal WebEndpoints API

HTTP/ASGI/WSGI web endpoints backed by Modal Functions.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

modal-com-webendpoints-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Modal Dicts and Queues Apps WebEndpoints API
  description: 'Modal Dicts and Queues — distributed in-memory primitives for

    cross-container state. Dicts are key-value stores; Queues are FIFO

    message queues used to coordinate work across Modal functions and

    sandboxes.

    '
  version: 0.1.0
  contact:
    name: Modal Labs
    url: https://modal.com
servers:
- url: https://api.modal.com/v1
security:
- ModalToken: []
tags:
- name: WebEndpoints
  description: HTTP/ASGI/WSGI web endpoints backed by Modal Functions.
paths:
  /web-endpoints:
    get:
      tags:
      - WebEndpoints
      summary: List Web Endpoints
      operationId: listWebEndpoints
      responses:
        '200':
          description: A page of web endpoints.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebEndpoint'
  /web-endpoints/{endpoint_id}:
    get:
      tags:
      - WebEndpoints
      summary: Get Web Endpoint
      operationId: getWebEndpoint
      parameters:
      - name: endpoint_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: The web endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebEndpoint'
  /web-endpoints/{endpoint_id}/labels:
    put:
      tags:
      - WebEndpoints
      summary: Set Web Endpoint Custom URL Label
      operationId: setWebEndpointLabel
      parameters:
      - name: endpoint_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
      responses:
        '204':
          description: Label set.
components:
  schemas:
    WebEndpoint:
      type: object
      properties:
        endpoint_id:
          type: string
        function_id:
          type: string
        kind:
          type: string
          enum:
          - fastapi_endpoint
          - asgi_app
          - wsgi_app
          - web_server
        url:
          type: string
          format: uri
        custom_label:
          type: string
        auth:
          type: string
          enum:
          - none
          - proxy_token
          - bearer
          - custom
        methods:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
  securitySchemes:
    ModalToken:
      type: http
      scheme: bearer