get_resource_usage_for_month (version 1)
This function will return usage/availability information of given resource (or entire site) for an entire month.
resource_id int optional
ID of the resource. Pass null if you want info for all resources to be returned. In this case and if using a metasite API key, you'll need to pass the site id in the site_id
site_id int optional
Required only for metasite API keys and when resource_id is null. Otherwise skip this parameter.
year int required
month int required
version float optional
you can optionally specify the version of the API that you're using. Use the value of latest or simply skip this parameter to use the latest API version. The latest version is: 1
language string optional
by specifying a 2-letter (ISO 639-1) language code (all capital letters e.g. EN, DE, FR, ES, IT) you can change the language of the text values returned
api_key string required
your API key - Click here to get your key
. If your API key uses a hash key, you must also include the parameters hash_key and hash_timestamp
Resource usage. This is a multi-dimentional array. The first dimention is always day number, then for hour-based resources it's the hour and in case of quarter-based resource the third array dimention is the number of minutes (00, 15, 30 or 45). The array value is the number of units available for given time slot (day, hour or quarter). Subtracting this number from the total quantity gives you availability info.
Click here to test this function in the API playground.