Table of Contents

    Transparent Proxy

    Please sign in and we'll assign you a private URL to trace your traffic and help you implement the API.

Rackspace Autoscale

Authentication and Endpoints

Every REST request for Auto Scale requires the inclusion of the X-Auth-Token HTTP header. The regions you have access to are available in your service catalog. Obtain this token and your service catalog via the Authentication service.

Groups

Autoscale REST endpoints having to do with a group or collection of groups (/tenantId/groups and /tenantId/groups/groupId)

Groups

List Groups

GET

/{tenantId}/groups

Lists all the autoscaling groups per for a given tenant ID.

Response

200 (OK)
Content-Type: application/json
{
    "groups": [
        {
            "id": "e41380ae-173c-4b40-848a-25c16d7fa83d",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/e41380ae-173c-4b40-848a-25c16d7fa83d/",
                    "rel": "self"
                }
            ],
            "state": {
                "active": [],
                "activeCapacity": 0,
                "desiredCapacity": 0,
                "paused": false,
                "pendingCapacity": 0,
                "name": "testscalinggroup198547"
            }
        },
        {
            "id": "f82bb000-f451-40c8-9dc3-6919097d2f7e",
            "state": {
                "active": [],
                "activeCapacity": 0,
                "desiredCapacity": 0,
                "paused": false,
                "pendingCapacity": 0,
                "name": "testscalinggroup198547"
            },
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/f82bb000-f451-40c8-9dc3-6919097d2f7e/",
                    "rel": "self"
                }
            ]
        }
    ],
    "groups_links": []
}

Create Group

POST

/{tenantId}/groups

Create a new scaling group, given the general scaling group configuration, launch configuration, and optional scaling policies. This data provided in the request body in JSON format. If successful, the created group in JSON format containing id and links is returned.

Response

201 (Created)
Content-Type: application/json
{
  "group": {
    "launchConfiguration": {
      "args": {
        "loadBalancers": [
          {
            "port": 8080,
            "loadBalancerId": 9099
          }
        ],
        "server": {
          "name": "autoscale_server",
          "imageRef": "0d589460-f177-4b0f-81c1-8ab8903ac7d8",
          "flavorRef": "2",
          "OS-DCF:diskConfig": "AUTO",
          "personality": [
            {
              "path": "/root/.csivh",
              "contents": "VGhpcyBpcyBhIHRlc3QgZmlsZS4="
            }
          ],
          "networks": [
            {
              "uuid": "11111111-1111-1111-1111-111111111111"
            },
            {
              "uuid": "00000000-0000-0000-0000-000000000000"
            }
          ],
          "metadata": {
            "build_config": "core",
            "meta_key_1": "meta_value_1",
            "meta_key_2": "meta_value_2"
          }
        }
      },
      "type": "launch_server"
    },
    "groupConfiguration": {
      "maxEntities": 10,
      "cooldown": 360,
      "name": "testscalinggroup198547",
      "minEntities": 0,
      "metadata": {
        "gc_meta_key_2": "gc_meta_value_2",
        "gc_meta_key_1": "gc_meta_value_1"
      }
    },
    "state": {
      "active": [],
      "activeCapacity": 0,
      "desiredCapacity": 0,
      "paused": false,
      "pendingCapacity": 0,
      "name": "testscalinggroup198547"
    },
    "scalingPolicies": [
      {
        "name": "scale up by 1",
        "links": [
          {
            "href": "https://ord.autoscale.api.rackspacecloud.com/v1.0/829409/groups/6791761b-821a-4d07-820d-0b2afc7dd7f6/policies/dceb14ac-b2b3-4f06-aac9-a5b6cd5d40e1/",
            "rel": "self"
          }
        ],
        "cooldown": 0,
        "type": "webhook",
        "id": "dceb14ac-b2b3-4f06-aac9-a5b6cd5d40e1",
        "change": 1
      }
    ],
    "links": [
      {
        "href": "https://ord.autoscale.api.rackspacecloud.com/v1.0/829409/groups/6791761b-821a-4d07-820d-0b2afc7dd7f6/",
        "rel": "self"
      }
    ],
    "id": "6791761b-821a-4d07-820d-0b2afc7dd7f6"
  }
}

History

Get History

GET

/{tenantId}/group/{groupId}/history

Returns the most recent events for the Auto Scale group.

Response

501 (Not Implemented)

Specific Groups

List Group Information

GET

/{tenantId}/groups/{groupId}

