canonical: https://jentic.com/apis/apicurio.local/apicurio-registry

# Apicurio Registry API [v2]

Apicurio Registry is a self-hosted datastore for event schemas and API designs. Teams use it to store, version, and validate Avro, AsyncAPI, Protobuf, GraphQL, JSON Schema, Kafka Connect, OpenAPI, WSDL, and XSD artifacts so that producers and consumers stay in sync as schemas evolve. The v2 REST API exposes 65 operations across artifacts, versions, metadata, content rules, and search, and supports admin operations like export, import, and global rule configuration. It is the integration surface for CI pipelines, schema-aware Kafka clients, and tooling that needs programmatic schema discovery.

## For AI agents

Manage versioned event schemas and API designs in Apicurio Registry: create artifacts, fetch content by global ID, configure compatibility rules, and search across schema groups.

## Scope

Does not handle schema execution, message brokering, or runtime serialization - use for storing, versioning, and validating schema artifacts only.

## Capabilities

- Publish new versions of Avro, Protobuf, AsyncAPI, OpenAPI, JSON Schema, and WSDL artifacts under a group
- Fetch artifact content by globalId or by group, artifact, and version for runtime schema resolution
- Configure per-artifact and global compatibility rules to gate breaking schema changes
- Search artifacts by name, group, label, or content for schema discovery across teams
- Export and import the full registry contents to migrate or back up a deployment
- Manage artifact metadata, state (enabled, disabled, deprecated), and version-level metadata

## Use cases

### Kafka Schema Governance

Apicurio Registry stores Avro, Protobuf, and JSON Schema artifacts that Kafka producers and consumers reference at serialize and deserialize time. Compatibility rules (BACKWARD, FORWARD, FULL) at the artifact or global level prevent breaking schema changes from being published. Teams running Kafka on Strimzi or Confluent commonly run Apicurio for schema governance because it speaks the Confluent-compatible API as well as its own.

Example prompt: POST a new Avro schema version to `/groups/orders/artifacts/order-created/versions` and configure a BACKWARD compatibility rule via `/groups/orders/artifacts/order-created/rules`

### API Design Versioning

Store OpenAPI, AsyncAPI, and GraphQL design documents alongside event schemas in a single versioned registry. Teams keep their public-facing API specs in Apicurio so that gateway configuration, mock servers, and client SDK pipelines can pull the canonical spec by group and artifact ID. Each artifact carries metadata, labels, and lifecycle state (enabled, deprecated, disabled).

Example prompt: Upload an OpenAPI 3 spec under `/groups/public-api/artifacts/checkout-v1/versions` and set its state to 'DEPRECATED' on the previous version via `/groups/public-api/artifacts/checkout-v1/versions/1/state`

### CI/CD Schema Validation

Wire Apicurio into a CI pipeline so that every pull request that changes a schema is validated against the registry's compatibility rules before merge. The `/groups/{groupId}/artifacts/{artifactId}/test` endpoint accepts a candidate artifact and reports whether it would pass the configured compatibility checks, which lets teams catch breaking changes before they reach a Kafka topic or production API.

Example prompt: Send a candidate Avro payload to `/groups/orders/artifacts/order-created/test` and surface any compatibility error in the PR comment

### Cross-Team Schema Discovery

When multiple teams produce events on shared topics, Apicurio's `/search/artifacts` endpoint lets them discover existing schemas before creating duplicates. Search supports name, group, label, and content filters, and returns globalIds that can be used directly by Kafka clients. This shortens onboarding for new services from days to minutes when the existing schema corpus is well-labelled.

Example prompt: Call `/search/artifacts`?name=invoice&labels=pii to list invoice-related schemas marked as containing PII

### AI Agent Schema Lookup

Give an AI agent a tool to fetch the canonical schema for any event or API design before it generates code or test fixtures. Through Jentic, the agent searches for an intent like 'get avro schema by global id' and gets the matching Apicurio operation. The agent then loads the registry content directly instead of guessing field names from sample messages.

