import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.Network.list(page={"number":1,"size":20})
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "network",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test network"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Create a new Network.
Successful response
Unprocessable entity. Check the 'detail' field in response for details.
{- "name": "test network"
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "network",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test network"
}
}
Delete a Network.
Successful response
object (Network) | |||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" res = telnyx.Network.retrieve('id') res.delete()
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "network",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test network"
}
}
Retrieve a Network.
Successful response
object (Network) | |||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.Network.retrieve("id")
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "network",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test network"
}
}
Update a Network.
Successful response
object (Network) | |||||||||||
|
{- "name": "test network"
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "network",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test network"
}
}
List all Interfaces for a Network.
page[number] | integer >= 1 Default: 1 The page number to load |
page[size] | integer [ 1 .. 250 ] Default: 20 The size of the page |
filter[name] | string The interface name to filter on. Example: filter[name]=test interface |
filter[type] | string The interface type to filter on. Example: filter[type]=wireguard_interface |
filter[status] | string (InterfaceStatus) The interface status to filter on. Example: filter[status]=provisioned |
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.Networks.retrieve_network_interface.retrieve("id",page={"number":1,"size":20})
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "network_interface",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test interface",
- "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "provisioned",
- "region": {
- "code": "ashburn-va",
- "name": "Ashburn",
- "record_type": "region"
}, - "region_code": "ashburn-va",
- "type": "wireguard_interface"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}