curl --request GET \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/metrics/{metric_name}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>'import requests
response = requests.get( "https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/metrics/{metric_name}/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"},)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/metrics/{metric_name}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "GET", headers: { "Authorization": "Bearer <API_TOKEN>" },});console.log(await response.json());Returns the values of one metric over the interval, as two lists of the same length: the times and the values. Use a metric_key from List Load Balancer Metrics as metric_name.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Load Balancer ID
Metric key, for example request_count.
Query Parameters
Section titled “Query Parameters”Project ID
How far back to look. Default 5m.
Active IAM ID (To access contact person account) Find your Active IAM ID here
Location
Responses
Section titled “Responses”The metric over time
object
object
Times in India time (IST), 12-hour with AM or PM: 11:15:30AM for intervals up to 30m, 11:15AM from 1h.
Values as text with 2 decimals, one per time.
object
Example
{ "code": 200, "message": "Success", "data": { "time_series": [ "11:15:30AM", "11:15:45AM" ], "value_series": [ "12.50", "13.10" ] }, "errors": {}}interval is not one of the allowed values. A missing or invalid project ID also gives 400 with errors “Project ID is missing or invalid”.
object
object
Example
{ "code": 400, "message": "Bad Request", "data": {}, "errors": "Invalid interval value"}No Load Balancer with that ID in the project and region.
object
object
Example
{ "code": 404, "message": "Bad Request", "data": {}, "errors": "Gateway not found"}The metric name is not known for this Load Balancer type, or the metrics store could not be reached.
object
object
Example
{ "code": 412, "message": "Precondition Failed", "data": {}, "errors": "Monitoring data not available at this moment!"}