curl --request GET \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/metrics_summary/?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_summary/", 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_summary/");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 current value of every metric of the Load Balancer, for the interval. The metrics are those of its type; see List Load Balancer Metrics. A value that cannot be read comes back as "0.00".
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Load Balancer ID
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”One entry per metric key
object
One entry per metric key, shown here for two of them.
object
object
The value, as a text with 2 decimals.
object
object
Example
{ "code": 200, "message": "Success", "data": { "request_count": { "metric_name": "Requests / sec", "description": "Total requests per second received by the load balancer", "current_value": "12.50", "unit": "req/s" }, "healthy_backends": { "metric_name": "Healthy Backends", "description": "Backend targets currently passing health checks", "current_value": "2.00", "unit": "hosts" } }, "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"}Was this page helpful?