View manifested view of the scaling group configuration, including the launch configuration, and the scaling policies. This data is returned in the body of the response in JSON format.

Response

200 (OK)
Content-Type: application/json
{
  "group": {
    "launchConfiguration": {
      "args": {
        "loadBalancers": [
          {
            "port": 8080,
            "loadBalancerId": 9099
          }
        ],
        "server": {
          "name": "autoscale_server",
          "imageRef": "0d589460-f177-4b0f-81c1-8ab8903ac7d8",
          "flavorRef": "2",
          "OS-DCF:diskConfig": "AUTO",
          "personality": [
            {
              "path": "/root/.csivh",
              "contents": "VGhpcyBpcyBhIHRlc3QgZmlsZS4="
            }
          ],
          "networks": [
            {
              "uuid": "11111111-1111-1111-1111-111111111111"
            },
            {
              "uuid": "00000000-0000-0000-0000-000000000000"
            }
          ],
          "metadata": {
            "build_config": "core",
            "meta_key_1": "meta_value_1",
            "meta_key_2": "meta_value_2"
          }
        }
      },
      "type": "launch_server"
    },
    "groupConfiguration": {
      "maxEntities": 10,
      "cooldown": 360,
      "name": "testscalinggroup198547",
      "minEntities": 0,
      "metadata": {
        "gc_meta_key_2": "gc_meta_value_2",
        "gc_meta_key_1": "gc_meta_value_1"
      }
    },
    "state": {
      "active": [],
      "activeCapacity": 0,
      "desiredCapacity": 0,
      "paused": false,
      "pendingCapacity": 0,
      "name": "testscalinggroup198547"
    },
    "scalingPolicies": [
      {
        "name": "scale up by 1",
        "links": [
          {
            "href": "https://ord.autoscale.api.rackspacecloud.com/v1.0/829409/groups/6791761b-821a-4d07-820d-0b2afc7dd7f6/policies/dceb14ac-b2b3-4f06-aac9-a5b6cd5d40e1/",
            "rel": "self"
          }
        ],
        "cooldown": 0,
        "type": "webhook",
        "id": "dceb14ac-b2b3-4f06-aac9-a5b6cd5d40e1",
        "change": 1
      }
    ],
    "links": [
      {
        "href": "https://ord.autoscale.api.rackspacecloud.com/v1.0/829409/groups/6791761b-821a-4d07-820d-0b2afc7dd7f6/",
        "rel": "self"
      }
    ],
    "id": "6791761b-821a-4d07-820d-0b2afc7dd7f6"
  }
}

Delete Group

DELETE

/{tenantId}/groups/{groupId}

Delete a scaling group if there are no entities belonging to the scaling group. If successful, no response body will be returned. If there are pending or active entities, a 409 will be returned.

Response

204 (No Content)

State

Get Group State

GET

/{tenantId}/groups/{groupId}/state

Get the current state of the scaling group, including the current set of active entities, the number of pending entities, and the desired number of entities. This data is returned in the body of the response in JSON format.

Response

200 (OK)
{
    "group": {
        "paused": false,
        "pendingCapacity": 0,
        "name": "testscalinggroup198547",
        "active": [],
        "activeCapacity": 0,
        "desiredCapacity": 0
    }
}

Configuration

Group Configuration Resource

Autoscale REST endpoints having to do with editing/modifying the configuration or launch configuration for a scaling group.

Get Group Configuration

GET

/{tenantId}/groups/{groupId}/config

Get the configuration for a scaling group, which includes the minimum number of entities, the maximum number of entities, global cooldown, and other metadata. This data is returned in the body of the response in JSON format.

Response

200 (OK)
Content-Type: application/json
{
    "groupConfiguration": {
        "name": "workers",
        "cooldown": 60,
        "minEntities": 5,
        "maxEntities": 100,
        "metadata": {
            "firstkey": "this is a string",
            "secondkey": "1"
        }
    }
}

Update Group Configruation

PUT

/{tenantId}/groups/{groupId}/config

Edit the configuration for a scaling group, which includes the minimum number of entities, the maximum number of entities, global cooldown, and other metadata. This data provided in the request body in JSON format. If successful, no response body will be returned.

Response

204 (No Content)

Launch Configuration Resource

Get the launch configuration for a scaling group, which includes the details of how to create a server, from what image, which load balancers to join it to, and what networks to add it to, and other metadata. This data is returned in the body of the response in JSON format.

Get Launch Configuration

GET

