import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.WireguardInterface.list(page={"number":1,"size":20})
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_interface",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test interface",
- "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "provisioned",
- "endpoint": "203.0.113.0:51871",
- "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "region": {
- "code": "ashburn-va",
- "name": "Ashburn",
- "record_type": "region"
}, - "region_code": "ashburn-va"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Create a new WireGuard Interface. Current limitation of 10 interfaces per user can be created.
Successful response
Unprocessable entity. Check the 'detail' field in response for details.
{- "name": "test interface",
- "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "region_code": "ashburn-va"
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_interface",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test interface",
- "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "provisioned",
- "endpoint": "203.0.113.0:51871",
- "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "region": {
- "code": "ashburn-va",
- "name": "Ashburn",
- "record_type": "region"
}, - "region_code": "ashburn-va"
}
}
Delete a WireGuard Interface.
Successful response
object (WireguardInterfaceRead) | |||||||||||||||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" res = telnyx.WireguardInterface.retrieve('id') res.delete()
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_interface",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test interface",
- "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "provisioned",
- "endpoint": "203.0.113.0:51871",
- "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "region": {
- "code": "ashburn-va",
- "name": "Ashburn",
- "record_type": "region"
}, - "region_code": "ashburn-va"
}
}
Retrieve a WireGuard Interfaces.
Successful response
object (WireguardInterfaceRead) | |||||||||||||||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.WireguardInterface.retrieve("id")
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_interface",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "name": "test interface",
- "network_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "status": "provisioned",
- "endpoint": "203.0.113.0:51871",
- "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "region": {
- "code": "ashburn-va",
- "name": "Ashburn",
- "record_type": "region"
}, - "region_code": "ashburn-va"
}
}
Delete the WireGuard peer.
Successful response
object (WireguardPeer) | |||||||||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" res = telnyx.WireguardPeer.retrieve('id') res.delete()
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_peer",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "last_seen": "2018-02-02T22:25:27.521Z",
- "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
}
}
Retrieve the WireGuard peer.
Successful response
object (WireguardPeer) | |||||||||||||||||
|
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.WireguardPeer.retrieve("id")
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_peer",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "last_seen": "2018-02-02T22:25:27.521Z",
- "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
}
}
Update the WireGuard peer.
Successful response
object (WireguardPeer) | |||||||||||||||||
|
Unprocessable entity. Check the 'detail' field in response for details.
{- "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU="
}
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_peer",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "public_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "last_seen": "2018-02-02T22:25:27.521Z",
- "private_key": "qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=",
- "wireguard_interface_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
}
}
List all Allowed IPs for a WireGuard peer.
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.WireguardPeers.retrieve_allowed_ip.retrieve("id",page={"number":1,"size":20})
{- "data": [
- {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_allowed_ip",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "ip_address": "198.51.100.1"
}
], - "meta": {
- "page_number": 2,
- "page_size": 25,
- "total_pages": 3,
- "total_results": 55
}
}
Retrieve the Allowed IP.
Successful response
object (WireguardPeerAllowedIP) | |||||||||||
|
{- "data": {
- "created_at": "2018-02-02T22:25:27.521Z",
- "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
- "record_type": "wireguard_allowed_ip",
- "updated_at": "2018-02-02T22:25:27.521Z",
- "ip_address": "198.51.100.1"
}
}
Retrieve Wireguard config template for Peer
import telnyx telnyx.api_key = "YOUR_API_KEY" telnyx.WireguardPeers.retrieve_config.retrieve("id")
{- "errors": [
- {
- "code": "string",
- "detail": "string",
- "meta": { },
- "source": {
- "parameter": "string",
- "pointer": "/json/pointer"
}, - "title": "string"
}
]
}