management api

Everything the console does, as an API.

Proxies, spec versions, publishing, environments, drift, coverage, alerts, keys and domains - all of it is an operation here, and a command in the CLI. A write action that exists only in a browser is one you cannot perform at 3am.

This page is generated from the server

The operations below are not written about our API. They are read out of the document our API is served from: /v1 resolves its operations from it, validates every request against it before a handler runs, and compiles its bearerAuth scheme into the check that guards each one. An operation it declares that we have not implemented is a refusal to start, not a 404 you find.

The document itself is at /api/openapi.json - point a generator at it.

Getting a token

Issue one on your account page. It is shown once: we keep only its hash, so a token we could show you twice would be one a database dump could show anyone. It belongs to the account rather than to you, so it keeps working when the person who created it leaves.

export APIP_TOKEN=apip_...
curl -H "Authorization: Bearer $APIP_TOKEN" https://openapi-proxy.com/v1/proxies

The operations

Every operation with the schemas it declares. Send one. The try-it forms post to /v1 on this site with the token you paste into them - the same request the CLI would send, against your real account, so a delete deletes.

openapi-proxy.com management API 1.0.0

Everything the console does, as an API. This document is not written about the API - it IS the API: the server dispatches from it, validates every request against it, and a test walks its operations to prove the CLI can reach each one. We sell contract enforcement; our own contract being the implementation is the demo.

Authorize

bearerAuth http bearer

alerts

DELETE /proxies/{proxy_id}/alerts/{alert_id} Remove a rule
PATCH /proxies/{proxy_id}/alerts/{alert_id} Silence a rule, or wake it up again
GET /proxies/{proxy_id}/alerts The alert rules on a proxy
POST /proxies/{proxy_id}/alerts Add an alert rule

specs

POST /proxies/{proxy_id}/publish Publish a version
GET /proxies/{proxy_id}/specs/{version_id} One version's document, verbatim
GET /proxies/{proxy_id}/diff What changed between two versions, in contract and in reality
GET /proxies/{proxy_id}/specs The spec versions of a proxy
POST /proxies/{proxy_id}/specs Add a spec version, from bytes or from a URL

proxies

POST /proxies/{proxy_id}/token Rotate the gateway report token
GET /proxies/{proxy_id} One proxy
DELETE /proxies/{proxy_id} Delete a proxy
PATCH /proxies/{proxy_id} Change a proxy's name, upstream or mode
GET /proxies Every proxy on the account
POST /proxies Create a proxy

environments

GET /proxies/{proxy_id}/environments Named pointers at versions
POST /proxies/{proxy_id}/environments Point an environment at a version
DELETE /proxies/{proxy_id}/environments/{name} Remove an environment

drift

GET /proxies/{proxy_id}/violations Drift, one row per shape of disagreement
GET /proxies/{proxy_id}/coverage How much of the traffic was actually weighed