Rackspace Email Apps API retrieving customer status (enable / disable)

72 Views Asked by At

I've read through the RackSpace API documentation, and I can enable and disable "Customers" effectively and all works. However, I am unable to find in the DOCUMENTATION how to check whether a customer is enabled / disabled.

My way of enabling a customer is:

$client = new ApiClient();
$format = 'application/json';
$fields = Array();
$disable = $client->post(
    '/customers/xxxxxxxxx/enable',
    $fields,
    'application/x-www-form-urlencoded');

And that works great. -- My question is, how do I check via account number if the customer is enabled? Even if there is a round-about way of checking, but I have gone through the docs, and tried even checking other aspects of the account to see if something changes during enable / disable .. Does someone know of exact syntax, or know of a "back way" to do this?

It seems odd that it will allow you to enable and disable customers, but give you no way to check if they are already enabled / disabled.

1

There are 1 best solutions below

2
Will On

You should be able to query this information via the API as indicated in the JSON response here:

http://api-wiki.apps.rackspace.com/api-wiki/index.php?title=Rackspace_Mailbox_(Rest_API)#Show

You will notice a field for enabled that will read as either true = enable or false = disabled.