Checking Rackspace DNS API Rate Limits

so, you want to check your Rackspace DNS API rate Limits?

Here is how you do it.


# Username used to login to control panel

# Find the APIKey in the 'account settings' part of the menu of the control panel

# Customer ID of the account (the numbers that are in the URL when you login to mycloud control panel)

# This section simply retrieves the TOKEN
TOKEN=`curl -X POST -d '{ "auth":{"RAX-KSKEY:apiKeyCredentials": { "username":"'$USERNAME'", "apiKey": "'$APIKEY'" }} }' -H "Content-type: application/json" |  python -mjson.tool | grep -A5 token | grep id | cut -d '"' -f4`

# Retrieve Rate Limit detail for the account
curl "$CUSTOMER_ID/limits" -H "X-Auth-Token: $token" | python -m json.tool

Cheers &
Best wishes,

Leave a Reply

Your email address will not be published. Required fields are marked *