One API as an OpenAPI 3 document
const url = 'https://beta-api.plune.ai/v1/api-endpoints/export';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://beta-api.plune.ai/v1/api-endpoints/export \ --header 'Authorization: Bearer <token>'The API named (apiId), or the project’s only one - with several, 400 api_required; its name is the document’s title. An OpenAPI 3.0.3 document cairn api --spec reads, as the attachment api-catalog.openapi.json: each endpoint an operation with its path parameters and a default response (the catalog does not describe answers). A derived endpoint is marked x-cairn-derived, as Cairn marks its own drafts; x-plune-source and x-plune-last-seen say where it was learnt and last seen. A public endpoint has security: []; the scheme names of one that asks for auth are in x-plune-auth, since the catalog does not know what the schemes are.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”One API of the project (GET /v1/apis); another project’s, or one that is not there, is 404
Responses
Section titled “ Responses ”The document
object
Example
{ "openapi": "3.0.3", "info": { "title": "Shop API", "version": "0.0.0", "description": "The API catalog of a Plune project: what is marked x-cairn-derived was inferred from examples or traffic, not described by a spec." }, "paths": { "/orders/{orderId}": { "get": { "summary": "One order", "parameters": [ { "name": "orderId", "in": "path", "required": true, "schema": { "type": "string" } } ], "x-plune-auth": [ "bearerAuth" ], "responses": { "default": { "description": "Not described in the catalog" } }, "x-plune-source": "spec" } } }}With several APIs, no apiId (api_required)
object
Example generated
{ "error": "example"}No / invalid token or session
No such API in your project
object
Example generated
{ "error": "example"}