Skip to main content

Slate git preview

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: slate-git-preview · 8 operations

GET /v1/slate/git/connections​

List Git Connections

List the tenant's git provider connections, without their secrets.

Operation id: list_git_connections_v1_slate_git_connections_get

Parameters

NameInTypeRequiredDescription
tenantSlugquerystring or nullnoTenant slug. Optional: the Slate routes read tenancy from the credential, so a browser call carrying a session JWT does not need to name a tenant in the 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 list git connections.application/json ConnectionListResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/slate/git/connections​

Create Git Connection

Register or update a git provider connection. Secret and token are write-only.

Operation id: create_git_connection_v1_slate_git_connections_post

Parameters

NameInTypeRequiredDescription
tenantSlugquerystring or nullnoTenant slug. Optional: the Slate routes read tenancy from the credential, so a browser call carrying a session JWT does not need to name a tenant in the 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.

Request body (required)

Request body for create git connection.

Responses

StatusDescriptionBody
201Successful response for create git connection.application/json ConnectionBody
422Validation Errorapplication/json HTTPValidationError

POST /v1/slate/git/connections/{connection_id}/cleanup​

Cleanup Previews

Reap the tenant's expired previews (audited).

Operation id: cleanup_previews_v1_slate_git_connections__connection_id__cleanup_post

Parameters

NameInTypeRequiredDescription
connection_idpathstringyesPath parameter identifying the connection id segment.
tenantSlugquerystring or nullnoTenant slug. Optional: the Slate routes read tenancy from the credential, so a browser call carrying a session JWT does not need to name a tenant in the 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 cleanup previews.application/json CleanupResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/slate/git/events​

Receive Git Event

Receive a signed GitHub webhook and create one immutable preview per source digest.

The signature is verified over the raw request body — never a re-serialisation of the parsed JSON — against the resolved connection's secret. A ping is answered, a non-push event or a non-buildable push is accepted and ignored, a bad signature is 401, and a genuine branch push idempotently yields a preview.

Operation id: receive_git_event_v1_slate_git_events_post

Parameters

NameInTypeRequiredDescription
X-GitHub-Eventheaderstring or nullnoHeader parameter: X Git Hub Event.
X-GitHub-Deliveryheaderstring or nullnoHeader parameter: X Git Hub Delivery.
X-Hub-Signature-256headerstring or nullnoHeader parameter: X Hub Signature 256.

Responses

StatusDescriptionBody
200Successful response for receive git event.application/json EventReceiptResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/slate/git/previews​

List Git Previews

List the tenant's previews, newest first.

Operation id: list_git_previews_v1_slate_git_previews_get

Parameters

NameInTypeRequiredDescription
connectionIdquerystring or nullnoRestrict to one connection's previews.
limitqueryintegernoMaximum previews to return.
tenantSlugquerystring or nullnoTenant slug. Optional: the Slate routes read tenancy from the credential, so a browser call carrying a session JWT does not need to name a tenant in the 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 list git previews.application/json PreviewListResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/slate/git/previews/{build_id}​

Get Git Preview

Load one preview with its changed-page links, expiry/access and provider-status payload.

Operation id: get_git_preview_v1_slate_git_previews__build_id__get

Parameters

NameInTypeRequiredDescription
build_idpathstringyesPath parameter identifying the build id segment.
tenantSlugquerystring or nullnoTenant slug. Optional: the Slate routes read tenancy from the credential, so a browser call carrying a session JWT does not need to name a tenant in the 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 get git preview.application/json PreviewBody
422Validation Errorapplication/json HTTPValidationError

POST /v1/slate/git/previews/{build_id}/checks​

Record Preview Checks

Record a check outcome; a pass advances the branch alias to this preview.

Operation id: record_preview_checks_v1_slate_git_previews__build_id__checks_post

Parameters

NameInTypeRequiredDescription
build_idpathstringyesPath parameter identifying the build id segment.
tenantSlugquerystring or nullnoTenant slug. Optional: the Slate routes read tenancy from the credential, so a browser call carrying a session JWT does not need to name a tenant in the 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.

