Skip to content

Deploy a version, or put it in production

OpenAPI JSON
PATCH
/v1/apps/{app}/versions/{version}
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 a 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 (one declaring no action is tried by the pages its deployment asks), whose GET /healthz did not answer 200, or one of whose pages answered an error.

app
required
string format: uuid
version
required
string format: uuid
Media typeapplication/json
object
>= 1 properties
deployed
boolean
production
boolean

The version as it now stands.

Media typeapplication/json

Where one version stands. publish.next is the one sentence to act on.

object
version_id
required
string format: uuid
app_id
required
string format: uuid
base_version_id
string | null format: uuid
state
required

ready once written, deployed, pending_review, rejected, among others.

string
validation
required
object
status
string
Allowed values: valid invalid
errors
integer
diagnostics
Array<object>
object
code
required
string
file
required
string | null
pointer
required

A JSON pointer into the file.

string | null
message
required

The fix.

string
level

Present on a warning, which blocks nothing.

string
Allowed values: warning
version

The info.version of its manifest.

string | null
missing_variables

Reading one version only: the variables its manifest requires that hold no value yet, read now. Deploying it answers 409 until each has one; empty for an invalid version, null when the values could not be read this time.

Array<string> | null
production
boolean
deployed
boolean
address

Where its pages answer, from the slug of its manifest.

object
production
string format: uri
staging
string format: uri
health
object
state
string | null
checked_at
string | null format: date-time
error
string | null
tried_at

When one of its actions first answered below 500 on its own deployment, which publication requires of a version with code that declares an action, one declaring none being tried by the pages its deployment asks; always null for a version without entrypoint, published without a trial.

string | null format: date-time
publish
required
object
publishable
required
boolean
production
required
boolean
review_required
boolean
blockers
required
Array<object>
object
code
required
string
message
required
string
next
required
string
created_at
string format: date-time
published_at
string | null format: date-time
Example
{
"validation": {
"status": "valid",
"diagnostics": [
{
"level": "warning"
}
]
}
}

Not a version of an application of your team.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
Example
{
"error": "not found"
}

What blocks it, and what to do; a version written for manifest v1 is refused here too.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
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.

Media typeapplication/json
object
error
required
string
consentPending

Present and true when the approval window is open and the user has not answered within 45 s.

boolean
permission

On consent requested and no grant from emails.send or ai.generate: the permission the user never decided, or refused. Absent for a site.

string
Allowed values: emails ai
settings_url

On no grant: the page of the user’s Apigami space where they allow it again; send them there.

string format: uri
terms

On consent requested, in place of permission: the bare app_id of each application whose terms or subprocessors the user has yet to agree to, unlike the boxes of GET /apps/{app_id}. Only the connect page asks it: send them to connect_url, or to one of your pages.

Array<string>
connect_url

With terms, when the user agrees under your application: your install link, where they tick the boxes still to tick.

string format: uri
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()"
}