Skip to main content

Snippets

Generated from apiome-rest/openapi.yaml (API version 1.204.1) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: snippets · 1 operation

GET /v1/versions/{tenant_slug}/{project_id}/{version_record_id}/snippets/{operation_id}​

Render a usage snippet for one operation of a published revision

Return the install + call snippet for one operation of a published revision.

Resolves the project and version within the caller's tenant, requires the revision to be published, loads its canonical content, addresses the operation by operationId / name / URL-encoded canonical key, and renders the requested language deterministically with a content-addressed ETag. A matching If-None-Match short-circuits to 304.

Args: tenant_slug: The tenant's slug. The token's tenant still scopes every read; the slug is used only to resolve {tenant} in the tenant's branding patterns. project_id: The project UUID within the tenant. version_record_id: The revision UUID (versions.id). operation_id: operationId, canonical name, or URL-encoded canonical key. lang: ts / python / curl (aliases fetch / httpx). if_none_match: Standard conditional-request header. auth_data: The authenticated tenant context (JWT or API key).

Returns: The :class:SnippetResponse JSON, or an empty 304.

Operation id: get_version_operation_snippet_v1_versions__tenant_slug___project_id___version_record_id__snippets__operation_id__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_idpathstringyesProject identifier that scopes the request.
version_record_idpathstringyesVersion row identifier (versions.id UUID).
operation_idpathstringyesOperation identifier within the path.
langquerystringyesSnippet language: ts | python | curl (aliases: fetch → ts, httpx → python).
If-None-Matchheaderstring or nullnoETag from a prior response; returns 304 when unchanged.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for render a usage snippet for one operation of a published revision.application/json any
304Not modified (ETag matched If-None-Match).—
400Malformed project id, unknown lang, or unpublished revision.—
404Project, version, or operation not found in tenant.—
422The operation has no HTTP binding (no snippet is defined).—