Console API
Website modifications
6 endpoints.
/api/v1/admin/businesses/{business_id}/website-modRead the business's draft website change, its preview and gates
The Website page's whole read, in one call (:func:`commands.state`).
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Responses
200Successful Responseapplication/jsonSuccessResponse_WebsiteModStateResponse_| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
success | true | default true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
datarequired | WebsiteModStateResponse | WebsiteModStateResponse fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fields
|
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/website-mod/revisionWhere the business's website change stands, to tell when to read it again
A token that moves whenever the change does (``website_mod_events``): one database read for the website and one Redis read, no GitHub and no session pool, unlike the whole read.
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Responses
200Successful Responseapplication/jsonSuccessResponse_WebsiteModRevision_| Field | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||
success | true | default true | ||||||
datarequired | WebsiteModRevision | WebsiteModRevision fields
| ||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | ||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/website-mod/sessionRead the website's live-preview session
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Responses
200Successful Responseapplication/jsonSuccessResponse_WebsiteModSessionResponse_| Field | Type | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||||||||||||||||||||||||||
success | true | default true | ||||||||||||||||||||||||||||||
datarequired | WebsiteModSessionResponse | WebsiteModSessionResponse fields
| ||||||||||||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | ||||||||||||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/website-mod/session/heartbeatKeep the website's live-preview session leased while the page is open
The console calls this every minute or so while the Website page is open. A slot whose lease nobody extends lapses (the pool's LEASE_TTL) and the pod goes back to the warm floor — so tabs are viewers, and closing the last one is what frees the slot, never a client-side beforeunload. A website holding no lease gets the plain "enabled, nothing serving" response (pre-warm is what claims).
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Responses
200Successful Responseapplication/jsonSuccessResponse_WebsiteModSessionResponse_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | WebsiteModSessionResponse | WebsiteModSessionResponse fieldsWebsiteModSessionResponse, expanded above. |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/website-mod/session/prewarmPre-warm the website's live-preview session
Called by the console when the Website page opens, so the pod has cloned, installed and booted ``next dev`` before the chat's first edit. Idempotent: a pod already serving this site at the right commit is left alone, and one whose tree holds work sor has not committed (a turn of the chat at work) is never re-claimed.
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Responses
200Successful Responseapplication/jsonSuccessResponse_WebsiteModSessionResponse_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | WebsiteModSessionResponse | WebsiteModSessionResponse fieldsWebsiteModSessionResponse, expanded above. |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/website-mod/sketchRead the first sketch of a new site's home page
The sketch the chat wrote of a new site's home page (``website_sketch``); null when none.
Authentication
Authorization: Bearer <token>.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) |
Responses
200Successful Responseapplication/jsonSuccessResponse_Union_WebsiteSketch__NoneType__| Field | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||
success | true | default true | |||||||||
datarequired | WebsiteSketch | null | WebsiteSketch fields
| |||||||||
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. | |||||||||
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.