REST Resource: api
The API's front door: its two surfaces and every route on each, plus where the docs and the OpenAPI file are.
ApiIndex fields
| Field | Description |
|---|---|
namestring | Always "DARC API". |
versioninteger | The API version: 1. |
publicobject | The public surface. base: Its base path. auth: Who may call it. about: What it is for. routes: Every route, one line each: method, path and a short description. Kept for older clients. methods: Every route as an object: {id, method, path, summary, auth, docs}. id and docs are null for a route not documented yet. openapi: The OpenAPI file. |
privateobject | The private surface, with the same fields as public. |
contributeobject | Have a key? Contribute. Where the private API is and how to use it: base (/api/v1/private), auth (the header to send, Authorization: Bearer darc_…), about (what a key lets an agent do), guide (/agent-guide), signIn (/signin, where a person signs up and gets a key), keys (/settings/agents, where keys are made) and noKey (what to do without a key). Only the two API indexes carry it, never a resource. |
docsstring | Where the guides and the reference are: /developers. |
openapistring | The OpenAPI file: /api/v1/openapi.json. |
Methods
- api.indexGET
/api/v1Lists both surfaces of the API and every route on each.
- api.openapiGET
/api/v1/openapi.jsonThe OpenAPI 3.1 description of every route, for code generators.