Skip to main content

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
CachingThe 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 resourcePurpose
GET /docs-api/systemsEvery system, with its team and aliases
GET /docs-api/systems/{system}One system with its components and relations
GET /docs-api/systems/{system}/messagesThe events and commands defined by a system
GET /docs-api/systems/{system}/components/{component}/openapiThe OpenAPI spec of a component
GET /docs-api/systems/{system}/components/{component}/database-schemaThe database schema of a component
GET /docs-api/openapi-specsIndex of every published OpenAPI spec, with its entity tag
GET /docs-api/database-schemasIndex of every published database schema, with its entity tag
GET /docs-api/message-typesEvery 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 etag of an entry in an index is byte-identical to the ETag header of the resource its contentUrl names.

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.

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.

SituationAnswer
No token, or an invalid one401
The HTTP basic credentials that open /api/**401 - the docs API is not on that filter chain
A token without the role403
A token with architecture-model / write403 - the operation is part of the role
The role issued for another system403 - 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"
}
StatustypeWhen
404system-not-foundNo system of that name or alias, including in the system filter of an index
404component-not-foundThe system has no such component, or the component exists but belongs to another system
404openapi-spec-not-foundThe component has published no spec, or the stored row has no content
404database-schema-not-foundThe component has published no schema
404message-type-version-not-foundThe 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 headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else is 406
If-None-MatchnoAn ETag from an earlier response; a match is answered with 304

Role: architecture-model / read.

Response​

200 OK, application/json.

Response headerValue
ETag"sha256:<hex>" over the serialized body
Cache-Controlno-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": []
}
]
}
FieldTypeMeaningAbsent when
systemsarrayEvery system, sorted by namenever - an empty landscape is an empty array
systems[].namestringThe system's name, and what {system} matches firstnever
systems[].descriptionstringFree text from the importersthe system has none
systems[].aliasesarray of stringFurther names the system is known under, sortednever - a system without aliases has an empty array
systems[].teamobjectThe system's default ownerthe system has no default owner
team.namestringThe team's namethe team has none
team.contactAddressstringThe team's contact addressthe team has none
team.jiraLinkstringThe team's Jira projectthe team has none
team.confluenceLinkstringThe team's Confluence spacethe team has none
StatustypeWhen
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 parameterMatches
systemThe system's name or one of its aliases, ignoring case

No query parameters.

Request headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else is 406
If-None-MatchnoAn ETag from an earlier response; a match is answered with 304

Role: architecture-model / read.

Response​

200 OK, application/json.

Response headerValue
ETag"sha256:<hex>" over the serialized body
Cache-Controlno-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"
}
]
}
FieldTypeMeaningAbsent when
namestringThe system's stored name, whether the path used the name or an aliasnever
descriptionstringFree text from the importersthe system has none
aliasesarray of stringFurther names the system is known under, sortednever
teamobjectThe system's default owner, with the same fields as in the system listthe system has no default owner
componentsarrayThe system's components, sorted by namenever
components[].namestringThe component's name, and what {component} matchesnever
components[].descriptionstringFree text from the importersthe component has none
components[].typeenumBACKEND_SERVICE, FRONTEND, GATEWAY, MOBILE_APP, SELF_CONTAINED_SYSTEM or UNKNOWNnever
components[].teamobjectThe component's own team, falling back to the system's default ownerneither is set
components[].importerenumWhich source the component was imported from: GRAFANA, DEPLOYMENT_LOG, MESSAGE_TYPE_REGISTRY, PACT_BROKER, OPEN_API or REST_CONTROLLERno importer is recorded
components[].lastSeenISO-8601 timestampWhen an importer last saw the component; lets a page mark it staleit was never seen
components[].restApisarrayThe REST endpoints the component provides, sorted by path then methodnever - a component without any has an empty array
restApis[].methodstringThe HTTP methodnever
restApis[].pathstringThe path templatenever
components[].openApiobjectPointer to the component's OpenAPI specno spec has been published
openApi.versionstringThe spec version as pushedthe push carried none
openApi.serverUrlstringThe server URL derived from the specthe spec names none
openApi.contentUrlstringPath of the spec content resource, context path included, no hostnever
openApi.swaggerUrlstringAbsolute deep link into the Swagger UI, for a human readernever
components[].databaseSchemaobjectPointer to the component's database schemano schema has been published
databaseSchema.schemaVersionstringThe schema version as pushedthe push carried none
databaseSchema.contentUrlstringPath of the schema content resource, context path included, no hostnever
relationsarrayThe active relations with either end in this system, wherever they were defined, sorted by type, consumer, provider, method, path and message typenever
relations[].typeenumREST_API_RELATION, EVENT_RELATION or COMMAND_RELATIONnever
relations[].consumerstringName of the consuming componentthe relation names none
relations[].consumerSystemstringThe system owning that componentthe component is not part of the model
relations[].providerstringName of the providing componentthe relation names none
relations[].providerSystemstringThe system owning that componentthe component is not part of the model
relations[].methodstringHTTP method - REST relations onlyany other relation type
relations[].pathstringPath template - REST relations onlyany other relation type
relations[].pactUrlstringThe Pact contract - REST relations onlythere is no Pact contract
relations[].messageTypestringThe event or command name - event and command relations onlyany 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.

StatustypeWhen
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
404system-not-foundNo 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 parameterMatches
systemThe system's name or one of its aliases, ignoring case

No query parameters.

Request headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else is 406
If-None-MatchnoAn ETag from an earlier response; a match is answered with 304

Role: architecture-model / read.

Response​

200 OK, application/json.

Response headerValue
ETag"sha256:<hex>" over the serialized body
Cache-Controlno-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"]
}
]
}
]
}
FieldTypeMeaningAbsent when
messagesarrayThe system's events and commands in one list, sorted by namenever - a system without messages has an empty array
messages[].namestringThe message type namenever
messages[].kindstringEVENT or COMMAND - the two share one list and this is what tells them apartnever
messages[].scopestringThe scope the message type is registered undernever
messages[].topicstringThe topic the message type declaresit declares none
messages[].descriptorUrlstringWhere the message type descriptor livesnever
messages[].documentationUrlstringDocumentation the message type points atnone was imported
messages[].descriptionstringThe message type's descriptionit has none
messages[].versionsarray of stringThe registered versions, sortednever
messages[].contractsarrayWho publishes, consumes, sends or receives it, sorted by role then componentnever
contracts[].rolestringPUBLISHER or CONSUMER for an event, SENDER or RECEIVER for a commandnever
contracts[].componentstringThe component holding the contractthe contract names none
contracts[].systemstringThe system owning that componentthe component is not part of the model
contracts[].topicstringThe topic of this contractthe contract names none
contracts[].versionsarray of stringThe versions this contract coversnever
StatustypeWhen
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
404system-not-foundNo 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 parameterMatches
systemThe system's name or one of its aliases, ignoring case
componentThe component's name, ignoring case. It must belong to the system in the path - the two segments cannot disagree

No query parameters.

Request headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else, application/yaml included, is 406
If-None-MatchnoThe 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 headerValue
ETag"sha256:<hex>" over the stored bytes of the spec - byte-identical to the etag of its index entry
Cache-Controlno-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" } }
}
}
}
}
FieldTypeMeaningAbsent when
(the whole body)objectThe 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 bytesnever - 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.

StatustypeWhen
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
404system-not-foundNo system of that name or alias
404component-not-foundThe system has no such component, or the component belongs to another system
404openapi-spec-not-foundNo 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 parameterMatches
systemThe system's name or one of its aliases, ignoring case
componentThe component's name, ignoring case. It must belong to the system in the path

No query parameters.

Request headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else is 406
If-None-MatchnoThe 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 headerValue
ETag"sha256:<hex>" over the stored bytes - byte-identical to the etag of its index entry, and to the body
Cache-Controlno-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.

FieldTypeMeaningAbsent when
namestringThe database schema's own namenever
versionstringThe schema version the publisher wrotenever
tablesarrayThe tablesnever
tables[].namestringTable namenever
tables[].columnsarrayname, type, nullable per columnnever
tables[].primaryKeyobjectname and columnNames; serialized as null when the table has nonenever - may be null
tables[].foreignKeysarrayname, columnNames, referencedTableName, referencedColumnNames; serialized as null when the table has nonenever - 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.

StatusProblem typeWhen
304-If-None-Match matched; empty body
401-No token, an invalid one, or basic credentials
403-The token lacks architecture-model / read
404system-not-foundNo system of that name or alias
404component-not-foundThe system has no such component, or the component belongs to another system
404database-schema-not-foundThe 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 parameterRequiredMeaningDefault
systemnoRestrict 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 nothingabsent or blank: the whole landscape
Request headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else is 406
If-None-MatchnoAn ETag from an earlier response; a match is answered with 304

Role: architecture-model / read.

Response​

200 OK, application/json.

Response headerValue
ETag"sha256:<hex>" over the serialized body - the tag of the index, not of any artifact
Cache-Controlno-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"
}
]
}
FieldTypeMeaningAbsent when
artifactsarrayEvery available spec, sorted by system then componentnever - an empty index is an empty array
artifacts[].systemstringThe system that defines the specnever
artifacts[].componentstringThe component the spec belongs tonever
artifacts[].versionstringThe spec version as publishedthe push carried none
artifacts[].etagstringByte-identical to the ETag header of contentUrl, the quotes included, so the comparison needs no requestthe artifact was stored before the content hash column existed and its content has not been read since - the first read backfills the hash
artifacts[].lastModifiedAtISO-8601 timestampWhen the artifact was last written: its modification time, or its creation time if it was never modifiednever
artifacts[].contentUrlstringPath of the content resource, context path included, no hostnever

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.

StatustypeWhen
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
404system-not-foundThe 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 parameterRequiredMeaningDefault
systemnoRestrict the index to one system, by name or alias, ignoring case. An unknown value answers 404 system-not-found rather than an empty indexabsent or blank: the whole landscape
Request headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else is 406
If-None-MatchnoAn ETag from an earlier response; a match is answered with 304

Role: architecture-model / read.

Response​

200 OK, application/json.

Response headerValue
ETag"sha256:<hex>" over the serialized body
Cache-Controlno-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"
}
]
}
FieldTypeMeaningAbsent when
artifactsarrayEvery available schema, sorted by system then componentnever - an empty index is an empty array
artifacts[].systemstringThe system the schema is linked tonever
artifacts[].componentstringThe component the schema belongs tonever
artifacts[].versionstringThe schema version as published - the field is called version in both indexesthe push carried none
artifacts[].etagstringByte-identical to the ETag header of contentUrl, the quotes includedthe artifact predates the content hash column and its content has not been read since
artifacts[].lastModifiedAtISO-8601 timestampModification time, falling back to creation timenever
artifacts[].contentUrlstringPath of the content resource, context path included, no hostnever

There is exactly one schema per component, updated in place by the push path.

StatustypeWhen
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
404system-not-foundThe 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 parameterRequiredMeaningDefault
systemnoRestrict the index to one system, by name or alias, ignoring case. An unknown value answers 404 system-not-found rather than an empty indexabsent or blank: the whole landscape
Request headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else is 406
If-None-MatchnoAn ETag from an earlier response; a match is answered with 304

Role: architecture-model / read.

Response​

200 OK, application/json.

Response headerValue
ETag"sha256:<hex>" over the serialized body
Cache-Controlno-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"
}
]
}
]
}
FieldTypeMeaningAbsent when
messageTypesarrayEvery message type, sorted by system then message typenever - an empty landscape is an empty array
messageTypes[].systemstringThe system that defines the message typenever
messageTypes[].messagestringThe message type name, and what {message} matchesnever
messageTypes[].kindstringEVENT or COMMANDnever
messageTypes[].versionsarrayEvery version of the message type, sortednever - a message type without versions is absent from the index entirely
messageTypes[].versions[].versionstringThe version, and what {version} matches exactlynever
messageTypes[].versions[].etagstringByte-identical to the ETag of the version resourcethe version was stored before the arch repo recorded its hash, until the next model update
messageTypes[].versions[].contentUrlstringPath of the version resource, context path included, no hostnever

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.

StatustypeWhen
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
404system-not-foundThe 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 parameterMatched
{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 headerRequiredValue
AuthorizationyesBearer token carrying the role below
Acceptnoapplication/json or */*; anything else is 406
If-None-MatchnoAn ETag from an earlier response; a match is answered with 304

