Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Promote deployment

POST/v1/services/{serviceId}/promotePromote deployment

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

Promotes a deployment to be the active deployment behind the service's stable endpoint. The deployment must be running. 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 promoted to service endpoint. The `reassignedDomains` field indicates how many custom domains were moved from the previously-promoted 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.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
409The deployment is not running.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