You can use the IBM Power for Google Cloud API to easily deploy and configure virtual servers that are running AIX or IBM i workloads. For a list of all of the available API methods, go to IBM Power for Google Cloud API. To target the IBM Power for Google Cloud API, use the following base URL, service-broker-api.gpcloudtest.com
.
This is the multi-page printable view of this section. Click here to print.
API Documentation
1 - API Authentication
To work with the API, you must log in and authenticate yourself. Take note of your Authorization: Bearer <token>
and Cloud ID
. The Authorization: Bearer <token>
is short lived. It will need to be refreshed. Enter the following commands to log in and obtain the necessary information:
pcloud auth login
pcloud auth print-access-token
pcloud compute clouds list
You can also enter the following URL into any browser to obtain your accessToken
: https://service-broker-api.gpcloudtest.com/auth/v1/login
. Select your Google account and copy the accessToken
.
2 - API Error Handling
This API uses standard HTTP response codes to indicate whether a method completed successfully. A 200
response indicates success. A 400
type response indicates a failure, and a 500
type response indicates an internal system error.
HTTP error code | Description | Recovery |
---|---|---|
200 | Success | The request was successful. |
400 | Bad Request | The input parameters in the request body are either incomplete or in the wrong format. Be sure to include all required parameters in your request. |
401 | Unauthorized | You are not authorized to make this request. Log in to IBM Cloud and try again. If this error persists, contact the account owner to check your permissions. |
403 | Forbidden | The supplied authentication is not authorized to access this resource. |
404 | Not Found | The requested resource could not be found. |
408 | Request Timeout | The connection to the server timed out. Wait a few minutes, then try again. |
409 | Conflict | The entity is already in the requested state. |
500 | Internal Server Error | Power Systems Virtual Server is currently unavailable. Your request could not be processed. Wait a few minutes and try again. |