/{tenantId}/groups/{groupId}/launch

Response

200 (OK)
{
    "launchConfiguration": {
        "type": "launch_server",
        "args": {
            "server": {
                "flavorRef": 3,
                "name": "webhead",
                "imageRef": "0d589460-f177-4b0f-81c1-8ab8903ac7d8",
                "OS-DCF:diskConfig": "AUTO",
                "metadata": {
                    "mykey": "myvalue"
                },
                "personality": [
                    {
                        "path": "/root/.ssh/authorized_keys",
                        "contents": "ssh-rsa AAAAB3Nza...LiPk== user@example.net"
                    }
                ],
                "networks": [
                    {
                        "uuid": "11111111-1111-1111-1111-111111111111"
                    }
                ],
            },
            "loadBalancers": [
                {
                    "loadBalancerId": 2200,
                    "port": 8081
                }
            ]
        }
    }
}

Update Launch Configuration

PUT

/{tenantId}/groups/{groupId}/launch

Edit the launch configuration for a scaling group, which includes the details of how to create a server, from what image, which load balancers to join it to, and what networks to add it to, and other metadata. This data provided in the request body in JSON format. If successful, no response body will be returned.

Response

204 (No Content)

Pause Scaling Group

Pause all execution of scaling policies for this scaling group. Not Yet Implemented

Pause Scaling Group

POST

/{tenantId}/groups/{groupId}/pause

Response

501 (Not Implemented)

Resume Scaling Group

Resume all execution of scaling policies for this scaling group.

Resume Scaling Group

POST

/{tenantId}/groups/{groupId}/resume

Response

501 (Not Implemented)

Policies

Policies Resource

Autoscale REST endpoints having to do with creating/reading/updating/deleting the scaling policies associated with a particular scaling group.

List Scaling Policies

GET

/{tenantId}/groups/{groupId}/policies

Get a list of scaling policies in the group. Each policy describes an id, name, type, adjustment, cooldown, and links. This data is returned in the body of the response in JSON format.

Response

200 (OK)
Content-Type: application/json
{
    "policies": [
        {
            "args": {
                "cron": "23 * * * *"
            },
            "changePercent": -5.5,
            "cooldown": 1800,
            "id": "5f26e16c-5fa7-4d4f-8e78-257ea711389f",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/5f26e16c-5fa7-4d4f-8e78-257ea711389f/",
                    "rel": "self"
                }
            ],
            "name": "scale down by 5.5 percent at 11pm",
            "type": "schedule"
        },
        {
            "args": {
                "at": "2013-12-05T03:12:00Z"
            },
            "changePercent": -5.5,
            "cooldown": 1800,
            "id": "9f7c5801-6b25-4f5a-af07-4bb752e23d53",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/9f7c5801-6b25-4f5a-af07-4bb752e23d53/",
                    "rel": "self"
                }
            ],
            "name": "scale down by 5.5 percent on the 5th",
            "type": "schedule"
        },
        {
            "changePercent": -5.5,
            "cooldown": 1800,
            "id": "eb0fe1bf-3428-4f34-afd9-a5ac36f60511",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/eb0fe1bf-3428-4f34-afd9-a5ac36f60511/",
                    "rel": "self"
                }
            ],
            "name": "scale down by 5.5 percent",
            "type": "webhook"
        },
        {
            "cooldown": 1800,
            "desiredCapacity": 5,
            "id": "2f45092a-fde7-4461-a67a-3519e0366cd6",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/2f45092a-fde7-4461-a67a-3519e0366cd6/",
                    "rel": "self"
                }
            ],
            "name": "set group to 5 servers",
            "type": "webhook"
        },
        {
            "change": 1,
            "cooldown": 1800,
            "id": "e36e6a43-2a7a-433c-918c-39fa45b75d12",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/e36e6a43-2a7a-433c-918c-39fa45b75d12/",
                    "rel": "self"
                }
            ],
            "name": "scale up by one server",
            "type": "webhook"
        },
    ],
    "policies_links": []
}

Create one or many new scaling policies

POST

/{tenantId}/groups/{groupId}/policies

Scaling policies must include a name, type, adjustment, and cooldown. The response header will point to the list policies endpoint. An array of scaling policies is provided in the request body in JSON format.

Response

