Public API¶
Anchor provides a basic API to allow you to programmatically determine if your new server you just built shares a host with another cloud server on your account. Thus increasing visibility into shared resources in your environment, and showing the impact if a host goes down.
API Headers¶
All calls will utilize the same header information as shown below, where CLOUD-AUTH-TOKEN is the token that is given to you after authenticating through Rackspace Identity/
{
"X-Auth-Token": "CLOUD-AUTH-TOKEN",
"Content-Type": "application/json"
}
Initialize¶
- POST /account/{account_id}/{region}¶
Path arguments: - account_id – Rackspace cloud account number or DDI
- region – Rackspace region - DFW, ORD, IAD, LON, HKG, SYD
- Initialize retrieval of current servers with all details on the account for the specified region¶
{ "task_id": "e3449d1399e946738eb91a339ffa1297" }
Data: task_id (integer) – Task identifier for server retrieval
Check initialization status¶
- GET /task/{task_id}¶
Path arguments: task_id – Task ID given in the response of the initialization POST
- Check status of initialization¶
{ "task_status": "SUCCESS" }
Data: task_status (string) – Rackspace cloud account number or DDI
Get all server info¶
- GET /account/{account_id}/{region}¶
Path arguments: - account_id – Rackspace cloud account number or DDI
- region – Rackspace region - DFW, ORD, IAD, LON, HKG, SYD
- Get all of the servers for the account in the specified region¶
{ 'data': { 'servers': [ { 'created': '2015-01-01T19:52:34Z', 'flavor': 'performance1-2', 'host_id': 'a0b2a91a8dd332d3b461e30d598057135d1e34ea073b81bf63438e21', 'id': '00000000-aaaa-1111-bbbb-22222222222', 'name': 'server_name', 'private': [ '10.10.10.10' ], 'public': [ '4444:3333:2222:111:dd44:cc33:bb11:aaaa', '100.100.1.3' ], 'state': 'active' } ] } }
Data: - created (string) – Date server created in UTC
- flavor (string) – Flavor ID for the server
- host_id (string) – Host UUID tha the server resides on
- id (string) – UUID of the server
- name (string) – Server name
- private (string) – List of all private interfaces on the server
- public (string) – List of all public interfaces on the server
- state (string) – State of the server
Delete account server cache¶
- DELETE /account/{account_id}/{region}¶
Path arguments: - account_id – Rackspace cloud account number or DDI
- region – Rackspace region - DFW, ORD, IAD, LON, HKG, SYD
- Remove cache entry for the account in the specified region¶
Check status and cache a newly built server¶
- PUT /account/{account_id}/{region}/server/{server_id}¶
Path arguments: - account_id – Rackspace cloud account number or DDI
- region – Rackspace region - DFW, ORD, IAD, LON, HKG, SYD
- server_id – Server ID of the server you want to check
- Status of whether the server is sharing a host with another server on the account¶
{ "duplicate": false }
Data: duplicate (boolean) – Is the server sharing the host with another resource on the account
Check status of an existing server¶
- GET /account/{account_id}/{region}/server/{server_id}¶
Path arguments: - account_id – Rackspace cloud account number or DDI
- region – Rackspace region - DFW, ORD, IAD, LON, HKG, SYD
- server_id – Server ID of the server you want to check
- Status of whether the server is sharing a host with another server on the account
{ "duplicate": false, "host_data": { "server": { "id": "aaaa11111-00000-2222-3333-73ecc5266dcb", "name": "server-name" } } }
Data: - duplicate (boolean) – Is the server sharing the host with another resource on the account
- host_data (list) – All servers on that share a host with the specified server
- id (string) – UUID of server
- name (string) – Server name