Trigger a deployment
View as MarkdownBuilds the latest imported source and deploys it to the publish environment.
Full description
Builds the latest imported source and deploys it to the publish environment. Returns
202 Accepted. PollGET /apps/{appId}/deployments/{deploymentId}untilstatusisCOMPLETEDorFAILED. This endpoint is only applicable to Node.js applications (appType: NODEJS): a deployment builds the imported source and publishes it through the Node.js application agent, which other hosting products do not have. Other product types return501. For a Node.js application not built in Airo, when the account's live-site limit is reached, the request answers422withdetails[].issuePUBLISH_LIMIT_EXCEEDED, the same codePUT /apps/{appId}/publish-stateuses forMHWP. Other422issue codes may apply. For a Node.js application built in Airo, going live is governed by the application's Airo App Builder plan. When that plan does not allow the application to go live, for example a free plan or a plan whose live-site limit is reached, the request answers422withdetails[].issuePLAN_UPGRADE_REQUIRED. The fix is to upgrade the plan: the error carries alinksentry withrel: upgrade(links[rel=upgrade]) whosehrefis the Airo App Builder plan page for the application. Treathrefas opaque; do not build or parse it. When a Node.js application built in Airo is suspended, the request answers422withdetails[].issueAPP_SUSPENDEDand nothing is published. Publishing a Node.js application built in Airo through the API is being rolled out. Until it is offered for the caller, the request answers501withdetails[].issueNOT_APPLICABLEand nothing is published. When the application's plan cannot be checked, the request answers503withdetails[].issueUPSTREAM_UNAVAILABLEand aRetry-Afterheader, and nothing is published. Retry after that delay.
Authorization
bearerAuth Personal Access Token (PAT). Generate one from the developer dashboard. Pass as: Authorization: Bearer <token>.
In: header
Path Parameters
Application identifier in {PRODUCT}-{id} form. The prefix is the application type in upper case — an upper-case letter followed by any number of upper-case letters, digits, or underscores — then a hyphen, then the identifier. For NODEJS, the suffix is a 10-character nanoid. Example: NODEJS-aBcDeFgHiJ. For MHWP, the suffix is a 10-character nanoid of lower-case letters and digits only. Example: MHWP-a1b2c3d4e5.
^[A-Z][A-Z0-9_]*-[A-Za-z0-9_-]+$Header Parameters
Client-generated UUID that makes a request safe to retry. Supplying the same key on a retry with an identical request body returns the original response without triggering a second operation. Retrying with the same key while the first request is still in flight returns 409 Conflict with details[].issue IDEMPOTENCY_IN_PROGRESS. Reusing a key with a different request body returns 422 Unprocessable Entity with details[].issue IDEMPOTENCY_KEY_MISMATCH. Keys are retained for 24 hours after the operation completes, after which the key may be reused.
uuidW3C Trace Context identifier for this request. Clients should send a traceparent on every request so the trace can be correlated across services. See https://www.w3.org/TR/trace-context/ for the format.
^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/apps/string/deployments"{ "deploymentId": "string", "status": "PENDING", "gitHash": "string", "createdAt": "stringstringstringst", "updatedAt": "stringstringstringst", "error": { "name": "string", "correlationId": "string", "message": "string", "informationLink": "string", "details": [ { "field": "string", "value": "string", "location": "body", "issue": "string", "description": "string" } ], "links": [ { "href": "http://example.com", "rel": "string", "title": "string", "targetMediaType": "string", "targetSchema": null, "method": "string", "submissionMediaType": "application/json", "submissionSchema": null } ] }, "logs": [ "string" ], "links": [ { "href": "http://example.com", "rel": "string", "title": "string", "targetMediaType": "string", "targetSchema": null, "method": "string", "submissionMediaType": "application/json", "submissionSchema": null } ]}Last updated on
How is this guide?