Example prompt: Search Jentic for 'fetch schema by global id', load the `/ids/globalIds/{globalId}` schema, and execute with globalId=42 to retrieve the Avro definition

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/ids/globalIds/{globalId}` | Fetch artifact content by global ID for runtime schema resolution |
| POST | `/groups/{groupId}/artifacts` | Create a new artifact in a group |
| GET | `/groups/{groupId}/artifacts/{artifactId}/versions` | List all versions of an artifact |
| GET | `/search/artifacts` | Search artifacts across the registry |
| POST | `/groups/{groupId}/artifacts/{artifactId}/rules` | Configure a compatibility or validity rule on an artifact |
| GET | `/admin/export` | Export the full registry contents |
| POST | `/admin/import` | Import a registry export back into a registry |

## Key resources

- **Artifacts** — Create, list, retrieve, and delete schema and API artifacts within a group
- **Versions** — Manage versions of an artifact, fetch content by version, and update version metadata
- **Metadata** — Read and write artifact and version metadata including labels and properties
- **Artifact rules** — Configure compatibility, validity, and integrity rules per artifact
- **Global rules** — Set registry-wide compatibility and validity rules that apply when no artifact rule overrides them
- **Search** — Search artifacts by name, group, labels, or content
- **Admin** — Export, import, and configure registry-wide artifact types and roles
- **Groups** — Manage artifact groups for namespacing

## Why Jentic

- **Setup:** Wiring the Apicurio Registry API by hand means pointing at your own registry host, learning the group and artifact resource shapes, and managing rules and imports yourself. Through Jentic you install once, import Apicurio Registry from the API Directory, and your agent calls it against your configured host.
- **Permission scoping:** Apicurio puts the group id and artifact id in the URL path (`/groups/{groupId}/artifacts/{artifactId}/...`), so a rule can pin your agent to one artifact: it can read that artifact's versions and rules and nothing else. You choose the operations it may call, so admin import is not included unless you add it.
- **Credential handling:** Any credential your registry requires is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'search schema artifacts' or 'add an artifact version', and Jentic returns the matching Apicurio operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **GitHub REST API** — Source-control API used to host the schema files that get published to Apicurio
- **Swagger Generator API** — Generates client and server code from an OpenAPI document stored in Apicurio
- **GitLab API** — Alternative source-control surface for schema files referenced by Apicurio

## FAQ

### What authentication does the Apicurio Registry API [v2] use?

The reference Apicurio Registry v2 OpenAPI spec does not declare a security scheme; production deployments typically front the registry with Keycloak or another OIDC provider, in which case calls require a bearer token. Through Jentic, any bearer token configured for your registry deployment is stored encrypted and injected at execution time.

### Can I register a new Avro schema with this API?

Yes. POST the Avro JSON to `/groups/{groupId}/artifacts` with the X-Registry-ArtifactType header set to AVRO. Subsequent versions go to `/groups/{groupId}/artifacts/{artifactId}/versions`, and global ID lookup uses `/ids/globalIds/{globalId}` which is what Kafka serializers call at runtime.

### How do I enforce backward compatibility on a schema with the Apicurio Registry API [v2]?

POST to `/groups/{groupId}/artifacts/{artifactId}/rules` with body {"type":"COMPATIBILITY","config":"BACKWARD"}. New versions that violate the rule are rejected. You can also set a global rule via `/admin/rules` so it applies registry-wide when an artifact has no specific rule.

### What artifact types does the Apicurio Registry API [v2] support?

Apache Avro, AsyncAPI, Google Protocol Buffers, GraphQL schema, JSON Schema, Kafka Connect schema, OpenAPI, WSDL, and XSD. Call `/admin/artifactTypes` to enumerate the types accepted by your registry instance.

### How do I search for a schema in the Apicurio Registry API [v2] through Jentic?

Search Jentic for 'search artifacts in apicurio registry', load the `/search/artifacts` schema, and execute with parameters like name, labels, or group. The returned list of SearchedArtifact entries gives you globalIds you can fetch via `/ids/globalIds/{globalId}.`

### Is the Apicurio Registry free?

Apicurio Registry is open source under the Apache 2.0 licence and free to self-host. Red Hat sells a supported distribution as Service Registry on OpenShift; the API surface is the same in both.

### Can I limit what my agent is allowed to do with the Apicurio Registry API?

Yes. Because Jentic One is self-hosted by you, your own rules decide which operations and credentials the agent may use. Since Apicurio puts the group and artifact IDs in the URL path (`/groups/{groupId}/artifacts/{artifactId}/...`), you can pin the agent to a single artifact so it only reads that artifact's versions and rules and nothing else. You also choose which operations it may call, so admin export and import stay off limits unless you explicitly add them.
