Circuit Operations API

Endpoints to operate on [Operations](/docs/models/operation) resources.

Operations 3

POST /operations/{operationId}:cancel Cancel an operation #
GET /operations/{operationId} Retrieve an operation #
GET /operations List operations #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/circuit-operations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

circuit-operations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Spoke Operations API
  description: This is the documentation of the Spoke Public API HTTP endpoints.
  version: v1
servers:
- url: https://api.spoke.com/public/v1
security:
- BasicAuth: []
tags:
- name: Operations
  description: Endpoints to operate on Operations resources.
paths:
  /operations/{operationId}:cancel:
    post:
      operationId: cancelOperation
      summary: Cancel an operation
      tags:
      - Operations
      description: Cancel an operation that is not yet done.
      parameters:
      - schema:
          type: string
          pattern: ^[a-zA-Z0-9---_]{1,50}$
        in: path
        name: operationId
        required: true
        description: The ID of the operation to cancel.
      responses:
        '200':
          description: The operation was canceled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operationSchema'
                description: The operation was canceled successfully
        '400':
          description: ID format is invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: ID format is invalid
                title: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - The operation was not found.
                  code:
                    type: string
                    enum:
                    - operation_not_found
                required:
                - message
                - code
                description: Not Found
        '409':
          description: Client Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - The operation cannot be canceled because it is already done.
                  code:
                    type: string
                    enum:
                    - operation_already_done
                required:
                - message
                - code
                description: Client Error
        '500':
          description: An internal server error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: An internal server error occurred
  /operations/{operationId}:
    get:
      operationId: getOperation
      summary: Retrieve an operation
      tags:
      - Operations
      parameters:
      - schema:
          type: string
          pattern: ^[a-zA-Z0-9---_]{1,50}$
        in: path
        name: operationId
        required: true
        description: The ID of the operation to cancel.
      responses:
        '200':
          description: The requested operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operationSchema'
                description: The requested operation
        '400':
          description: ID format is invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: ID format is invalid
                title: The request is invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: Unauthorized
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                    - The operation was not found.
                  code:
                    type: string
                    enum:
                    - operation_not_found
                required:
                - message
                - code
                description: Not Found
        '500':
          description: An internal server error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: An internal server error occurred
  /operations:
    get:
      operationId: listOperations
      summary: List operations
      tags:
      - Operations
      parameters:
      - schema:
          type: string
          minLength: 1
          maxLength: 255
        in: query
        name: pageToken
        required: false
        description: The page token to continue from.
      - schema:
          default: 20
          type: number
          minimum: 1
          maximum: 20
        in: query
        name: maxPageSize
        required: false
        description: The maximum number of operations to return per page.
      - schema:
          type: object
          properties:
            done:
              description: Filter by whether the operation is done.
              anyOf:
              - type: string
                enum:
                - 'true'
              - type: string
                enum:
                - 'false'
            type:
              description: The type of the operation. Use this to filter which operations to get when listing operations. If not specified, all operations are returned. If specified, only operations of the specified type are returned.
              type: string
              enum:
              - plan_optimization
        in: query
        name: filter
        required: false
        description: The filter to apply to the list of operations.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  operations:
                    type: array
                    items:
                      $ref: '#/components/schemas/operationSchema'
                    description: The operations.
                  nextPageToken:
                    anyOf:
                    - type: string
                    - type: 'null'
                    description: The next page token.
                required:
                - operations
                - nextPageToken
                definitions:
                  operationSchema:
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^operations\/[a-zA-Z0-9---_]{1,50}$
                        description: The id of the operation, in the format `operations/<id>`.
                      type:
                        type: string
                        enum:
                        - plan_optimization
                      done:
                        type: boolean
                        description: Whether the operation is done.
                      metadata:
                        type: object
                        properties:
                          canceled:
                            type: boolean
                            description: Whether the operation was canceled.
                          startedAt:
                            type: number
                            description: The time the operation started at, in seconds since epoch.
                          finishedAt:
                            anyOf:
                            - type: number
                            - type: 'null'
                            description: The time the operation finished at, in seconds since epoch.
                          startedBy:
                            anyOf:
                            - type: string
                              enum:
                              - dispatcher
                            - type: string
                              enum:
                              - api
                            - type: string
                            description: The entity that started the operation.
                          targetPlanId:
                            type: string
                            pattern: ^plans\/[a-zA-Z0-9---_]{1,50}$
                            description: The id of the plan, in the format `plans/<id>`.
                        required:
                        - canceled
                        - startedAt
                        - finishedAt
                        - startedBy
                        - targetPlanId
                        description: Metadata related to a plan optimization operation.
                      result:
                        anyOf:
                        - anyOf:
                          - type: object
                            properties:
                              numOptimizedStops:
                                type: number
                                description: The number of stops that were considered for optimization.
                              skippedStops:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      pattern: ^plans\/[a-zA-Z0-9---_]{1,50}\/stops\/[a-zA-Z0-9---_]{1,50}$
                                      description: The id of the stop, in the format `plans/<id>/stops/<id>`.
                                    reason:
                                      anyOf:
                                      - type: string
                                        enum:
                                        - impossible_time_window
                                      - type: string
                                        enum:
                                        - impossible_navigation
                                      - type: string
                                        enum:
                                        - impossible_number_of_stops
                                      - type: string
                                        enum:
                                        - impossible_order_of_stops
                                      - type: string
                                      description: The reason the stop was skipped.
                                  required:
                                  - id
                                  - reason
                                description: The stops that were skipped, if any.
                            required:
                            - numOptimizedStops
                            - skippedStops
                          - type: object
                            properties:
                              code:
                                type: string
                                description: A code that identifies the error
                              message:
                                type: string
                                description: A human-readable message that describes the error. This message is not intended to be parsed by machines.
                            required:
                            - code
                            - message
                        - type: 'null'
                        description: The result of the plan optimization operation, or an error.
                    required:
                    - id
                    - type
                    - done
                    - metadata
                    - result
                description: Success
        '400':
          description: Query parameters are invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: Query parameters are invalid
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: Unauthorized
        '500':
          description: An internal server error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                - message
                description: An internal server error occurred