Request body (required)

Request body for record preview checks.

Responses

StatusDescriptionBody
200Successful response for record preview checks.application/json PreviewBody
422Validation Errorapplication/json HTTPValidationError

POST /v1/slate/git/previews/{build_id}/retry​

Retry Preview Build

Request a build retry (audited). No worker runs yet, so the honest boundary is unchanged.

Operation id: retry_preview_build_v1_slate_git_previews__build_id__retry_post

Parameters

NameInTypeRequiredDescription
build_idpathstringyesPath parameter identifying the build id segment.
tenantSlugquerystring or nullnoTenant slug. Optional: the Slate routes read tenancy from the credential, so a browser call carrying a session JWT does not need to name a tenant in the 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 retry preview build.application/json PreviewBody
422Validation Errorapplication/json HTTPValidationError

Schemas used​

CleanupResponse​

CleanupResponse schema.

PropertyTypeRequiredDescription
reapedintegeryesReaped.

ConnectionBody​

A git provider connection, without its secret or token.

PropertyTypeRequiredDescription
idstringyesStable resource identifier.
siteIdstringyesSite ID.
providerstringyesProvider.
repoOwnerstringyesRepo Owner.
repoNamestringyesRepo Name.
repoFullNamestringyesRepo Full Name.
defaultBranchstringyesDefault Branch.
previewHoststringyesPreview Host.
hasWebhookSecretbooleanyesHas Webhook Secret.
hasTokenbooleanyesHas Token.
createdAtstring or nullnoCreated At.
updatedAtstring or nullnoUpdated At.

ConnectionListResponse​

ConnectionListResponse schema.

PropertyTypeRequiredDescription
connectionsarray of ConnectionBodyyesConnections.

CreateConnectionRequest​

Register (or update) a git provider connection for a site.

PropertyTypeRequiredDescription
siteIdstringyesSite the connection builds previews for.
repoOwnerstringyesRepository owner (organisation or user).
repoNamestringyesRepository name.
provider"github"noGit provider.
defaultBranchstringnoThe repository's default branch.
previewHoststringyesBase host the immutable and alias preview URLs are derived from.
webhookSecretstring or nullnoWebhook signing secret. Write-only: sealed at rest and never returned.
tokenstring or nullnoRepository token. Write-only: envelope-sealed at rest and never returned.

EventReceiptResponse​

The outcome of a webhook delivery.

PropertyTypeRequiredDescription
acceptedbooleanyesAccepted.
ignoredbooleannoIgnored.
reasonstring or nullnoReason.
createdbooleannoCreated.
previewPreviewBody or nullnoPreview.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

PreviewBody​

One immutable preview and its provider-status payload.

PropertyTypeRequiredDescription
idstringyesStable resource identifier.
connectionIdstringyesConnection ID.
siteIdstringyesSite ID.
environmentIdstring or nullnoEnvironment ID.
sourceCommitstringyesSource Commit.
sourceRefstringyesSource Ref.
sourceMessagestringyesSource Message.
sourceDigeststringyesSource Digest.
statusstringyesStatus.
checksStatestringyesChecks State.
immutableUrlstringyesImmutable URL.
aliasUrlstring or nullnoAlias URL.
accessPolicystringyesAccess Policy.
robotsExcludedbooleanyesRobots Excluded.
buildDispatchedbooleanyesBuild Dispatched.
retryCountintegeryesNumber of retry.
expiresAtstring or nullnoExpires At.
createdAtstring or nullnoCreated At.
changedPagesarray of ChangedPageBodynoChanged Pages.
providerStatusobjectnoProvider Status.

PreviewListResponse​

PreviewListResponse schema.

PropertyTypeRequiredDescription
previewsarray of PreviewBodyyesPreviews.

RecordChecksRequest​

Record the outcome of the checks a preview must pass before its alias advances.

PropertyTypeRequiredDescription
passedbooleanyesWhether the checks passed.
failureEvidenceobject or nullnoEvidence surfaced in the provider status on failure.