metadata

Hasura-compatible metadata API

Dispatches on args.type to per-op handlers. Operations not yet migrated off the Hasura proxy return {code: "not-supported"}. Admin-only: requests without a valid X-Hasura-Admin-Secret header are rejected with 401 (no JWT fallback).

post/v1/metadata

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /v1/metadata
  • Auth
    API key in header X-Hasura-Admin-Secret

Request body

typestring required

Operation discriminator (e.g. export_metadata, pg_track_table)

argsunknown
versioninteger

Metadata API version (1 or 2; defaults to 1)

resource_versioninteger

Optimistic-concurrency token from the most recent export_metadata

sourcestring

Source name when the op targets a specific data source

Example request

{
  "type": "export_metadata"
}

Response

Per-operation result. The body shape varies by type: most ops return {message: "success"}, export_metadata returns {resource_version, metadata}, etc. Modelled as a freeform object until per-op schemas are migrated into this spec.

object required

Changes

No recorded changes to this operation across all 1 revision of this API.