components:
  schemas:
    planIdSchema:
      type: string
      pattern: ^plans\/[a-zA-Z0-9---_]{1,50}$
    stopIdSchema:
      type: string
      pattern: ^plans\/[a-zA-Z0-9---_]{1,50}\/stops\/[a-zA-Z0-9---_]{1,50}$
    operationIdSchema:
      type: string
      pattern: ^operations\/[a-zA-Z0-9---_]{1,50}$
    operationSchema:
      type: object
      properties:
        id:
          allOf:
          - $ref: '#/components/schemas/operationIdSchema'
          description: The id of the operation, in the format `operations/<id>`.
        type:
          type: string
          enum:
          - plan_optimization
        done:
          type: boolean
          description: Whether the operation is done.
        metadata:
          type: object
          properties:
            canceled:
              type: boolean
              description: Whether the operation was canceled.
            startedAt:
              type: number
              description: The time the operation started at, in seconds since epoch.
            finishedAt:
              anyOf:
              - type: number
              - type: 'null'
              description: The time the operation finished at, in seconds since epoch.
            startedBy:
              anyOf:
              - type: string
                enum:
                - dispatcher
              - type: string
                enum:
                - api
              - type: string
              description: The entity that started the operation.
            targetPlanId:
              allOf:
              - $ref: '#/components/schemas/planIdSchema'
              description: The id of the plan, in the format `plans/<id>`.
          required:
          - canceled
          - startedAt
          - finishedAt
          - startedBy
          - targetPlanId
          description: Metadata related to a plan optimization operation.
        result:
          anyOf:
          - anyOf:
            - type: object
              properties:
                numOptimizedStops:
                  type: number
                  description: The number of stops that were considered for optimization.
                skippedStops:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        allOf:
                        - $ref: '#/components/schemas/stopIdSchema'
                        description: The id of the stop, in the format `plans/<id>/stops/<id>`.
                      reason:
                        anyOf:
                        - type: string
                          enum:
                          - impossible_time_window
                        - type: string
                          enum:
                          - impossible_navigation
                        - type: string
                          enum:
                          - impossible_number_of_stops
                        - type: string
                          enum:
                          - impossible_order_of_stops
                        - type: string
                        description: The reason the stop was skipped.
                    required:
                    - id
                    - reason
                  description: The stops that were skipped, if any.
              required:
              - numOptimizedStops
              - skippedStops
            - type: object
              properties:
                code:
                  type: string
                  description: A code that identifies the error
                message:
                  type: string
                  description: A human-readable message that describes the error. This message is not intended to be parsed by machines.
              required:
              - code
              - message
          - type: 'null'
          description: The result of the plan optimization operation, or an error.
      required:
      - id
      - type
      - done
      - metadata
      - result
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: Use the API key as the username and leave the password empty.