Skip to main content

Deliver an export

An export ends with a file to download. Most spec workflows don't stop there: the specs belong in a repository, a pipeline has to hear that a new version exists, or a data platform reads from a bucket. Delivery sends a finished export to where it is used, through one of three channels, and records every attempt on the export job and in the audit log.

Delivery works on an export job that has finished (see How an export runs). A dry run has no files to deliver.

Choose a channel​

ChannelWhat it doesUse it whenPage
Git repositoryWrites the bundle into a registered GitHub repository as a pull request, with the fidelity summary in its description, or as a direct commit.Specs are reviewed and versioned in a repository.Deliver to git
WebhookPOSTs the manifest, the fidelity report and the bundle (inline, or as a signed link) to a URL, signed with HMAC-SHA256 and retried with backoff.A CI/CD pipeline or another service should act on each new export.Deliver to a webhook
Object storageUploads the files to an S3-compatible bucket (AWS S3, MinIO, Cloudflare R2, Ceph) under a partitioned prefix, with a content-addressed manifest.A data platform or archive reads exports from a bucket.Deliver to object storage

Every channel works the same way:

  • It needs versions:publish, because it sends an export outside Apiome.
  • Credentials stay in the workspace. A git delivery uses the repository's linked account, an object storage delivery a bucket credential sealed in the vault, and a webhook a shared secret that is sealed or never stored. No secret is ever returned, logged or audited.
  • Destinations are guarded. A webhook URL or a custom storage endpoint that resolves to a private network is refused.
  • Failures are runs. A delivery that reaches its destination and fails still answers with a run, a stable errorCode and a message that says what to fix.

Push to a schema registry​

An Avro, JSON Schema or Protobuf export can also be registered on a Confluent-compatible schema registry (Confluent Platform or Cloud, Karapace, Apicurio's ccompat API). Each schema becomes a subject version: the push checks each one for compatibility first and skips any that are already registered. It also orders the schemas so each one comes after the ones it references, and a dry run checks every subject without writing anything. It goes through a Schema registry connector, which holds the registry's credentials, and needs imports:edit rather than versions:publish. In Export studio it is the Schema registry destination in Deliver. See Push to a schema registry.

Deliver from Export studio​

On 6. Review & Generate, the Deliver section lists every destination for this export:

The Deliver section of a finished Avro export: Download as the default, deliveries to git with its pull request link, a webhook with the receiver's HTTP 202, object storage with the objects written, and a schema registry push listing each subject with its version and schema idThe Deliver section of a finished Avro export: Download as the default, deliveries to git with its pull request link, a webhook with the receiver's HTTP 202, object storage with the objects written, and a schema registry push listing each subject with its version and schema id
Route/ade/dashboard/export/studio
  1. Download is always there, and the default: the file and the .zip are yours whatever else happens.
  2. Delivery profiles: before you click “Generate”, tick profiles under Deliver when it completes; after, pick one and click “Deliver now”. Each delivery shows what it left behind:
    • Git repository: the pull request it opened or updated, as a link, or the commit it made on its branch;
    • Webhook: the HTTP status the receiver answered with, and the digest of the body sent;
    • Object storage: the objects it wrote (a link for an http(s) endpoint, the s3:// address for AWS) and the delivery manifest.
  3. Schema registry, for an Avro, JSON Schema or Protobuf export: choose a Schema registry connector, how subjects are named (Record name, Topic name or Topic and record, with the Kafka topic for the topic strategies) and whether they are Value or Key subjects, then click “Push to registry”. Tick Dry run to check every subject against the registry without registering anything. Each subject is listed with its status (Registered, Already registered, Incompatible…), its version and its schema id. Pushing needs imports:edit.

With no delivery profile, the section says where to create one (the Delivery tab); with no schema registry connector, where to add one (Connectors). Profiles and connectors are managed on their own screens, and no credential is ever shown here.

Save a destination as a profile​

To deliver to the same place again, save the destination once as a delivery profile: a name, a channel, the destination and the credential it delivers with. You can then:

  • In Export studio, manage profiles on the Delivery tab, tick them under Deliver when it completes on Review before you click Generate, or pick one and click Deliver now once the export has finished.
  • In the CLI, pass --deliver PROFILE to apiome export <format>, or run apiome export deliver JOB --profile PROFILE.
  • In the API, send delivery_profiles with POST /v1/export/{tenant}/jobs, or a profileId to POST /v1/export/{tenant}/jobs/{job_id}/deliveries.

A preset can carry a delivery profile too, so applying it delivers the export without ticking anything — and subscribed to a project, it delivers every new version as it is published, unless the export loses too much.

The Delivery tab of Export studio: three delivery profiles — object storage, webhook and git — with one profile's deliveries open, one delivered and one failed with its error codeThe Delivery tab of Export studio: three delivery profiles — object storage, webhook and git — with one profile's deliveries open, one delivered and one failed with its error code
Route/ade/dashboard/export/studio?tab=delivery

Routes at a glance​

RouteWhat it does
POST /v1/export/{tenant}/jobs/{job_id}/deliveries/gitDeliver to a git repository.
POST /v1/export/{tenant}/jobs/{job_id}/deliveries/webhookDeliver to a webhook.
POST /v1/export/{tenant}/jobs/{job_id}/deliveries/object-storageDeliver to an S3-compatible bucket.
POST /v1/export/{tenant}/storage-credentialsStore a bucket credential in the vault.
POST /v1/export/{tenant}/delivery-profilesSave a destination as a profile.
POST /v1/export/{tenant}/jobs/{job_id}/deliveriesDeliver with a profile.
GET /v1/export/{tenant}/jobs/{job_id}/deliveriesEvery delivery of a job, across all channels.
POST /v1/export/{tenant}/schema-registry/pushRegister an Avro, JSON Schema or Protobuf export on a schema registry, through a connector.

Each channel's own GET lists that channel's runs for a job. Every field is in the export delivery reference.

See what was delivered​

  • On the job: GET /v1/export/{tenant}/jobs/{job_id}/deliveries lists every delivery, newest first, with its channel, outcome (in_progress, delivered or failed), destination, attempt count and result: the pull request (pullRequestUrl, pullRequestNumber) or commit, the webhook receiver's httpStatus, or the objectUrls and manifestUrl written. In Export studio, the Deliver section on Review shows the same list.
  • In the audit log: each delivery is recorded as export.git_delivery, export.webhook_delivery or export.object_storage_delivery, with its profile when it was made with one. Saving, changing and deleting profiles and bucket credentials are recorded too.