WunderGraph Router API

Manage router configuration and authentication tokens.

Operations 3

POST /v1/router/compose WunderGraph Compose router configuration #
GET /v1/router/tokens WunderGraph List router tokens #
POST /v1/router/tokens WunderGraph Create a router token #

Documentation

Specifications

Schemas & Data

Other Resources

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/wundergraph-router-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

wundergraph-router-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WunderGraph Cosmo Platform Analytics Router API
  description: The WunderGraph Cosmo Platform API provides programmatic access to manage federated GraphQL architectures at scale. It powers the Cosmo CLI (wgc) and Cosmo Studio, enabling management of federated graphs, subgraphs, namespaces, schema contracts, feature flags, router configurations, and API keys. The API uses Connect-RPC protocol with HTTP/JSON support. Cosmo is the open-source alternative to Apollo GraphOS for full lifecycle GraphQL federation management including schema registry, composition checks, analytics, metrics, tracing, and routing.
  version: 1.0.0
  contact:
    name: WunderGraph
    url: https://wundergraph.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://cosmo-cp.wundergraph.com
  description: WunderGraph Cosmo Cloud Control Plane
tags:
- name: Router
  description: Manage router configuration and authentication tokens.
paths:
  /v1/router/compose:
    post:
      operationId: composeRouterConfig
      summary: WunderGraph Compose router configuration
      description: Generates a router execution configuration for a federated graph. The router configuration is used by the Cosmo Router to serve the composed federated graph.
      tags:
      - Router
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - federatedGraphName
              properties:
                federatedGraphName:
                  type: string
                  description: The name of the federated graph to compose.
                namespace:
                  type: string
                  description: The namespace of the graph.
      responses:
        '200':
          description: Router configuration generated
          content:
            application/json:
              schema:
                type: object
                properties:
                  config:
                    type: object
                    description: The composed router execution configuration.
  /v1/router/tokens:
    get:
      operationId: listRouterTokens
      summary: WunderGraph List router tokens
      description: Lists all router tokens for a federated graph. Router tokens are used to authenticate Cosmo Router instances with the control plane.
      tags:
      - Router
      security:
      - apiKey: []
      parameters:
      - name: federatedGraphName
        in: query
        required: true
        schema:
          type: string
        description: The name of the federated graph.
      - name: namespace
        in: query
        schema:
          type: string
        description: The namespace of the graph.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  tokens:
                    type: array
                    items:
                      $ref: '#/components/schemas/RouterToken'
    post:
      operationId: createRouterToken
      summary: WunderGraph Create a router token
      description: Creates a new router token for authenticating a Cosmo Router instance with the control plane.
      tags:
      - Router
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - federatedGraphName
              - tokenName
              properties:
                federatedGraphName:
                  type: string
                  description: The name of the federated graph.
                namespace:
                  type: string
                  description: The namespace of the graph.
                tokenName:
                  type: string
                  description: A name for the router token.
      responses:
        '200':
          description: Token created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                    description: The generated router token value.
components:
  schemas:
    RouterToken:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the router token.
        name:
          type: string
          description: The name of the router token.
        createdAt:
          type: string
          format: date-time
          description: When the token was created.
        lastUsedAt:
          type: string
          format: date-time
          description: When the token was last used.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: API key for authenticating with the Cosmo Platform API. Obtain via Cosmo Studio or wgc CLI. Set as COSMO_API_KEY environment variable.
x-authored-by: API Evangelist
x-modeled-from: documentation
x-provenance:
  method: modeled
  authored_by: API Evangelist
  modeled_from: https://cosmo-docs.wundergraph.com/
  provider_published: false
  note: Modeled by API Evangelist from WunderGraph's public Cosmo documentation. The provider does not publish a REST OpenAPI. The real control-plane interface is Connect-RPC, defined in WunderGraph's own platform.proto — see grpc/ for the verbatim first-party contract, which is authoritative where this document and the proto disagree.
  verified: '2026-08-03'
  evidence:
  - url: https://cosmo-cp.wundergraph.com/openapi.json
    status: 404
    note: no provider-published OpenAPI at the control-plane host
  - url: https://cosmo-cp.wundergraph.com/v1/analytics
    status: 404
    note: REST path modeled in this document does not resolve
  - url: https://cosmo-cp.wundergraph.com/wg.cosmo.platform.v1.PlatformService/GetFederatedGraphs
    status: 200
    method: POST
    note: the surface that does exist — Connect-RPC, not REST