Keystone Developers
Open Keystone
API reference

Internal API

Website preview runs

7 endpoints.

POST/api/v1/internal/website-preview/agent-callback

Post Website Preview Agent Callback

Store an edit slot's result (2 h) for the workflow's settle. Only an edit run's token posts here: a build reports through the generator callback, and a stored result is settled as a slot's. A check-only run ("Check again") settles nothing: its check is recorded here.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null
X-Keystone-Run-Tokenheaderstring | null

Request bodyrequired

application/jsonPreviewAgentCallbackRequest
FieldTypeDescription
plan_request_idrequiredstring
website_idrequiredstring | string (uuid)
string | string (uuid) fields
string
string (uuid)
statusrequiredstring
summarystringdefault ""
agent_messagestringdefault ""
file_updatesobject[]
object[] fields
primitivesobject[]
object[] fields
errorstringdefault ""
cost_usdnumber | null
duration_snumber | null
run_idstringdefault ""
smokeobject | null
confirmationobject | null
denied_commandsstring[]
string[] fields
stop_sourcestringdefault ""
modelstringdefault ""
usageobject | null
browser_checkobject | null
check_onlybooleandefault false
interruptobject | null
notes_deliveredstring[]
string[] fields
fetched_urlsobject[]
object[] fields
notes_pendingstring[]
string[] fields
checksobject | null
failure_kindstringdefault ""

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields
FieldTypeDescription
paginationPaginationMetadata | null
PaginationMetadata fields
FieldTypeDescription
limitrequiredinteger
next_cursorstring | null
prev_cursorstring | null
has_morerequiredboolean
has_prevbooleandefault false
total_countinteger | null
status_countsobject | null
object | null fields

Map of string to integer

lifecycle_countsLifecycleCounts | null
LifecycleCounts fields
FieldTypeDescription
leadintegerdefault 0
prospectintegerdefault 0
customerintegerdefault 0
former_customerintegerdefault 0
classification_countsClassificationCounts | null
ClassificationCounts fields
FieldTypeDescription
signalobject
object fields

Nested object (not expanded)

touchobject
object fields

Nested object (not expanded)

stageobject
object fields

Nested object (not expanded)

metaResponseMeta | null
ResponseMeta fields
FieldTypeDescription
totalinteger | null
total_countinteger | null
pageinteger | null
per_pageinteger | null
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/website-preview/agent-progress

Post Website Preview Agent Progress

Append a sanitized event to the run's activity trail. A full build's ring is deeper than an edit's: it runs for most of an hour.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null
X-Keystone-Run-Tokenheaderstring | null

Request bodyrequired

application/jsonWebsiteModAgentProgressRequest
FieldTypeDescription
plan_request_idrequiredstring
website_idrequiredstring | string (uuid)
string | string (uuid) fields
string
string (uuid)
seqrequiredinteger
tsinteger | null
kindrequiredstring
stagestring | null
textstring | null
toolstring | null
labelstring | null
blockstring | null
statusstring | null
partialbooleandefault false
artifactstring | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/website-preview/check-artifacts

Post Website Preview Check Artifact

One browser-check screenshot from a preview edit's pod, under that run's token. The image is the raw request body.

Parameters

NameInTypeDescription
plan_request_idrequiredquerystring
routerequiredquerystring
viewportrequiredquerystring
kindquerystringdefault "fold"
x-internal-api-keyheaderstring | null
X-Keystone-Run-Tokenheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-preview/runs/fail

Post Preview Run Fail

``{state}`` — ``failed``, or the state a settled run already had.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonPreviewRunFailBody
FieldTypeDescription
preview_idrequiredstring (uuid)
revisionintegerdefault 0 · min 0
kindrequiredenumone of "preview", "edit", "full"
run_idstringdefault ""
reasonstringdefault ""

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-preview/runs/settle

Post Preview Run Settle

``{state, checkpoint_sha, reason, fallback_eligible}``; idempotent.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonPreviewRunRefBody
FieldTypeDescription
preview_idrequiredstring (uuid)
revisionintegerdefault 0 · min 0
kindrequiredenumone of "preview", "edit", "full"
run_idstringdefault ""

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-preview/runs/start

Post Preview Run Start

``{executor, run_id, deadline_s, state}``; idempotent per attempt.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonPreviewRunStartBody
FieldTypeDescription
preview_idrequiredstring (uuid)
revisionintegerdefault 0 · min 0
kindrequiredenumone of "preview", "edit", "full"
workflow_run_idstringdefault ""
attemptintegerdefault 1 · min 1
force_executorenum | null

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

POST/api/v1/internal/workflow-engine/website-preview/runs/status

Post Preview Run Status

``{state, executor, reason, fallback_eligible, deadline_s}``. Read-only but for one case: a later attempt whose launch was lost is failed here (no one else will), hence the commit.

Parameters

NameInTypeDescription
x-internal-api-keyheaderstring | null

Request bodyrequired

application/jsonPreviewRunRefBody

PreviewRunRefBody, expanded above.

Responses

200Successful Response
application/jsonSuccessResponse_dict_str__Any__
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredobject
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.