The docs API
/docs-api is a segregated read API over the architecture model, added for the jEAP Doc Service, which
generates the architecture documentation out of it. It is separate from /api/** in every respect that matters:
its own root, its own payloads, its own authentication and its own error format.
Nothing under /api/** or /external-api/** is changed by it. See API for those.
This page first states the rules that hold for every resource, then documents each of the nine resources on its own - request, payload and every status it can answer with.
Why it is separate
| Authentication | /api/** is served by a filter chain using HTTP basic with several public GETs. Under that root the new resources would inherit those defaults; here every resource requires a bearer token and a semantic role |
| Payloads | /api/model is consumed by other services and is under Pact contract. Every field the documentation needs would otherwise be a change to a contracted payload. The docs API has its own DTOs and can grow with the generator |
| Caching | The Doc Service re-reads the model on every run. The docs API answers conditional requests, so an unchanged landscape costs a handful of 304s |
The resources
All nine are GET, read-only, and require the same role.
| Method and resource | Purpose |
|---|---|
GET /docs-api/systems | Every system, with its team and aliases |
GET /docs-api/systems/{system} | One system with its components and relations |
GET /docs-api/systems/{system}/messages | The events and commands defined by a system |
GET /docs-api/systems/{system}/components/{component}/openapi | The OpenAPI spec of a component |
GET /docs-api/systems/{system}/components/{component}/database-schema | The database schema of a component |
GET /docs-api/openapi-specs | Index of every published OpenAPI spec, with its entity tag |
GET /docs-api/database-schemas | Index of every published database schema, with its entity tag |
GET /docs-api/message-types | Every message type with the versions it has |
GET /docs-api/message-types/{system}/{message}/versions/{version} | One version of one message type, with its Avro schemas |
{system} is matched by name, ignoring case, and by an alias only where no system carries that name -
names and aliases share one namespace, and a system may hold another system's name as an alias, in which
case the named one answers. {component} and {message} are matched by name, ignoring case, and must
belong to the system in the path. The same resolution applies to the system query parameter of the three
indexes.
A generation run costs: the system list once, the export and the messages per system, the three indexes once, a
content resource only for an artifact whose entity tag actually moved, and one request per message type version:
either the first fetch, or a conditional one answered with 304. What a consumer must not do is store a version
once and never ask again - see the caveat under Conditional requests.
All four model resources assemble the whole architecture model per request - the system list too, even though its payload is small: it is light in what it returns, not in what it costs. The per-system resources need the full model because a system's relations include those defined by other systems and the payload names the owning system of every component. The cost therefore grows with systems x landscape size. That is acceptable at the current size and for a generation run that happens a few times a day; it is the first thing to change if either grows. The two content resources, the three indexes and the message type version resource do not load the model - they read exactly the rows they answer with.
Conditional requests
Every resource carries a strong ETag and honours If-None-Match with 304 Not Modified, which has an empty
body. Cache-Control is no-cache: a consumer revalidates, but an unchanged resource costs no payload.
A message type version is nearly, but not quite, a fixed thing, and it is served like everything else for
that reason - which also means a consumer that stores one should revalidate it rather than assume it is final. A changed schema is published as a new version, so a version's payload rarely moves - but
compatibleVersion is derived from the version list when the descriptor declares none, so publishing an
intermediate version changes what an already-published version answers, and every import re-renders the schemas
from the registry. A long max-age or immutable would therefore promise more than the importer delivers.
The tag is "sha256:<hex>". For the model resources it is computed over the serialized response body, so it
changes exactly when the response would. For the two content resources it is the hash of the stored bytes of
the artifact. For a message type version it is derived from the system, the message type and a stored hash
over everything the version resource serves, which every model update writes when it re-imports the message
types. That is what makes the following contract hold:
The
etagof an entry in an index is byte-identical to theETagheader of the resource itscontentUrlnames.
For a message type version stored before the arch repo recorded that hash, the index entry carries no etag
and the version resource tags its serialized body instead, until the next model update writes the hash. A
consumer then revalidates that version with If-None-Match, as it would without the tag.
That is the point of the indexes: a consumer compares the two without making a request, and fetches only what
changed. It can also send the stored value as If-None-Match, so an artifact that changes between the index call
and the fetch costs a cheap 304 rather than a wrong result.
The indexes list what is available, not what changed - an index that omitted unchanged entries could not tell
"unchanged" from "deleted". For the same reason there is no since parameter.
A replication run therefore looks like this:
The hash is stored with the artifact, so an index does not read any blob and a 304 does not read the blob it is
about to not return. It is written when the artifact is stored; artifacts that predate the column were filled by
the V2_6_0 migration, which runs before the service accepts requests. No request ever writes it - that is
what lets these reads be routed to a read replica, and it is why a read cannot make an artifact look freshly
published by bumping its lastModifiedAt.
One representation per resource
Every resource serves application/json and nothing else; another Accept is answered with 406. A request
without an Accept header, or with */*, is served normally.
That includes the OpenAPI spec resource, whose body is the stored spec itself, without a wrapper. A stored spec is always JSON, because the push endpoint parses it as JSON before storing it - see API. Serving a second representation would also break the contract above: the entity tag is the hash of the stored bytes, and one hash cannot describe two different bodies.
Links in the payloads
contentUrl is a path, not a full URL - and it carries the service's context path, so
/my-archrepo-service/docs-api/systems/system/components/system-foo-bar-service/openapi. Resolving it against the base
URL the consumer already called therefore yields the resource again. Outside a request - in a unit test, or on a
service that runs at the root - there is no context path to prepend and the path starts at /docs-api.
It deliberately carries no host. A service and a browser may reach the arch repo under different hosts, so no single absolute URL is right for both, and a consumer resolving against the base it used is correct by construction.
swaggerUrl is the exception and is absolute, because a browser follows it from the generated page. It is
built from archrepo.openapi-base-url - which the instance already configures with the browser-reachable prefix -
followed by the system name and the component name, lower-cased.
Security
Every resource requires the semantic role architecture-model / read, which resolves to
<system-name>_@architecture-model_#read. There is no public and no merely authenticated resource under
/docs-api.
| Situation | Answer |
|---|---|
| No token, or an invalid one | 401 |
The HTTP basic credentials that open /api/** | 401 - the docs API is not on that filter chain |
| A token without the role | 403 |
A token with architecture-model / write | 403 - the operation is part of the role |
| The role issued for another system | 403 - so is the system |
Granting the role to a doc service client on an instance whose system name is my-system therefore means
granting my-system_@architecture-model_#read, and nothing else - the docs API needs no write role.
See Security for how this fits with the rest of the service.
Errors
Errors of the docs API are RFC 9457 problem documents,
application/problem+json. This is the only part of the service that answers that way; the existing endpoints
keep their plain-text errors.
{
"type": "https://jeap.admin.ch/problems/archrepo/system-not-found",
"title": "System not found",
"status": 404,
"detail": "No system or alias named 'no-such-system'",
"instance": "/docs-api/systems/no-such-system"
}
| Status | type | When |
|---|---|---|
404 | system-not-found | No system of that name or alias, including in the system filter of an index |
404 | component-not-found | The system has no such component, or the component exists but belongs to another system |
404 | openapi-spec-not-found | The component has published no spec, or the stored row has no content |
404 | database-schema-not-found | The component has published no schema |
404 | message-type-version-not-found | The system has no such message type, or that message type has no such version |
The five 404 kinds are named apart because a generator has to tell a mistake ("no such system") from a normal
state ("this component has no OpenAPI spec").
401, 403 and 406 are decided by the filter chain and by content negotiation, before the docs API's own
handler runs, and therefore carry no problem type.
GET /docs-api/systems
Every system of the landscape, sorted by name. The index a generation run iterates over, and deliberately light: no components and no relations.
Request
GET /docs-api/systems
No path parameters and no query parameters.
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else is 406 |
If-None-Match | no | An ETag from an earlier response; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json.
| Response header | Value |
|---|---|
ETag | "sha256:<hex>" over the serialized body |
Cache-Control | no-cache |
{
"systems": [
{
"name": "system",
"description": "Warenverkehrssystem",
"aliases": ["system-ALIAS"],
"team": {
"name": "Team Blue",
"contactAddress": "team-blue@example.com",
"jiraLink": "https://jira.example.com/projects/system",
"confluenceLink": "https://confluence.example.com/display/system"
}
},
{
"name": "example",
"aliases": []
}
]
}
| Field | Type | Meaning | Absent when |
|---|---|---|---|
systems | array | Every system, sorted by name | never - an empty landscape is an empty array |
systems[].name | string | The system's name, and what {system} matches first | never |
systems[].description | string | Free text from the importers | the system has none |
systems[].aliases | array of string | Further names the system is known under, sorted | never - a system without aliases has an empty array |
systems[].team | object | The system's default owner | the system has no default owner |
team.name | string | The team's name | the team has none |
team.contactAddress | string | The team's contact address | the team has none |
team.jiraLink | string | The team's Jira project | the team has none |
team.confluenceLink | string | The team's Confluence space | the team has none |
| Status | type | When |
|---|---|---|
304 | - | If-None-Match matched |
401 | - | No token, or one the resource server rejects |
403 | - | The token does not carry architecture-model / read for this system |
406 | - | Accept allows neither application/json nor */* |
GET /docs-api/systems/{system}
One system with its components and its relations - everything the system page and its component pages need, in one response.
Request
GET /docs-api/systems/{system}
| Path parameter | Matches |
|---|---|
system | The system's name or one of its aliases, ignoring case |
No query parameters.
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else is 406 |
If-None-Match | no | An ETag from an earlier response; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json.
| Response header | Value |
|---|---|
ETag | "sha256:<hex>" over the serialized body |
Cache-Control | no-cache |
{
"name": "system",
"description": "Warenverkehrssystem",
"aliases": ["system-ALIAS"],
"team": {
"name": "Team Blue",
"contactAddress": "team-blue@example.com",
"jiraLink": "https://jira.example.com/projects/system",
"confluenceLink": "https://confluence.example.com/display/system"
},
"components": [
{
"name": "system-foo-bar-service",
"description": "Handles foo and bar",
"type": "BACKEND_SERVICE",
"team": { "name": "Team Blue", "contactAddress": "team-blue@example.com" },
"importer": "DEPLOYMENT_LOG",
"lastSeen": "2026-08-12T04:00:00Z",
"restApis": [ { "method": "GET", "path": "/api/foo/{id}" } ],
"openApi": {
"version": "1.4.2",
"serverUrl": "https://foo-bar.example.com",
"contentUrl": "/my-archrepo-service/docs-api/systems/system/components/system-foo-bar-service/openapi",
"swaggerUrl": "https://archrepo.example.com/archrepo-service/swagger-ui/index.html?url=/archrepo-service/api/openapi/system/system-foo-bar-service"
},
"databaseSchema": {
"schemaVersion": "42",
"contentUrl": "/my-archrepo-service/docs-api/systems/system/components/system-foo-bar-service/database-schema"
}
}
],
"relations": [
{
"type": "REST_API_RELATION",
"consumerSystem": "example",
"consumer": "example-gateway",
"providerSystem": "system",
"provider": "system-foo-bar-service",
"method": "GET",
"path": "/api/foo/{id}",
"pactUrl": "https://pactbroker.example.com/pacts/foo"
},
{
"type": "EVENT_RELATION",
"consumerSystem": "example",
"consumer": "example-gateway",
"providerSystem": "system",
"provider": "system-foo-bar-service",
"messageType": "SystemDeclarationAcceptedEvent"
}
]
}
| Field | Type | Meaning | Absent when |
|---|---|---|---|
name | string | The system's stored name, whether the path used the name or an alias | never |
description | string | Free text from the importers | the system has none |
aliases | array of string | Further names the system is known under, sorted | never |
team | object | The system's default owner, with the same fields as in the system list | the system has no default owner |
components | array | The system's components, sorted by name | never |
components[].name | string | The component's name, and what {component} matches | never |
components[].description | string | Free text from the importers | the component has none |
components[].type | enum | BACKEND_SERVICE, FRONTEND, GATEWAY, MOBILE_APP, SELF_CONTAINED_SYSTEM or UNKNOWN | never |
components[].team | object | The component's own team, falling back to the system's default owner | neither is set |
components[].importer | enum | Which source the component was imported from: GRAFANA, DEPLOYMENT_LOG, MESSAGE_TYPE_REGISTRY, PACT_BROKER, OPEN_API or REST_CONTROLLER | no importer is recorded |
components[].lastSeen | ISO-8601 timestamp | When an importer last saw the component; lets a page mark it stale | it was never seen |
components[].restApis | array | The REST endpoints the component provides, sorted by path then method | never - a component without any has an empty array |
restApis[].method | string | The HTTP method | never |
restApis[].path | string | The path template | never |
components[].openApi | object | Pointer to the component's OpenAPI spec | no spec has been published |
openApi.version | string | The spec version as pushed | the push carried none |
openApi.serverUrl | string | The server URL derived from the spec | the spec names none |
openApi.contentUrl | string | Path of the spec content resource, context path included, no host | never |
openApi.swaggerUrl | string | Absolute deep link into the Swagger UI, for a human reader | never |
components[].databaseSchema | object | Pointer to the component's database schema | no schema has been published |
databaseSchema.schemaVersion | string | The schema version as pushed | the push carried none |
databaseSchema.contentUrl | string | Path of the schema content resource, context path included, no host | never |
relations | array | The active relations with either end in this system, wherever they were defined, sorted by type, consumer, provider, method, path and message type | never |
relations[].type | enum | REST_API_RELATION, EVENT_RELATION or COMMAND_RELATION | never |
relations[].consumer | string | Name of the consuming component | the relation names none |
relations[].consumerSystem | string | The system owning that component | the component is not part of the model |
relations[].provider | string | Name of the providing component | the relation names none |
relations[].providerSystem | string | The system owning that component | the component is not part of the model |
relations[].method | string | HTTP method - REST relations only | any other relation type |
relations[].path | string | Path template - REST relations only | any other relation type |
relations[].pactUrl | string | The Pact contract - REST relations only | there is no Pact contract |
relations[].messageType | string | The event or command name - event and command relations only | any other relation type |
Only active relations appear - a deleted relation must not be documented. importer and lastSeen are the
provenance a generated page shows. A component the deployment log reports as undeployed from this environment
is left out of components entirely, the same way the generated site drops its page - this is per-environment,
so a component undeployed from one environment and still deployed in another appears here on one site and not
the other. A relation with either end undeployed is left out of relations for the same reason. A consumer
deciding whether to remove a component's documentation altogether still has to read every environment it serves
and act only once the component is absent from every one of them - absence here carries no reason, so it reads
the same whether a component was undeployed or never existed.
| Status | type | When |
|---|---|---|
304 | - | If-None-Match matched |
401 | - | No token, or one the resource server rejects |
403 | - | The token does not carry architecture-model / read for this system |
404 | system-not-found | No system of that name or alias |
406 | - | Accept allows neither application/json nor */* |
GET /docs-api/systems/{system}/messages
The events and commands defined by a system, with the contract of every component that publishes, consumes, sends or receives them. Kept apart from the system export because message sets are large and change on a different rhythm than the component topology.
Request
GET /docs-api/systems/{system}/messages
| Path parameter | Matches |
|---|---|
system | The system's name or one of its aliases, ignoring case |
No query parameters.
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else is 406 |
If-None-Match | no | An ETag from an earlier response; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json.
| Response header | Value |
|---|---|
ETag | "sha256:<hex>" over the serialized body |
Cache-Control | no-cache |
{
"messages": [
{
"name": "systemCheckNctsReferabilityV2Command",
"kind": "COMMAND",
"scope": "system",
"topic": "system-ncts-command",
"descriptorUrl": "https://descriptors.example.com/ncts.json",
"versions": ["1.0.0"],
"contracts": [
{
"role": "SENDER",
"component": "system-foo-bar-service",
"system": "system",
"topic": "system-ncts-command",
"versions": ["1.0.0"]
}
]
},
{
"name": "systemDeclarationAcceptedEvent",
"kind": "EVENT",
"scope": "system",
"topic": "system-declaration-event",
"descriptorUrl": "https://descriptors.example.com/declaration.json",
"documentationUrl": "https://confluence.example.com/display/system/DeclarationAccepted",
"description": "A declaration was accepted",
"versions": ["1.0.0", "2.0.0"],
"contracts": [
{
"role": "CONSUMER",
"component": "example-gateway",
"system": "example",
"topic": "system-declaration-event",
"versions": ["1.0.0", "2.0.0"]
},
{
"role": "PUBLISHER",
"component": "system-foo-bar-service",
"system": "system",
"topic": "system-declaration-event",
"versions": ["2.0.0"]
}
]
}
]
}
| Field | Type | Meaning | Absent when |
|---|---|---|---|
messages | array | The system's events and commands in one list, sorted by name | never - a system without messages has an empty array |
messages[].name | string | The message type name | never |
messages[].kind | string | EVENT or COMMAND - the two share one list and this is what tells them apart | never |
messages[].scope | string | The scope the message type is registered under | never |
messages[].topic | string | The topic the message type declares | it declares none |
messages[].descriptorUrl | string | Where the message type descriptor lives | never |
messages[].documentationUrl | string | Documentation the message type points at | none was imported |
messages[].description | string | The message type's description | it has none |
messages[].versions | array of string | The registered versions, sorted | never |
messages[].contracts | array | Who publishes, consumes, sends or receives it, sorted by role then component | never |
contracts[].role | string | PUBLISHER or CONSUMER for an event, SENDER or RECEIVER for a command | never |
contracts[].component | string | The component holding the contract | the contract names none |
contracts[].system | string | The system owning that component | the component is not part of the model |
contracts[].topic | string | The topic of this contract | the contract names none |
contracts[].versions | array of string | The versions this contract covers | never |
| Status | type | When |
|---|---|---|
304 | - | If-None-Match matched |
401 | - | No token, or one the resource server rejects |
403 | - | The token does not carry architecture-model / read for this system |
404 | system-not-found | No system of that name or alias |
406 | - | Accept allows neither application/json nor */* |
GET /docs-api/systems/{system}/components/{component}/openapi
The stored OpenAPI spec of one component, verbatim and without a wrapper. This resource does not load the architecture model - it goes to the repositories directly, so that serving one artifact does not assemble the whole landscape.
Request
GET /docs-api/systems/{system}/components/{component}/openapi
| Path parameter | Matches |
|---|---|
system | The system's name or one of its aliases, ignoring case |
component | The component's name, ignoring case. It must belong to the system in the path - the two segments cannot disagree |
No query parameters.
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else, application/yaml included, is 406 |
If-None-Match | no | The ETag of the spec, which the index carries as well; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json.
| Response header | Value |
|---|---|
ETag | "sha256:<hex>" over the stored bytes of the spec - byte-identical to the etag of its index entry |
Cache-Control | no-cache |
{
"openapi": "3.0.3",
"info": { "title": "system-foo-bar-service", "version": "1.4.2" },
"servers": [ { "url": "https://foo-bar.example.com" } ],
"paths": {
"/api/foo/{id}": {
"get": {
"operationId": "getFoo",
"responses": { "200": { "description": "The foo" } }
}
}
}
}
| Field | Type | Meaning | Absent when |
|---|---|---|---|
(the whole body) | object | The stored OpenAPI document as it was pushed. The arch repo adds no envelope and no field of its own, which is what lets the entity tag be the hash of the stored bytes | never - an unavailable spec is a 404, not an empty body |
The version and the server URL the arch repo derived from the spec are not repeated here; they are in the
openApi pointer of the system export and in the index entry.
| Status | type | When |
|---|---|---|
304 | - | If-None-Match matched |
401 | - | No token, or one the resource server rejects |
403 | - | The token does not carry architecture-model / read for this system |
404 | system-not-found | No system of that name or alias |
404 | component-not-found | The system has no such component, or the component belongs to another system |
404 | openapi-spec-not-found | No spec has been published for the component, or the stored row has no content - a row without content is an absent spec, not a 500 |
406 | - | Accept allows neither application/json nor */* |
GET /docs-api/systems/{system}/components/{component}/database-schema
The stored database schema of one component - tables with their columns, primary key and foreign keys, which is what an ERD is generated from. Like the spec resource it reads the artifact directly rather than the model, and serves the stored document byte for byte.
Request
GET /docs-api/systems/{system}/components/{component}/database-schema
| Path parameter | Matches |
|---|---|
system | The system's name or one of its aliases, ignoring case |
component | The component's name, ignoring case. It must belong to the system in the path |
No query parameters.
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else is 406 |
If-None-Match | no | The ETag of the schema, which the index carries as well; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json - the stored document, with no wrapper around it.
| Response header | Value |
|---|---|
ETag | "sha256:<hex>" over the stored bytes - byte-identical to the etag of its index entry, and to the body |
Cache-Control | no-cache |
{
"name": "system_foo_bar",
"version": "42",
"tables": [
{
"name": "declaration",
"columns": [
{ "name": "id", "type": "uuid", "nullable": false },
{ "name": "consignee_id", "type": "uuid", "nullable": true }
],
"primaryKey": { "name": "declaration_pkey", "columnNames": ["id"] },
"foreignKeys": [
{
"name": "declaration_consignee_fk",
"columnNames": ["consignee_id"],
"referencedTableName": "consignee",
"referencedColumnNames": ["id"]
}
]
}
]
}
The document is the DatabaseSchema record of jeap-archrepo-dbschema-model, exactly as the component pushed it.
| Field | Type | Meaning | Absent when |
|---|---|---|---|
name | string | The database schema's own name | never |
version | string | The schema version the publisher wrote | never |
tables | array | The tables | never |
tables[].name | string | Table name | never |
tables[].columns | array | name, type, nullable per column | never |
tables[].primaryKey | object | name and columnNames; serialized as null when the table has none | never - may be null |
tables[].foreignKeys | array | name, columnNames, referencedTableName, referencedColumnNames; serialized as null when the table has none | never - may be null |
The system, the component and the artifact's version are deliberately not in this payload. A consumer already
has all three: two of them are in the URL it called, and the third is the version of the index entry that sent it
here - which is also version in the document. Wrapping them around the document would mean the entity tag, which
is the hash of the stored bytes, no longer identified the whole body.
DatabaseSchema, Table and their nested types carry no @JsonInclude(NON_NULL), so an absent primaryKey or
foreignKeys is rendered as an explicit null rather than omitted.
| Status | Problem type | When |
|---|---|---|
304 | - | If-None-Match matched; empty body |
401 | - | No token, an invalid one, or basic credentials |
403 | - | The token lacks architecture-model / read |
404 | system-not-found | No system of that name or alias |
404 | component-not-found | The system has no such component, or the component belongs to another system |
404 | database-schema-not-found | The component has published no schema |
406 | - | Accept excludes application/json |
GET /docs-api/openapi-specs
Every available OpenAPI spec with the entity tag of its content, so that one call tells a consumer which specs it has to fetch. The entries are sorted by system, then by component.
Request
GET /docs-api/openapi-specs
No path parameters.
| Query parameter | Required | Meaning | Default |
|---|---|---|---|
system | no | Restrict the index to one system, by name or alias, ignoring case. An unknown value answers 404 system-not-found rather than an empty index - matching the stored name alone would answer an alias with an empty index and a consumer would silently replicate nothing | absent or blank: the whole landscape |
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else is 406 |
If-None-Match | no | An ETag from an earlier response; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json.
| Response header | Value |
|---|---|
ETag | "sha256:<hex>" over the serialized body - the tag of the index, not of any artifact |
Cache-Control | no-cache |
{
"artifacts": [
{
"system": "system",
"component": "system-foo-bar-service",
"version": "1.4.2",
"etag": "\"sha256:41ab7c\"",
"lastModifiedAt": "2026-08-12T05:31:00Z",
"contentUrl": "/my-archrepo-service/docs-api/systems/system/components/system-foo-bar-service/openapi"
}
]
}
| Field | Type | Meaning | Absent when |
|---|---|---|---|
artifacts | array | Every available spec, sorted by system then component | never - an empty index is an empty array |
artifacts[].system | string | The system that defines the spec | never |
artifacts[].component | string | The component the spec belongs to | never |
artifacts[].version | string | The spec version as published | the push carried none |
artifacts[].etag | string | Byte-identical to the ETag header of contentUrl, the quotes included, so the comparison needs no request | the artifact was stored before the content hash column existed and its content has not been read since - the first read backfills the hash |
artifacts[].lastModifiedAt | ISO-8601 timestamp | When the artifact was last written: its modification time, or its creation time if it was never modified | never |
artifacts[].contentUrl | string | Path of the content resource, context path included, no host | never |
There is exactly one spec per component - the push path updates it in place - so "latest only" is a property of the model, not a filter this API applies.
| Status | type | When |
|---|---|---|
304 | - | If-None-Match matched |
401 | - | No token, or one the resource server rejects |
403 | - | The token does not carry architecture-model / read for this system |
404 | system-not-found | The system parameter names no known system or alias |
406 | - | Accept allows neither application/json nor */* |
GET /docs-api/database-schemas
The counterpart of the OpenAPI spec index, so that an ERD is only re-rendered when the schema actually changed. Same shape, same parameter and same rules; its entries point at the database schema content resources.
Request
GET /docs-api/database-schemas
No path parameters.
| Query parameter | Required | Meaning | Default |
|---|---|---|---|
system | no | Restrict the index to one system, by name or alias, ignoring case. An unknown value answers 404 system-not-found rather than an empty index | absent or blank: the whole landscape |
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else is 406 |
If-None-Match | no | An ETag from an earlier response; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json.
| Response header | Value |
|---|---|
ETag | "sha256:<hex>" over the serialized body |
Cache-Control | no-cache |
{
"artifacts": [
{
"system": "system",
"component": "system-foo-bar-service",
"version": "42",
"etag": "\"sha256:77de10\"",
"lastModifiedAt": "2026-08-12T05:31:00Z",
"contentUrl": "/my-archrepo-service/docs-api/systems/system/components/system-foo-bar-service/database-schema"
}
]
}
| Field | Type | Meaning | Absent when |
|---|---|---|---|
artifacts | array | Every available schema, sorted by system then component | never - an empty index is an empty array |
artifacts[].system | string | The system the schema is linked to | never |
artifacts[].component | string | The component the schema belongs to | never |
artifacts[].version | string | The schema version as published - the field is called version in both indexes | the push carried none |
artifacts[].etag | string | Byte-identical to the ETag header of contentUrl, the quotes included | the artifact predates the content hash column and its content has not been read since |
artifacts[].lastModifiedAt | ISO-8601 timestamp | Modification time, falling back to creation time | never |
artifacts[].contentUrl | string | Path of the content resource, context path included, no host | never |
There is exactly one schema per component, updated in place by the push path.
| Status | type | When |
|---|---|---|
304 | - | If-None-Match matched |
401 | - | No token, or one the resource server rejects |
403 | - | The token does not carry architecture-model / read for this system |
404 | system-not-found | The system parameter names no known system or alias |
406 | - | Accept allows neither application/json nor */* |
GET /docs-api/message-types
Every message type of the model with the versions it has and the entity tag of each version, without their schemas - the index a consumer diffs against what it has already replicated. The schemas are the largest columns in the model, so deciding what to fetch must not read one: the tags are derived from a hash stored with each version. The entries are sorted by system, then by message type; the versions of a message type keep that order too.
Request
GET /docs-api/message-types
No path parameters.
| Query parameter | Required | Meaning | Default |
|---|---|---|---|
system | no | Restrict the index to one system, by name or alias, ignoring case. An unknown value answers 404 system-not-found rather than an empty index | absent or blank: the whole landscape |
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else is 406 |
If-None-Match | no | An ETag from an earlier response; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json.
| Response header | Value |
|---|---|
ETag | "sha256:<hex>" over the serialized body |
Cache-Control | no-cache |
{
"messageTypes": [
{
"system": "system",
"message": "systemDeclarationAcceptedEvent",
"kind": "EVENT",
"versions": [
{
"version": "1.0.0",
"etag": "\"sha256:5d1e…\"",
"contentUrl": "/my-archrepo-service/docs-api/message-types/system/systemDeclarationAcceptedEvent/versions/1.0.0"
},
{
"version": "2.0.0",
"etag": "\"sha256:9c07…\"",
"contentUrl": "/my-archrepo-service/docs-api/message-types/system/systemDeclarationAcceptedEvent/versions/2.0.0"
}
]
}
]
}
| Field | Type | Meaning | Absent when |
|---|---|---|---|
messageTypes | array | Every message type, sorted by system then message type | never - an empty landscape is an empty array |
messageTypes[].system | string | The system that defines the message type | never |
messageTypes[].message | string | The message type name, and what {message} matches | never |
messageTypes[].kind | string | EVENT or COMMAND | never |
messageTypes[].versions | array | Every version of the message type, sorted | never - a message type without versions is absent from the index entirely |
messageTypes[].versions[].version | string | The version, and what {version} matches exactly | never |
messageTypes[].versions[].etag | string | Byte-identical to the ETag of the version resource | the version was stored before the arch repo recorded its hash, until the next model update |
messageTypes[].versions[].contentUrl | string | Path of the version resource, context path included, no host | never |
A message type with no version at all does not appear: the index lists versions, and an entry without any would name nothing to fetch.
Like the two artifact indexes, this one answers both which versions exist and which of them changed: a
consumer fetches a version whose etag differs from the one it stored, and keeps the others without a request. The
tag covers everything the version resource serves - the compatible version included, which publishing an
intermediate version can change, and the stored spelling of the system and message type. An entry without an
etag is revalidated against the version resource with If-None-Match.
| Status | type | When |
|---|---|---|
304 | - | If-None-Match matched |
401 | - | No token, or one the resource server rejects |
403 | - | The token does not carry architecture-model / read for this system |
404 | system-not-found | The system parameter names no known system or alias |
406 | - | Accept allows neither application/json nor */* |
GET /docs-api/message-types/{system}/{message}/versions/{version}
Everything the arch repo knows about one version of one message type: both Avro schemas and the compatibility the version declares. This is what a message page in the generated documentation shows.
Request
GET /docs-api/message-types/system/systemDeclarationAcceptedEvent/versions/2.0.0
| Path parameter | Matched |
|---|---|
{system} | By name or alias, ignoring case |
{message} | By message type name, ignoring case, within that system. The payload names it as it is stored, not as it was addressed |
{version} | Exactly - a version string is data, not a name, and is not normalised |
| Request header | Required | Value |
|---|---|---|
Authorization | yes | Bearer token carrying the role below |
Accept | no | application/json or */*; anything else is 406 |
If-None-Match | no | An ETag from an earlier response; a match is answered with 304 |
Role: architecture-model / read.
Response
200 OK, application/json.
| Response header | Value |
|---|---|
ETag | The tag the message type index lists for this version; over the serialized body for a version stored before the arch repo recorded its hash |
Cache-Control | no-cache |
{
"system": "system",
"message": "systemDeclarationAcceptedEvent",
"version": "2.0.0",
"compatibilityMode": "BACKWARD",
"compatibleVersion": "1.0.0",
"key": {
"schemaName": "systemDeclarationAcceptedEventKey.avdl",
"schemaUrl": "https://github.com/example/message-type-registry/blob/master/descriptor/system/event/systemDeclarationAcceptedEvent/systemDeclarationAcceptedEventKey.avdl",
"resolvedSchema": "//-- Start systemDeclarationAcceptedEventKey.avdl\n..."
},
"value": {
"schemaName": "systemDeclarationAcceptedEventValue.avdl",
"schemaUrl": "https://github.com/example/message-type-registry/blob/master/descriptor/system/event/systemDeclarationAcceptedEvent/systemDeclarationAcceptedEventValue.avdl",
"resolvedSchema": "//-- Start systemDeclarationAcceptedEventValue.avdl\n..."
}
}
| Field | Type | Meaning | Absent when |
|---|---|---|---|
system | string | The system as it is stored, not as it was addressed - an alias resolves to it | never |
message | string | The message type name as it is stored - a differently-cased path resolves to it | never |
version | string | The version | never |
compatibilityMode | string | The Avro compatibility declared against compatibleVersion, e.g. BACKWARD | the descriptor declares none, typically the first version |
compatibleVersion | string | The version this one is compatible with | there is no predecessor |
key | object | The key schema | the message type has no key schema |
value | object | The value schema | never - a version without a value schema cannot be imported |
*.schemaName | string | The schema file's name in the message type registry | the importer stored none |
*.schemaUrl | string | Where the file can be browsed in the registry | the importer stored none |
*.resolvedSchema | string | The schema as a person reads it, see below | the importer stored none |
resolvedSchema is a rendering, not the file. It is produced when the message type is imported: every
import idl is inlined and marked with comments, the messaging base types are dropped, and namespaces, the
record keyword and the enclosing braces are removed. It is meant to be read, and it is deliberately not valid
Avro IDL - schemaUrl is where the file itself is. The rendering cannot be changed for schemas that are already
imported without importing them again.
| Status | type | When |
|---|---|---|
304 | - | If-None-Match matched |
401 | - | No token, or one the resource server rejects |
403 | - | The token does not carry architecture-model / read for this system |
404 | system-not-found | {system} names no known system or alias |
404 | message-type-version-not-found | The system has no such message type, or it has no such version |
406 | - | Accept allows neither application/json nor */* |
Contract testing
The docs API is under a consumer-driven contract. Its consumer is the jEAP Doc Service, which reads every one
of the nine resources, and its pacts are verified against this service the way every other pact of the arch repo
is: the broker's webhook triggers the instance's pact-verify workflow, which runs the instance's
PactProviderTest.
jeap-archrepo-test ships what such a verification needs, so that an instance keeps its two-line test class:
| What | Where |
|---|---|
| Five provider states covering all nine resources | PactProviderTestBase, mapped route by route in DOCS_API_ROUTE_STATES |
| The landscape they put the service into | DocsApiPactStubs - one landscape for every resource, so that the resources cannot disagree about what exists |
| That no resource is left without a state | DocsApiPactStateCoverageTest, which reads the routes off the controllers |
| State | Serves |
|---|---|
A documented landscape is available | /docs-api/systems, /docs-api/systems/{system}, /docs-api/systems/{system}/messages |
No system named 'no-such-system' is documented | the 404 of /docs-api/systems/{system} - a system that is gone is a normal state for a generator, not a failure |
An OpenAPI specification is published | /docs-api/openapi-specs and the openapi content resource |
A database schema is published | /docs-api/database-schemas and the database-schema content resource |
A message type version is published | /docs-api/message-types and one version of one message type |
A token cannot be part of a contract. This API is bearer-authenticated, and a real token written into a pact
file when the consumer's test ran would be replayed by the verification days later, long expired. So a consumer
records a placeholder bearer token, and the verification replaces it with one signed on the spot - carrying
the real <system-name>_@architecture-model_#read role, so authorization is exercised rather than mocked. Two
consequences:
- no interaction may assert anything about the
Authorizationheader: what the verification sends there is not what the consumer wrote; - an interaction that sends no bearer token at all is left alone, so
401stays verifiable.
The token is signed against the JWKS the application itself serves under the pact-provider-test profile, which
is why that profile pins server.port - the JWKS URI has to name the port before the context starts. An
instance whose build occupies that port overrides server.port on its own test class.
Configuration
The docs API is always active - it is part of what the arch repo is, not a feature an instance opts into. There is no property that switches it on or off.
| Property | Description |
|---|---|
jeap.security.oauth2.resourceserver.system-name | Required. It is what activates semantic authorization, without which the role of this API cannot be evaluated at all. The service refuses to start without it |
archrepo.openapi-base-url | Already required by the service; the docs API reuses it to build swaggerUrl |
Its OpenAPI description is served as its own group, Architecture Repository Docs API, matching /docs-api/** -
see API.
Related
- API - the existing REST API, which this one does not change
- Security - the authentication mechanisms and all roles
- Architecture - the model behind the API
- Data model - the entities the payloads map onto
- Configuration - every property