cancelStorefrontPageGeneration
Requires permission storefront:storefront:update.
Stop a page-generation job. Aborts the model call when this API instance runs the job and returns it CANCELLED; on another instance the job stops at its next model turn, so keep polling. A job that already ended is returned unchanged. Credits already charged stay charged (creditsUsedCents).
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation CancelStorefrontPageGeneration($jobId: ID!) {
cancelStorefrontPageGeneration(jobId: $jobId) {
status
costDisplay
creditsUsedCents
error
jobId
page
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CancelStorefrontPageGeneration($jobId: ID!) {\n cancelStorefrontPageGeneration(jobId: $jobId) {\n status\n costDisplay\n creditsUsedCents\n error\n jobId\n page\n }\n}",
"variables": {
"jobId": "id"
}
}
EOF
Variables:
{
"jobId": "id"
}
Response:
{
"data": {
"cancelStorefrontPageGeneration": {
"status": "CANCELLED",
"costDisplay": "string",
"creditsUsedCents": 0,
"error": "string",
"jobId": "id",
"page": {}
}
}
}
cancelStorefrontPageGeneration(
jobId: ID!
): StorefrontPageJob!
Arguments
cancelStorefrontPageGeneration.jobId ● ID! non-null scalar
The ID of the page generation job.
Type
StorefrontPageJob object
A started storefront page generation.