Boltic Routes API

Manage API routes and request routing rules

OpenAPI Specification

boltic-routes-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Boltic Gateway Certificates Routes API
  description: The Boltic Gateway API provides a developer-friendly API gateway designed to simplify and secure how services interact across your platform. It enables seamless request routing, payload transformation, and enforcement of security policies across diverse integration types including serverless functions, workflows, tables, and proxy endpoints. The Gateway supports dynamic URL rewriting, path parameter injection, fine-grained authentication, and real-time observability.
  version: 1.0.0
  contact:
    name: Boltic
    url: https://www.boltic.io
  license:
    name: Proprietary
    url: https://www.boltic.io/terms
servers:
- url: https://gateway.boltic.io/v1
  description: Boltic Gateway API
security:
- bearerAuth: []
tags:
- name: Routes
  description: Manage API routes and request routing rules
paths:
  /routes:
    get:
      operationId: listRoutes
      summary: Boltic List all routes
      description: Retrieve a list of all configured API routes in the gateway.
      tags:
      - Routes
      parameters:
      - name: page
        in: query
        schema:
          type: integer
          default: 1
      - name: limit
        in: query
        schema:
          type: integer
          default: 20
      responses:
        '200':
          description: A list of routes
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Route'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createRoute
      summary: Boltic Create a new route
      description: Create a new API route with specified routing rules and target service.
      tags:
      - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouteInput'
      responses:
        '201':
          description: Route created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Route'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /routes/{routeId}:
    get:
      operationId: getRoute
      summary: Boltic Get a route by ID
      description: Retrieve details of a specific route.
      tags:
      - Routes
      parameters:
      - name: routeId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Route details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Route'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateRoute
      summary: Boltic Update a route
      description: Update the configuration of an existing route.
      tags:
      - Routes
      parameters:
      - name: routeId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouteInput'
      responses:
        '200':
          description: Route updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Route'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteRoute
      summary: Boltic Delete a route
      description: Remove an existing route from the gateway.
      tags:
      - Routes
      parameters:
      - name: routeId
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Route deleted successfully
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    RouteInput:
      type: object
      required:
      - name
      - paths
      - serviceId
      properties:
        name:
          type: string
        methods:
          type: array
          items:
            type: string
        paths:
          type: array
          items:
            type: string
        serviceId:
          type: string
        stripPath:
          type: boolean
        preserveHost:
          type: boolean
        protocols:
          type: array
          items:
            type: string
        plugins:
          type: array
          items:
            type: string
        status:
          type: string
          enum:
          - active
          - inactive
    Pagination:
      type: object
      properties:
        page:
          type: integer
        limit:
          type: integer
        total:
          type: integer
        totalPages:
          type: integer
    Route:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the route
        name:
          type: string
          description: Human-readable name for the route
        methods:
          type: array
          items:
            type: string
            enum:
            - GET
            - POST
            - PUT
            - DELETE
            - PATCH
            - OPTIONS
            - HEAD
          description: HTTP methods this route responds to
        paths:
          type: array
          items:
            type: string
          description: URL paths that match this route
        serviceId:
          type: string
          description: ID of the backend service to route to
        stripPath:
          type: boolean
          description: Whether to strip the matched path prefix
        preserveHost:
          type: boolean
          description: Whether to preserve the original Host header
        protocols:
          type: array
          items:
            type: string
            enum:
            - http
            - https
        plugins:
          type: array
          items:
            type: string
          description: List of plugin IDs applied to this route
        status:
          type: string
          enum:
          - active
          - inactive
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        details:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT