Identify VM Tasks through the API

Identify VM Tasks through the API

Effective on November 29, 2023·Alexandre Duval
Alexandre Duval
David Legrand
David Legrand

For years, you can deploy applications on Clever Cloud as a Task with the API or more recently the CC_TASK=true environment variable. As this feature will be widely available and used, the API has been updated to return such a state in the instance.lifetime object:

GET https://api.clever-cloud.com/v2/self/applications/<appId>
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{
  "id": "string",
  "name": "string",
  "description": "string",
  "zone": "string",
  "zoneId": "string",
  "instance": {
    "type": "string",
    "version": "string",
    "variant": {},
    "minInstances": int,
    "maxInstances": int,
    "maxAllowedInstances": int,
    "minFlavor": {},
    "maxFlavor": {},
    "flavors": [],
    "lifetime": "string",  //Allowed: REGULAR ┃ MIGRATION ┃ TASK
    "instanceAndVersion": "string"
  },
  ...
}

You can read the full APIv2 documentation here.

Last updated on