Retrieve VPC public traffic stats history
Get history VPC stats in given time span, or for given range (start -> end); in which case
the given timespan will be applied if data is available in given range.
Public here means the traffic going in and out of the VPC, not the internal traffic inside of it (for example between two virtual machines in same VPC). This is the traffic that the user will be billed for.
Notes :
- sometimes the reply might be delayed for few seconds, this will happen if you request was sent while new stats are being written.
Authorization
AuthorizationRequiredBearer <token>OAuth Authentication
OpenScaler API uses OAuth, a standard for secure authorization. To access the API, obtain a token via the OpenScaler Platform.
Use the access_token in the Authorization header for requests:
Always keep your token secure and do not share it with anyone.
In: header
Path Parameters
vpc_idRequiredstringA unique identifier for a VPC instance. See VPCs section for more details.
Query Parameters
stats_timespanintegertime range to get stats from (in seconds):
- 1 hour
- 1 day
- 1 week
- 1 mounth (31 days)
- 1 year (366 days) if omitted, will send live stats (use this for testing only, not for prodcution)
3600 | 86400 | 604800 | 2678400 | 31622400stats_startintegerunix timestamp of the first datapoint
stats_endintegerunix timestamp of the last datapoint
The response is a JSON object with the following fields:
meta: metadata about the statsdata: 2D containing stats data where each row is a data point at given instant and each column is a stat category (e.g.tx,rx).