Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Roll a service back to an existing deployment

POST/v1/services/{serviceId}/rollbackRoll a service back to an existing deployment

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Makes any eligible existing deployment live behind the service's stable endpoint (rollback or roll-forward). Unlike promote, a stopped target is started and waited until it is running before the endpoint is switched, so the currently-live deployment keeps serving with zero downtime. Returns the service endpoint domain.

Parameters

serviceIdstringpathrequired

pattern ^(cps_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Request body

application/json
object
deploymentIdstring

pattern ^(cpv_)?([cC][^\s-]{8,}|[a-z0-9]+)$

versionIdstring

Deprecated: use `deploymentId` instead. Ignored when `deploymentId` is also present.

pattern ^(cpv_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Example request
{
  "deploymentId": "string",
  "versionId": "string"
}

Responses

200Deployment made live behind the service endpoint. The `reassignedDomains` field indicates how many custom domains were moved from the previously-live deployment to the new one.application/json
object
dataobjectrequired
Show child attributes
appEndpointDomainstringrequired
reassignedDomainsnumberrequired
Example response
{
  "data": {
    "appEndpointDomain": "string",
    "reassignedDomains": 0
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
403Insufficient permissions to access this resource.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Service or deployment not found, or the deployment's Foundry artifact no longer exists.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
409The deployment cannot be made live (e.g. it has no runnable artifact or is mid-teardown and cannot reach a running state).application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
413Request body exceeds this endpoint's size cap.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
422Validation failed (e.g. malformed service ID or missing deployment ID).application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
429Rate limit or Compute resource limit exceeded.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu