Skip to main content

Routes

The portal of an API​

Under the prefix of the plugin, or under /apis/<slug> in a catalog.

MethodPathDescription
GET/The home
GET/<resource path>A page or a file of the documentation
GET/<navigation path>The first page of a tab of the navigation
GET/api-referencesThe API reference (the list of the specifications when there are several)
GET/api-references/<link>The API reference of one specification
GET/keysThe keys of the developer (/subscriptions redirects there)
GET/login?redirect=<path>Sign in through the auth module, then back to <path>
GET/logoutSign out (the Otoroshi logout)
GET/_portal/<file>The files of the portal: portal.css, portal.js, theme.js
GET/api/sessionThe developer signed in, the plans they take keys of, the terms, the reason asked, the gateway and a sample request
GET/api/plansThe plans shown on the portal
GET/api/documentationThe documentation (without the headers its resources are fetched with)
GET/api/openapi?link=<link>A specification, as the reference reads it (gateway server, security scheme)
GET/api/apikeysThe keys of the developer, with their usage (never their secrets)
POST/api/apikeysTake a key: { "name", "description", "plan", "reason", "accept_terms" }
POST/api/apikeys/<id>/revealThe bearer token of a key
POST/api/apikeys/<id>/rotateA new secret for a key: its new bearer token
PUT/api/apikeys/<id>Update a key: { "name", "description", "enabled" }
DELETE/api/apikeys/<id>Revoke a key
any/api/_proxy?scalar_url=<url>The requests of the reference, to the hosts of the API only

<id> is the id of the subscription of the key (or the client id of its API key). The writes (POST, PUT, DELETE on /api/apikeys) need a signed in developer and the X-Otoroshi-Api-Portal: 1 header.

The catalog​

Under the prefix of the plugin.

MethodPathDescription
GET/The home: the APIs, a search
GET/keysThe keys of the developer for all the APIs (?api=<slug> to choose one)
GET/login, /logoutSign in, sign out, for all the APIs
GET/_portal/<file>The files of the portal
GET/api/sessionThe developer signed in, and for each API with keys: its plans, terms, reason, gateway, sample request
GET/api/apisThe APIs of the catalog
GET/api/apikeysThe keys of the developer for all the APIs, with their usage
any/apis/<slug>/...The portal of an API, all the routes above