201 (Created)
Content-Type: application/json
{
    "policies": [
        {
            "args": {
                "cron": "23 * * * *"
            },
            "changePercent": -5.5,
            "cooldown": 1800,
            "id": "5f26e16c-5fa7-4d4f-8e78-257ea711389f",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/5f26e16c-5fa7-4d4f-8e78-257ea711389f/",
                    "rel": "self"
                }
            ],
            "name": "scale down by 5.5 percent at 11pm",
            "type": "schedule"
        },
        {
            "args": {
                "at": "2013-12-05T03:12:00Z"
            },
            "changePercent": -5.5,
            "cooldown": 1800,
            "id": "9f7c5801-6b25-4f5a-af07-4bb752e23d53",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/9f7c5801-6b25-4f5a-af07-4bb752e23d53/",
                    "rel": "self"
                }
            ],
            "name": "scale down by 5.5 percent on the 5th",
            "type": "schedule"
        },
        {
            "changePercent": -5.5,
            "cooldown": 1800,
            "id": "eb0fe1bf-3428-4f34-afd9-a5ac36f60511",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/eb0fe1bf-3428-4f34-afd9-a5ac36f60511/",
                    "rel": "self"
                }
            ],
            "name": "scale down by 5.5 percent",
            "type": "webhook"
        },
        {
            "cooldown": 1800,
            "desiredCapacity": 5,
            "id": "2f45092a-fde7-4461-a67a-3519e0366cd6",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/2f45092a-fde7-4461-a67a-3519e0366cd6/",
                    "rel": "self"
                }
            ],
            "name": "set group to 5 servers",
            "type": "webhook"
        },
        {
            "change": 1,
            "cooldown": 1800,
            "id": "e36e6a43-2a7a-433c-918c-39fa45b75d12",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/e36e6a43-2a7a-433c-918c-39fa45b75d12/",
                    "rel": "self"
                }
            ],
            "name": "scale up by one server",
            "type": "webhook"
        },
    ],
    "policies_links": []
}

Policy Resource

Get policy details

GET

/{tenantId}/groups/{groupId}/policies/{policyId}

Get a scaling policy which describes an id, name, type, adjustment, and cooldown, and links. This data is returned in the body of the response in JSON format.

Response

200 (OK)
Content-Type: application/json
{
    "policy": {
        "args": {
            "cron": "23 * * * *"
        },
        "changePercent": -5.5,
        "cooldown": 1800,
        "id": "5f26e16c-5fa7-4d4f-8e78-257ea711389f",
        "links": [
            {
                "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/5f26e16c-5fa7-4d4f-8e78-257ea711389f/",
                "rel": "self"
            }
        ],
        "name": "scale down by 5.5 percent at 11pm",
        "type": "schedule"
    }
}

Updates scaling policy

PUT

/{tenantId}/groups/{groupId}/policies/{policyId}

Scaling policies must include a name, type, adjustment, and cooldown. If successful, no response body will be returned.

Response

204 (No Content)

Delete scaling policy

DELETE

/{tenantId}/groups/{groupId}/policies/{policyId}

If successful, no response body will be returned.

Response

204 (No Content)

Execute Policy

Execute scaling policy

POST

/{tenantId}/groups/{groupId}/policies/{policyId}/execute

If successful, a response body will be returned.

Response

202 (Accepted)
{}

Anonymous Policy Execution URLs

Execute Resource

Autoscale REST Endpoints having to do with executing policies without authentication.

Execute an anonymous capability URL

POST

/execute/{capabilityVersion}/{capabilityHash}/

Response

202 (Accepted)
Content-Type: application/json
{}

Webhooks

Webhooks Resource

Autoscale REST endpoints having to do with creating/reading/updating/deleting the webhooks associated with a particular scaling group's particular scaling policy.

Get webhooks

GET

/tenantId/groups/groupId/policy/policyId/webhooks

This data is returned in the body of the response in JSON format.

Response

200 (OK)
{
    "webhooks": [
        {
            "id": "152054a3-e0ab-445b-941d-9f8e360c9eed",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/eb0fe1bf-3428-4f34-afd9-a5ac36f60511/webhooks/152054a3-e0ab-445b-941d-9f8e360c9eed/",
                    "rel": "self"
                },
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/execute/1/0077882e9626d83ef30e1ca379c8654d86cd34df3cd49ac8da72174668315fe8/",
                    "rel": "capability"
                }
            ],
            "metadata": {
                "notes": "PagerDuty will fire this webhook"
            },
            "name": "PagerDuty"
        },
        {
            "id": "23037efb-53a9-4ae5-bc33-e89a56b501b6",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/eb0fe1bf-3428-4f34-afd9-a5ac36f60511/webhooks/23037efb-53a9-4ae5-bc33-e89a56b501b6/",
                    "rel": "self"
                },
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/execute/1/4f767340574433927a26dc747253dad643d5d13ec7b66b764dcbf719b32302b9/",
                    "rel": "capability"
                }
            ],
            "metadata": {},
            "name": "Nagios"
        }
    ],
    "webhooks_links": []
}

