Getting Traffic Usage Information

The get_traffic is used to retrieve information about the traffic spent by a subscription between two dates. The resulting information got for each subscription lists all days between the specified dates and shows the daily traffic spent within a subscription during this day.

Request Packet Structure

A request XML packet getting traffic information for the specified subscriptions includes the get_traffic operation node:

<packet><webspace><get_traffic>...</get_traffic></webspace></packet>

The get_traffic node does not have a separate data type, it is nested within the complex type (domain_input.xsd). The get_traffic node has the following graphics representation:

filter, required

It specifies subscriptions whose traffic information will be got from Plesk. Data type: DomainFilterType (domain_input.xsd). To see the structure of this node, proceed to topic Available Filters.

since_date, optional

It specifies the starting date of the period. If the packet is missing this node, the analyzed days will not be limited below. Data type: date. Format: YYYY-MM-DD.

to_date, optional

It specifies the end date of the period. If the packet is missing this element, the period will be limited by the date of the request execution. Data type: date. Format: YYYY-MM-DD.

If the packet is missing both nodes since_date and to_date, the response packet will show the traffic of the specified subscription day by day since its creation and up to the date of the request execution.

Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.

Response Packet Structure

The get_traffic node of the response packet is structured as follows:

The result, optional

It wraps the result of the requested get_traffic operation. It can be missing if some error occurs before the validation starts. Data type: resultFilterType (common.xsd).

To get traffic information for all subscriptions belonging to a certain customer, use group filtering (see topic Available Filters for details). Customers whose domains are filtered can be specified within one filter either by owner-id or by owner-login.

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.