Deploy a version, or put it in production
OpenAPI JSONconst url = 'https://api.eu.apigami.com/v1/apps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/versions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"deployed":true,"production":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.eu.apigami.com/v1/apps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/versions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "deployed": true, "production": true }'deployed: true deploys it and checks GET /healthz and its pages. production: true publishes it, and the same call on an earlier version is the rollback; for an unlisted or public application it asks for a review instead. Both may be sent together, applied in that order. Publication is refused, with what to do, for a version none of whose actions answered below 500 on its own deployment, whose GET /healthz did not answer 200, or one of whose pages answered an error.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”The version as it now stands.
Where one version stands. publish.next is the one sentence to act on.
object
ready once written, deployed, pending_review, rejected, among others.
object
object
A JSON pointer into the file.
The fix.
Present on a warning, which blocks nothing.
The info.version of its manifest.
Where its pages answer, from the slug of its manifest.
object
object
When one of its actions first answered below 500 on its own deployment, which publication requires.
object
object
Example
{ "validation": { "status": "valid", "diagnostics": [ { "level": "warning" } ] }}Not a version of an application of your team.
object
Present and true when the approval window is open and the user has not answered within 45 s.
Example
{ "error": "not found"}What blocks it, and what to do; a version written for manifest v1 is refused here too.
object
Present and true when the approval window is open and the user has not answered within 45 s.
Example
{ "error": "none of this version's actions has answered below 500 on its own deployed revision. Call one of its actions naming this version until one does, then publish."}The version was not deployed: its code did not build, its migrations failed, or it failed to start. The error names the cause, then what it printed last.
object
Present and true when the approval window is open and the user has not answered within 45 s.
Example
{ "error": "your code does input or output while it loads, at the top level of one of its files (a fetch, a query, a timer): move it inside fetch()"}