This documentation relates to QuickBuild 9.0.x
Select here if you are using a different version

Interact with Cloud Profiles

Get all cloud profiles in the system

Syntax

Cloud profiles in the system can be accessed using http GET method through below url:

http://localhost:8810/rest/cloud_profiles

The response is of mime type application/xml and the content is XML representation of all cloud profiles in the system.

Security

You will need to use http BASIC authentication to login as QuickBuild administrator if the anonymous does not have adminstrative right.

Demo

Below curl command demonstrates how to get all cloud profiles:

curl -u admin:admin http://localhost:8810/rest/cloud_profiles

Access cloud profile by id

Syntax

Cloud profile can be accessed by id using http GET method through below url:

http://localhost:8810/rest/cloud_profiles/<cloud profile id>

The response is of mime type application/xml and the content is XML representation of the cloud profile.

Security

You will need to use http BASIC authentication to login as QuickBuild administrator if the anonymous does not have adminstrative right.

Demo

Below curl command demonstrates how to get cloud profile of id 1:

curl -u admin:admin http://localhost:8810/rest/cloud_profiles/1

Update cloud profile

Syntax

Cloud profile can be updated by posting xml representation of the cloud profile to below url:

http://localhost:8810/rest/cloud_profiles

Normally you do not need to create the XML from scratch: you may retrieve XML representation of the cloud profile using http GET method, modify certain parts of the XML and post back to above url.
The response is of mime type text/plain and the content is string representation of the cloud profile id being updated.

Security

You will need to use http BASIC authentication to login as QuickBuild administrator if the anonymous does not have administrative right.

Demo

We will use curl to demonstrate how to modify description of cloud profile profile1:

  1. Get id of cloud profile profile1 with id service
    curl http://localhost/rest/ids?cloud_profile_name=profile1

    Assume returned id is 1.

  2. Retrieve xml representation of cloud profile profile1 into a temp file using below command:
    curl -u admin:admin http://localhost:8810/rest/cloud_profiles/1 > tempfile.xml
  3. Edit tempfile.xml and change description element to desired value (or add the description element if it does not already exist).
  4. Post back modified content using below command:
    curl -X POST -u admin:admin -d@tempfile.xml http://localhost:8810/rest/cloud_profiles

Create cloud profile

Syntax

Cloud profile can be created by posting XML representation of the cloud profile to below url:

http://localhost:8810/rest/cloud_profiles

Please note that the posted XML should NOT contain the id element; otherwise, QuickBuild will treat the post as an updating to the cloud profile with that id.
Normally you do not need to create the XML from scratch: you may retrieve XML representation of a templating cloud profile using http GET method, remove the id element, modify certain parts and post back to above url.
The response is of mime type text/plain and the content is string representation of the newly created cloud profile id.

Security

You will need to use http BASIC authentication to login as QuickBuild administrator if the anonymous does not have administrative right.

Demo

We will use curl to demonstrate how to create a new cloud profile profile2 by copying the existing cloud profile profile1.

  1. Get id of cloud profile profile1 with id service
    curl http://localhost/rest/ids?cloud_profile_name=profile1

    Assume returned id is 1.

  2. Retrieve xml representation of cloud profile profile1 into a temp file using below command:
    curl -u admin:admin http://localhost:8810/rest/cloud_profiles/1 > tempfile.xml
  3. Edit tempfile.xml, remove the id element, and change the name element to be profile2
  4. Post back modified content using below command:
    curl -X POST -u admin:admin -d@tempfile.xml http://localhost:8810/rest/cloud_profiles

Delete cloud profile

Syntax

Cloud profile can be deleted using http DELETE method through below url:

http://localhost:8810/rest/cloud_profiles/<cloud profile id>

Here <cloud profile id> stands for id of the cloud profile to be deleted.

Security

You will need to use http BASIC authentication to login as QuickBuild administrator if the anonymous does not have administrative right.

Demo

Below curl command demonstrates how to delete the cloud profile with id 2:

curl -X DELETE -u admin:admin http://localhost:8810/rest/cloud_profiles/2

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.