Skip to main content

Project references

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

Tag: project-references · 6 operations

GET /v1/projects/{tenant_slug}/{project_id}/references​

List a version's external $refs and cycles

List a version's external references, their last refresh and pin, and its $ref cycles.

Raises: HTTPException: 404 unknown project / version; 409 when the version has no single-document source (unsupported-source, source-withheld, no-source); 422 unparseable.

Operation id: list_project_references_v1_projects__tenant_slug___project_id__references_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_idpathstringyesProject identifier that scopes the request.
versionquerystring or nullnoVersion id or label; default the latest.
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 list a version's external $refs and cycles.application/json ProjectReferencesOut
422Validation Errorapplication/json HTTPValidationError

PUT /v1/projects/{tenant_slug}/{project_id}/references/pin​

Pin an external $ref's last fetched snapshot

Accept the reference's last fetched snapshot; later refreshes compare against it.

Raises: HTTPException: 409 ref-not-fetched when the reference has no fetched snapshot yet.

Operation id: pin_project_reference_v1_projects__tenant_slug___project_id__references_pin_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_idpathstringyesProject identifier that scopes the request.
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.

Request body (required)

Request body for pin an external $ref's last fetched snapshot.

Responses

StatusDescriptionBody
200Successful response for pin an external $ref's last fetched snapshot.application/json ProjectReference
422Validation Errorapplication/json HTTPValidationError

DELETE /v1/projects/{tenant_slug}/{project_id}/references/pin​

Unpin an external $ref

Remove a reference's pin.

Raises: HTTPException: 404 ref-not-found when the reference was never refreshed.

Operation id: unpin_project_reference_v1_projects__tenant_slug___project_id__references_pin_delete

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_idpathstringyesProject identifier that scopes the request.
urlquerystringyesRequired. Query parameter: url.
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 unpin an external $ref.application/json ProjectReference
422Validation Errorapplication/json HTTPValidationError

POST /v1/projects/{tenant_slug}/{project_id}/references/refresh​

Refresh a version's external $refs

Fetch the version's external references now and report what changed.

Raises: HTTPException: as :func:list_project_references; 422 unknown-reference when urls names a URL the version does not reference.

Operation id: refresh_project_references_v1_projects__tenant_slug___project_id__references_refresh_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
project_idpathstringyesProject identifier that scopes the request.
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.

Request body (optional)

Request body for refresh a version's external $refs.

Responses

StatusDescriptionBody
200Successful response for refresh a version's external $refs.application/json ProjectReferencesOut
422Validation Errorapplication/json HTTPValidationError

GET /v1/tenants/{tenant_slug}/governance/external-ref-policy​

Get the tenant's external $ref policy

The external-ref policy in force (block when never set). Readable by any member.

Operation id: get_external_ref_policy_v1_tenants__tenant_slug__governance_external_ref_policy_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
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 get the tenant's external $ref policy.application/json ExternalRefPolicyOut
422Validation Errorapplication/json HTTPValidationError

PUT /v1/tenants/{tenant_slug}/governance/external-ref-policy​

Set the tenant's external $ref policy

Change the external-ref policy (tenant administrators only; audit-logged).

Raises: HTTPException: 403 for a non-administrator; 422 when an allowlist pattern is not a hostname pattern, or proxy-fetch comes with an empty allowlist.

Operation id: put_external_ref_policy_v1_tenants__tenant_slug__governance_external_ref_policy_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
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.

Request body (required)

Request body for set the tenant's external $ref policy.

Responses

StatusDescriptionBody
200Successful response for set the tenant's external $ref policy.application/json ExternalRefPolicyOut
422Validation Errorapplication/json HTTPValidationError

Schemas used​

ExternalRefPolicyOut​

The external-ref policy in force, and whether the caller may change it.

PropertyTypeRequiredDescription
modeenum "block", "inline", "proxy-fetch"yesblock fetches nothing; inline fetches (only allowlisted hosts when the allowlist is not empty); proxy-fetch fetches only allowlisted hosts.
allowlistarray of stringyesHostname patterns: schemas.acme.com, *.acme.com or *.
resolution_allowedbooleanyesThe deployment kill switch; false refuses every fetch whatever the mode.
fetchesbooleanyesWhether this policy can fetch anything at all.
can_editbooleanyesWhether the caller is a tenant administrator.

ExternalRefPolicyWrite​

Body of PUT …/governance/external-ref-policy.

PropertyTypeRequiredDescription
modeenum "block", "inline", "proxy-fetch"yesMode.
allowlistarray of stringnoAllowlist.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

PinRequest​

Body of PUT …/references/pin.

PropertyTypeRequiredDescription
urlstringyesURL.

ProjectReference​

One external reference: where it is used and what the last refresh found.

PropertyTypeRequiredDescription
urlstringyesThe URL the reference fetches (fragment removed).
hoststringyesHost.
locationsarray of RefLocationyesLocations.
statusenum "not-fetched", "ok", "changed", "unreachable", "blocked"yesnot-fetched until the first refresh; changed when the document differs from its pin (or, unpinned, from the previous fetch).
reasonstring or nullnoWhy a fetch was refused or failed.
detailstring or nullnoDetail.
digeststring or nullnosha-256 of the last fetched document.
fetched_atstring (date-time) or nullnoWhen the document was last fetched.
checked_atstring (date-time) or nullnoWhen the reference was last refreshed.
pinnedRefPin or nullnoPinned.
diffobject or nullnoThe last change found: {changes: [{pointer, kind, before?, after?}], total, truncated, against: pin|previous, from_digest, to_digest}.

ProjectReferencesOut​

GET …/references.

PropertyTypeRequiredDescription
project_idstringyesProject identifier the resource belongs to.
version_record_idstringyesVersion Record ID.
version_labelstring or nullnoVersion Label.
referencesarray of ProjectReferenceyesReferences.
summarymap of integeryesReferences per status.
cyclesarray of RefCycleyesCycles.
cycle_totalintegeryesCycle Total.
cycles_truncatedbooleanyesCycles Truncated.
policyExternalRefPolicyOutyesPolicy.
refreshedinteger or nullnoReferences fetched by this refresh (refresh only).

RefreshRequest​

Body of POST …/references/refresh.

PropertyTypeRequiredDescription
versionstring or nullnoVersion id or label; default the latest.
urlsarray of string or nullnoRefresh only these URLs (default: every external reference).