TeamCity 2021.1 Help

Manage Cloud Profiles

This article lists REST API requests concerning cloud profiles.

Get Cloud Profiles

To get a list of all available cloud profiles, use:

GET http://<TeamCity Server host>:<port>/app/rest/cloud/profiles

To get a specific profile, use:

GET http://<TeamCity Server host>:<port>/app/rest/cloud/profiles/<cloudProfileLocator>

where cloudProfileLocator is typed as CloudProfileLocator.

For example, to get profiles belonging to the MyProject project, use:

GET http://<TeamCity Server host>:<port>/app/rest/cloud/profiles/project:MyProject

Get Cloud Images

To get cloud images, use:

GET http://<TeamCity Server host>:<port>/app/rest/cloud/images

This call, similarly to the above, supports the locator parameter:

GET http://<TeamCity Server host>:<port>/app/rest/cloud/images/<cloudImageLocator>

Here, cloudImageLocator is typed as CloudImageLocator.

Get Cloud Instances

To get cloud instances, use:

GET http://<TeamCity Server host>:<port>/app/rest/cloud/instances

This call, similarly to the above, supports the locator parameter:

GET http://<TeamCity Server host>:<port>/app/rest/cloud/instances/<cloudInstanceLocator>

where cloudInstanceLocator is typed as CloudInstanceLocator.

Start and Stop Cloud Instances

To start a new cloud instance, use:

POST http://<TeamCity Server host>:<port>/app/rest/cloud/instances

The request accepts the following payload:

<cloudInstance id="profileId:<profileId>,imageId:<imageId>,id:<instanceId>" name="<instanceName>"> <image id="profileId:<profileId>,id:<imageId>" name="<imageName>"/> </cloudInstance>
{ "id" : "profileId:<profileId>,imageId:<imageId>,id:<instanceId>", "name" : "<instanceName>", "image": { "id": "profileId:<profileId>,id:<imageId>", "name": "<imageName>" } }

To stop a running cloud instance, use:

DELETE http://<TeamCity Server host>:<port>/app/rest/cloud/instances/<cloudInstanceLocator>
Last modified: 14 October 2021