import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const connections = await client.connections.list();
console.log(connections.data);{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "ip_connection",
"active": true,
"anchorsite_override": "Latency",
"connection_name": "string",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"webhook_event_url": "https://example.com",
"webhook_event_failover_url": "https://failover.example.com",
"webhook_api_version": "1",
"outbound_voice_profile_id": "1293384261075731499"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}Returns a list of your connections irrespective of type.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const connections = await client.connections.list();
console.log(connections.data);{
"data": [
{
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "ip_connection",
"active": true,
"anchorsite_override": "Latency",
"connection_name": "string",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z",
"webhook_event_url": "https://example.com",
"webhook_event_failover_url": "https://failover.example.com",
"webhook_api_version": "1",
"outbound_voice_profile_id": "1293384261075731499"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[connection_name], filter[fqdn], filter[outbound_voice_profile_id], filter[outbound.outbound_voice_profile_id]
Show child attributes
Filter by connection_name using nested operations
Show child attributes
If present, connections with <code>connection_name</code> containing the given value will be returned. Matching is not case-sensitive. Requires at least three characters.
If present, connections with an fqdn that equals the given value will be returned. Matching is case-sensitive, and the full string must match.
Identifies the associated outbound voice profile.
"1293384261075731499"
Specifies the sort order for results. By default sorting direction is ascending. To have the results sorted in descending order add the <code> -</code> prefix.<br/><br/> That is: <ul>
<li> <code>connection_name</code>: sorts the result by the <code>connection_name</code> field in ascending order. </li> <li> <code>-connection_name</code>: sorts the result by the <code>connection_name</code> field in descending order. </li> </ul> <br/> If not given, results are sorted by <code>created_at</code> in descending order.created_at, connection_name, active "connection_name"
Successful response with a list of connections.
Show child attributes
Identifies the specific resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Identifies the type of the resource.
"ip_connection"
Defaults to true
true
Latency directs Telnyx to route media through the site with the lowest round-trip time to the user's connection. Telnyx calculates this time using ICMP ping messages. This can be disabled by specifying a site to handle all media.
Latency, Chicago, IL, Ashburn, VA, San Jose, CA, Sydney, Australia, Amsterdam, Netherlands, London, UK, Toronto, Canada, Vancouver, Canada, Frankfurt, Germany "Amsterdam, Netherlands"
"string"
ISO 8601 formatted date indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
The URL where webhooks related to this connection will be sent.
"https://example.com"
The failover URL where webhooks related to this connection will be sent if sending to the primary URL fails.
"https://failover.example.com"
Determines which webhook format will be used, Telnyx API v1 or v2.
1, 2 "1"
Identifies the associated outbound voice profile.
"1293384261075731499"
Tags associated with the connection.
["tag1", "tag2"]Was this page helpful?