Send an app's traffic to one of its versions that is ready
Where a node has the version's template, the traffic goes to the version from the moment the call is answered, and nothing is built: the nodes that have the template are told of the version before the traffic moves, and the version the traffic leaves is taken off them after. An earlier version or a later one. A deploy that was going on ends: its version takes no traffic when it is ready.
Where no node has the version's template (it was taken off the nodes when the app had newer versions to go back to: the version's collected_at), the version is built again first, as a deploy builds one: with the image it was resolved to when it was first deployed, and the project's secrets as they are now. The call is answered 202 at once; the version is building, the app is deploying it (deploying), and the traffic stays where it is until every node has the template, and for good if the version cannot be built again: it is then failed with why (app.deploy_failed), and a rollback to it may be asked for again. GET /v1/apps/{app}/versions/{version}?wait_seconds= waits for it as for a deploy, and app.deployed says when the traffic has moved. Takes write.
https://api.glac.ai/v1/apps/{app}/rollbackAutorizzazione
Parametri di percorso
Parametri di intestazione
Corpo della richiestaJSONobbligatorio
Returns
200
The app, with current_version the version named and deploying null.
- managed_byobject | nullrequired
What changes it alone, where something does.
objectdatabase: the database it is under (id,/v1/databases); every other call that would change it is refused, 409managed_by_database.objectsandboxes(idnull): the Sandboxes product's, made by the creates of the project's sandboxes (POST /v1/sandboxes): the project's default sandbox app,sbx-sandbox(itsimagenull: each sandbox is made from the base template of the node it goes to, until the project names an image for it,PATCHwithimagealone, a new version made of that image, of which the creates that name no image are made from then on), or the app of an image a create named (image, as the create named it;sbx-<the image's name>-<12 hex digits>, one version). A version is ready from when it is made, and the app's instances are the project's sandboxes; every call of it but reading it and its versions, naming the default sandbox app's image and deleting it (its versions' templates go with it; the next create of its image, or of none, makes it again) is refused, 409managed_by_sandboxes. Null: none's.objectinstallation: the installation of a Managed Application it is part of (id,/v1/installations), which changes it alone: every other call that would change it is refused, 409managed_by_installation. - privateobjectrequired
Where the project's sandboxes on its network find the app: its address there, which it keeps for as long as it is there, renamed or not; and its name under
internal. A sandbox of the project on the network finds it by its name, bydomain, and by each of itsnetwork.aliaseswith and without.internal. - egressobject | nullrequired
Egress rules as a sandbox has them (
default,allow,deny,http,inject), null when there are none; kept as the calls gave them (aPATCHmerges them key by key, as a node does). They hold at once and make no version: the nodes that serve the app put them on every instance of its group, the ones there are (one that runs for the connections it has too) and the ones made after; a keyed instance does not have them. The control plane checks only that they are an object of those keys of at most 256 KiB: what the rules say is a node's to check, when it applies them, and an instance whose rules its node cannot read is refused everything (the node's log says why). - urlstring | nullrequired
Where the app answers:
https://and its default domain,<name>-<the project's short name>.<the zone>. It is the app's from the moment it is made (503app_not_deployeduntil its first version is ready) and for as long as the app has its name.nullon a control plane that is told no zone for apps (--app-zone). - checkpointrequired
Checkpoints of its keyed instances while they run: every
every_seconds(10 unless said, 1 to 600) an instance's memory and disk as they are at one instant go to its node's object store, and when its node's host is lost the instance is taken over on another node from its newest checkpoint with its processes, losing at most what it did since (an instance that sleeps is taken over from its sleep, which loses nothing). Its node pauses it for a few milliseconds for each; what it wrote since the last one is what is sent, compressed, and one that writes more than its node's link for checkpoints takes falls behind instead of filling it (the instance'scheckpoint:last_at,behind_seconds,bytes_per_second,stored_bytes). What the store keeps of an instance's newest checkpoint is billed as sleeping state (state) while it runs; nothing for what is sent. Holds at once and makes no version: the instances that are there are given it, those made later are made with it. Not a stateful service's instance: its volume has no copy in the store. An instance's Drives (its ownkey_drivestoo) are pinned with its disk at the same instant, and a takeover brings them back as they were then; an instance with a volume that is not a Drive takes none, and itscheckpoint.errorsays so. Null: none (the default). - build_failuresarray diobjectrequired
The nodes that are to serve the version the app's traffic goes to and could not build it when they were asked to after its deploy (a node that joined, one whose template of it is of no use any more, one that came back), one an item, by the node's id; empty where there are none. A node whose build failed is asked again ten minutes after its last try, and is no longer here once it has built the version; the other nodes serve the version meanwhile. Each failure is also an event,
app.build_failed, once.
202
The version is being built again first, no node having its template: the app, with deploying the version named and current_version what it was.
- managed_byobject | nullrequired
What changes it alone, where something does.
objectdatabase: the database it is under (id,/v1/databases); every other call that would change it is refused, 409managed_by_database.objectsandboxes(idnull): the Sandboxes product's, made by the creates of the project's sandboxes (POST /v1/sandboxes): the project's default sandbox app,sbx-sandbox(itsimagenull: each sandbox is made from the base template of the node it goes to, until the project names an image for it,PATCHwithimagealone, a new version made of that image, of which the creates that name no image are made from then on), or the app of an image a create named (image, as the create named it;sbx-<the image's name>-<12 hex digits>, one version). A version is ready from when it is made, and the app's instances are the project's sandboxes; every call of it but reading it and its versions, naming the default sandbox app's image and deleting it (its versions' templates go with it; the next create of its image, or of none, makes it again) is refused, 409managed_by_sandboxes. Null: none's.objectinstallation: the installation of a Managed Application it is part of (id,/v1/installations), which changes it alone: every other call that would change it is refused, 409managed_by_installation. - privateobjectrequired
Where the project's sandboxes on its network find the app: its address there, which it keeps for as long as it is there, renamed or not; and its name under
internal. A sandbox of the project on the network finds it by its name, bydomain, and by each of itsnetwork.aliaseswith and without.internal. - egressobject | nullrequired
Egress rules as a sandbox has them (
default,allow,deny,http,inject), null when there are none; kept as the calls gave them (aPATCHmerges them key by key, as a node does). They hold at once and make no version: the nodes that serve the app put them on every instance of its group, the ones there are (one that runs for the connections it has too) and the ones made after; a keyed instance does not have them. The control plane checks only that they are an object of those keys of at most 256 KiB: what the rules say is a node's to check, when it applies them, and an instance whose rules its node cannot read is refused everything (the node's log says why). - urlstring | nullrequired
Where the app answers:
https://and its default domain,<name>-<the project's short name>.<the zone>. It is the app's from the moment it is made (503app_not_deployeduntil its first version is ready) and for as long as the app has its name.nullon a control plane that is told no zone for apps (--app-zone). - checkpointrequired
Checkpoints of its keyed instances while they run: every
every_seconds(10 unless said, 1 to 600) an instance's memory and disk as they are at one instant go to its node's object store, and when its node's host is lost the instance is taken over on another node from its newest checkpoint with its processes, losing at most what it did since (an instance that sleeps is taken over from its sleep, which loses nothing). Its node pauses it for a few milliseconds for each; what it wrote since the last one is what is sent, compressed, and one that writes more than its node's link for checkpoints takes falls behind instead of filling it (the instance'scheckpoint:last_at,behind_seconds,bytes_per_second,stored_bytes). What the store keeps of an instance's newest checkpoint is billed as sleeping state (state) while it runs; nothing for what is sent. Holds at once and makes no version: the instances that are there are given it, those made later are made with it. Not a stateful service's instance: its volume has no copy in the store. An instance's Drives (its ownkey_drivestoo) are pinned with its disk at the same instant, and a takeover brings them back as they were then; an instance with a volume that is not a Drive takes none, and itscheckpoint.errorsays so. Null: none (the default). - build_failuresarray diobjectrequired
The nodes that are to serve the version the app's traffic goes to and could not build it when they were asked to after its deploy (a node that joined, one whose template of it is of no use any more, one that came back), one an item, by the node's id; empty where there are none. A node whose build failed is asked again ten minutes after its last try, and is no longer here once it has built the version; the other nodes serve the version meanwhile. Each failure is also an event,
app.build_failed, once.