|
| 1 | +<!-- |
| 2 | + - SPDX-FileCopyrightText: 2026 Conduction B.V. <info@conduction.nl> |
| 3 | + - SPDX-License-Identifier: EUPL-1.2 |
| 4 | + --> |
| 5 | + |
| 6 | +# API documentation |
| 7 | + |
| 8 | +Read the two documents that describe the catalogue's API, inside stackiq. |
| 9 | + |
| 10 | +Specification: [`openspec/changes/sharing-generated-api-docs/specs/generated-api-docs/spec.md`](https://github.com/ConductionNL/stackiq/blob/development/openspec/changes/sharing-generated-api-docs/specs/generated-api-docs/spec.md). |
| 11 | + |
| 12 | +## Where |
| 13 | + |
| 14 | +**API documentation** in the footer of the navigation, beside Documentation. The page is at `/apps/stackiq/api-docs`. |
| 15 | + |
| 16 | +## Two documents |
| 17 | + |
| 18 | +The catalogue is served by two APIs, and the page has a tab for each: |
| 19 | + |
| 20 | +| Tab | What it describes | Where the document comes from | |
| 21 | +|-----|-------------------|-------------------------------| |
| 22 | +| Catalogue objects | Reading and writing applications, services, usages, connections, contracts and the other catalogue objects | OpenRegister's OpenAPI document of the `stackiq` register, `GET /apps/openregister/api/registers/{id}/oas` | |
| 23 | +| Stackiq endpoints | The endpoints stackiq adds on top: offers, offered usage, views, reports, the CMDB import, settings | stackiq's own OpenAPI document, `GET /apps/stackiq/api/openapi.json` | |
| 24 | + |
| 25 | +Each tab loads its document when you first open it, and shows: |
| 26 | + |
| 27 | +- the title, version and servers of the API; |
| 28 | +- the calls grouped by tag, each with its method, path, parameters, request body and responses; |
| 29 | +- the models (schemas) with their properties; |
| 30 | +- a filter to narrow the calls; |
| 31 | +- **Download OpenAPI file**, which saves the document as JSON. |
| 32 | + |
| 33 | +The documents are fetched from your own instance with your session and shown by stackiq itself. No outside viewer is loaded and the document address is not sent anywhere. |
| 34 | + |
| 35 | +## When a tab says the document is not available |
| 36 | + |
| 37 | +- **Catalogue objects** needs the catalogue register to be configured. Until it is, the tab says the document is not available on this instance. |
| 38 | +- A document you may not read says so; a document that does not load says it could not be loaded. |
| 39 | + |
| 40 | +## The hand-written endpoint descriptions |
| 41 | + |
| 42 | +`GET /apps/stackiq/api/views/docs` and `GET /apps/stackiq/api/aangeboden-gebruik/docs` still answer with their hand-written description, for the integrations that read them. Both now carry a `documentation` entry with the page (`/apps/stackiq/api-docs`) and the OpenAPI document (`/apps/stackiq/api/openapi.json`). New integrations use the OpenAPI document. |
| 43 | + |
| 44 | +## Screenshot |
| 45 | + |
| 46 | +A screenshot of the page follows once it can be taken against a running instance. |
0 commit comments