Create one or more scaling policy webhooks

POST

/tenantId/groups/groupId/policy/policyId/webhooks

Webhooks must have a name. If successful, the created response body will contain the IDs and links to the newly created webhooks. This data provided in the request body in JSON format.

Response

201 (Created)
Content-Type: application/json
{
    "webhooks": [
        {
            "id": "152054a3-e0ab-445b-941d-9f8e360c9eed",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/eb0fe1bf-3428-4f34-afd9-a5ac36f60511/webhooks/152054a3-e0ab-445b-941d-9f8e360c9eed/",
                    "rel": "self"
                },
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/execute/1/0077882e9626d83ef30e1ca379c8654d86cd34df3cd49ac8da72174668315fe8/",
                    "rel": "capability"
                }
            ],
            "metadata": {
                "notes": "PagerDuty will fire this webhook"
            },
            "name": "PagerDuty"
        },
        {
            "id": "23037efb-53a9-4ae5-bc33-e89a56b501b6",
            "links": [
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/eb0fe1bf-3428-4f34-afd9-a5ac36f60511/webhooks/23037efb-53a9-4ae5-bc33-e89a56b501b6/",
                    "rel": "self"
                },
                {
                    "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/execute/1/4f767340574433927a26dc747253dad643d5d13ec7b66b764dcbf719b32302b9/",
                    "rel": "capability"
                }
            ],
            "metadata": {},
            "name": "Nagios"
        }
    ],
    "webhooks_links": []
}

Webhook Details

Get webhook details

GET

/{tenantId}/groups/{groupId}/policies/{policyId}/webhooks/{webhookId}

This data is returned in the body of the response in JSON format.

Response

200 (OK)
Content-Type: application/json
{
    "webhook": {
        "id": "23037efb-53a9-4ae5-bc33-e89a56b501b6",
        "links": [
            {
                "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/676873/groups/605e13f6-1452-4588-b5da-ac6bb468c5bf/policies/eb0fe1bf-3428-4f34-afd9-a5ac36f60511/webhooks/23037efb-53a9-4ae5-bc33-e89a56b501b6/",
                "rel": "self"
            },
            {
                "href": "https://dfw.autoscale.api.rackspacecloud.com/v1.0/execute/1/4f767340574433927a26dc747253dad643d5d13ec7b66b764dcbf719b32302b9/",
                "rel": "capability"
            }
        ],
        "metadata": {},
        "name": "Nagios"
    }
}

Update webhook

PUT

/{tenantId}/groups/{groupId}/policies/{policyId}/webhooks/{webhookId}

WebhookIds not recognized will be ignored with accompanying data. URLs will be ignored if submitted, but that will not invalidate the request. If successful, no response body will be returned.

Response

204 (No Content)

Delete webhook

DELETE

/{tenantId}/groups/{groupId}/policies/{policyId}/webhooks/{webhookId}

If successful, no response body will be returned.

Response

204 (No Content)

Limits

User Autoscale Limits

Get Limits

GET

/{tenantId}/limits

Provides details about account usage limits.

Response

200 (OK)
Content-Type: application/json
{
    "limits": {
        "absolute": {
            "maxGroups": 1000,
            "maxPoliciesPerGroup": 1000,
            "maxWebhooksPerPolicy": 1000
        },
        "rate": [
            {
                "limit": [
                    {
                        "next-available": "2013-11-08T23:27:15.646Z",
                        "remaining": 999,
                        "unit": "MINUTE",
                        "value": 1000,
                        "verb": "ALL"
                    }
                ],
                "regex": "/v1\\.0/([0-9]+)/.+",
                "uri": "/v1.0/tenantId/*"
            },
            {
                "limit": [
                    {
                        "next-available": "2013-11-08T23:26:15.674Z",
                        "remaining": 10,
                        "unit": "SECOND",
                        "value": 10,
                        "verb": "ALL"
                    }
                ],
                "regex": "/v1\\.0/execute/(.*)",
                "uri": "/v1.0/execute/*"
            }
        ]
    }
}