Palbase Machines · API
/machines/{name}/previews/{pull_request}/openOpen a machine's pull request preview again
Opens a machine's preview of an open pull request again, at the pull request's head: one closed for want of a push (state idle: no push for 3 days, its machine and its own database taken away) or refused at its last push (state refused) is made anew, with a new, empty database of its own when the machine runs its database's migrations. One open goes on as it is, and its 3 days start again. A fork's preview under fork protection opens only at a head an admin authorized (409 preview_waits_authorization); one the environment's limits refuse again answers 409 preview_refused, with why. A machine read with a platform's tokens has an idle or refused preview opened again by its platform, with a token (PUT /machines/{name}/previews/{pull_request}): 409 preview_needs_token.
Called by your server, with the project's secret key.
Path
namestring · requiredThe machine's name: lowercase letters, digits and dashes, starting with a letter and not ending with a dash, 32 at most.pull_requestinteger · requiredThe pull request's number.curl -X POST "https://<your-ref>.palbase.studio/machines/<name>/previews/<pull_request>/open" \
-H "apikey: $PALBASE_SECRET_KEY"Responses
202Opened: the preview is being built, or goes on
400Validation failed or a required field is missing
401Missing or invalid API key
403Not the project's secret key
404The project has no machine of this name
409The project already has a machine of this name, or has as many machines as it may
429Over the project's request limit, or its machine time for this period is used up
503Temporarily unavailable; retrying is safe after Retry-After
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation OpenMachinePreview of machines's contract.