API - Planyo Web Services - get_resource_usage_for_month

Sie sind hier: Planyo » Hilfe » API » get_resource_usage_for_month

get_resource_usage_for_month

Description:

This function will return usage/availability information of given resource (or entire site) for an entire month.

Input:

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 parameter.
site_id int optional
Required only for metasite API keys and when resource_id is null. Otherwise skip this parameter.
year int required
Year
month int required
Month (1-12)
method string required
must be set to get_resource_usage_for_month
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.

Output:

usage array
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.

API playground:

Click here to test this function in the API playground.