liveBook · Manning

Api registry

As explained in Automating API Delivery

An API registry is a runtime system that allows users to upload and share API definition files so API consumers can browse, search, and view API details.

An API registry is a runtime catalog where teams upload, share, browse, search, view, update, and remove API definition files and related schemas. Its programmatic API lets applications retrieve artifacts for runtime message validation and other downstream uses. section 9.1.2 section 8.3

Organize registry content around these operational capabilities:

  • Store definitions as artifacts, group logically related artifacts, and use artifact references for reusable schemas and components. section 9.1.2
  • Support formats including OpenAPI, AsyncAPI, GraphQL, Apache Avro, Protocol Buffers, JSON Schema, WSDL, and XSD. section 9.1.2
  • Expose definitions to teams, applications, and downstream systems, improving schema and component discovery, consistency, and reuse. section 9.1.2 section 9.5

Publish an OpenAPI artifact

Start Apicurio Registry with Docker Compose, then publish a product-catalog definition to group acmeapis. The request uses productsapi as the artifact identifier, declares OPENAPI as its type, uploads the YAML file, and updates an existing artifact when present. In a build pipeline, lint the transformed definition before publishing it.

curl -v -X POST 'http://localhost:9090/apis/registry
 /v2/groups/acmeapis/artifacts?ifExists=UPDATE'     #1
 --header 'Content-Type: application/x-yaml'        #2
 --header 'X-Registry-ArtifactId: productsapi'       #3
 --header 'X-Registry-ArtifactType: OPENAPI'                  #4
 --data-binary "@chapter8/apis/product-catalog.oas.yaml"     #5
 --output created-artifact.json     #6
 --fail-with-body     #7

Inspect the publication command to see how registry group, artifact identity, format, source file, update behavior, and failure handling are supplied. section 9.1.2

How Automating API Delivery covers it

How deep it goes
Explains artifacts, groups, references, formats, REST access, local startup, and CI publication, but not registry deployment internals.
Examples
Uses Apicurio Registry, Docker Compose, curl, a product-catalog OpenAPI file, and a GitHub Actions publication step.
What it assumes
Assumes API definition files and CI/CD basics, while demonstrating registry startup and publication commands directly.
What you can do after
Operate Apicurio Registry and publish validated OpenAPI artifacts programmatically from a local environment or CI pipeline.
How it connects
Connects API definitions, schemas, OpenAPI, runtime validation, CI/CD pipelines, Git, artifact repositories, API gateways, and SDK generation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Automating API Delivery. The section links point to the parts of the book it draws on.