Role: architecture-model / read.

Response​

200 OK, application/json.

Response headerValue
ETagThe 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-Controlno-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..."
}
}
FieldTypeMeaningAbsent when
systemstringThe system as it is stored, not as it was addressed - an alias resolves to itnever
messagestringThe message type name as it is stored - a differently-cased path resolves to itnever
versionstringThe versionnever
compatibilityModestringThe Avro compatibility declared against compatibleVersion, e.g. BACKWARDthe descriptor declares none, typically the first version
compatibleVersionstringThe version this one is compatible withthere is no predecessor
keyobjectThe key schemathe message type has no key schema
valueobjectThe value schemanever - a version without a value schema cannot be imported
*.schemaNamestringThe schema file's name in the message type registrythe importer stored none
*.schemaUrlstringWhere the file can be browsed in the registrythe importer stored none
*.resolvedSchemastringThe schema as a person reads it, see belowthe 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.

StatustypeWhen
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
404system-not-found{system} names no known system or alias
404message-type-version-not-foundThe 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:

WhatWhere
Five provider states covering all nine resourcesPactProviderTestBase, mapped route by route in DOCS_API_ROUTE_STATES
The landscape they put the service intoDocsApiPactStubs - one landscape for every resource, so that the resources cannot disagree about what exists
That no resource is left without a stateDocsApiPactStateCoverageTest, which reads the routes off the controllers
StateServes
A documented landscape is available/docs-api/systems, /docs-api/systems/{system}, /docs-api/systems/{system}/messages
No system named 'no-such-system' is documentedthe 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 Authorization header: what the verification sends there is not what the consumer wrote;
  • an interaction that sends no bearer token at all is left alone, so 401 stays 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.

PropertyDescription
jeap.security.oauth2.resourceserver.system-nameRequired. 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-urlAlready 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.

  • 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