Skip to main content
GET
/
global_ip_latency
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const globalIPLatency = await client.globalIPLatency.retrieve();

console.log(globalIPLatency.data);
import os
from telnyx import Telnyx

client = Telnyx(
    api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
)
global_ip_latency = client.global_ip_latency.retrieve()
print(global_ip_latency.data)
package main

import (
	"context"
	"fmt"

	"github.com/team-telnyx/telnyx-go"
	"github.com/team-telnyx/telnyx-go/option"
)

func main() {
	client := telnyx.NewClient(
		option.WithAPIKey("My API Key"),
	)
	globalIPLatency, err := client.GlobalIPLatency.Get(context.TODO(), telnyx.GlobalIPLatencyGetParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", globalIPLatency.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.globaliplatency.GlobalIpLatencyRetrieveParams;
import com.telnyx.sdk.models.globaliplatency.GlobalIpLatencyRetrieveResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        TelnyxClient client = TelnyxOkHttpClient.fromEnv();

        GlobalIpLatencyRetrieveResponse globalIpLatency = client.globalIpLatency().retrieve();
    }
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

global_ip_latency = telnyx.global_ip_latency.retrieve

puts(global_ip_latency)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
  $globalIPLatency = $client->globalIPLatency->retrieve(
    filter: ['globalIPID' => 'string']
  );

  var_dump($globalIPLatency);
} catch (APIException $e) {
  echo $e->getMessage();
}
telnyx global-ip-latency retrieve \
  --api-key 'My API Key'
curl --request GET \
  --url https://api.telnyx.com/v2/global_ip_latency \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "timestamp": "2020-01-01T00:00:00.000Z",
      "global_ip": {
        "id": "a836125b-20b6-452e-9c03-2653f09c7ed7",
        "ip_address": "192.0.2.1"
      },
      "prober_location": {
        "id": "a836125b-20b6-452e-9c03-2653f09c7ed7",
        "name": "Amsterdam",
        "lat": 52.370216,
        "lon": 4.895168
      },
      "mean_latency": {
        "amount": 100,
        "unit": "ms"
      },
      "percentile_latency": {
        "0": {
          "amount": 100,
          "unit": "ms"
        },
        "25": {
          "amount": 100,
          "unit": "ms"
        },
        "50": {
          "amount": 100,
          "unit": "ms"
        },
        "75": {
          "amount": 100,
          "unit": "ms"
        },
        "90": {
          "amount": 100,
          "unit": "ms"
        },
        "99": {
          "amount": 100,
          "unit": "ms"
        },
        "100": {
          "amount": 100,
          "unit": "ms"
        }
      }
    }
  ]
}
{
  "errors": [
    {
      "code": "<string>",
      "title": "<string>",
      "detail": "<string>",
      "source": {
        "pointer": "<string>",
        "parameter": "<string>"
      },
      "meta": {}
    }
  ]
}
{
  "errors": [
    {
      "code": "<string>",
      "title": "<string>",
      "detail": "<string>",
      "source": {
        "pointer": "<string>",
        "parameter": "<string>"
      },
      "meta": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

filter
object

Consolidated filter parameter (deepObject style). Originally: filter[global_ip_id][in]

Response

Successful response

data
object[]