List Workers VPC connectivity services
connectivity.directory.services.list(ServiceListParams**kwargs) -> SyncV4PagePaginationArray[ServiceListResponse]
GET/accounts/{account_id}/connectivity/directory/services
List Workers VPC connectivity services
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Parameters
List Workers VPC connectivity services
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
page = client.connectivity.directory.services.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
page = page.result[0]
print(page){
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"host": {
"ipv4": "10.0.0.1",
"network": {
"tunnel_id": "0191dce4-9ab4-7fce-b660-8e5dec5172da"
}
},
"name": "web-app",
"type": "http",
"created_at": "2024-01-15T09:30:00Z",
"http_port": 8080,
"https_port": 8443,
"service_id": "550e8400-e29b-41d4-a716-446655440000",
"tls_settings": {
"cert_verification_mode": "verify_full"
},
"updated_at": "2024-01-15T10:45:00Z"
}
],
"result_info": {
"count": 1,
"page": 1,
"per_page": 20,
"total_count": 2000,
"total_pages": 100
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": [
{
"host": {
"ipv4": "10.0.0.1",
"network": {
"tunnel_id": "0191dce4-9ab4-7fce-b660-8e5dec5172da"
}
},
"name": "web-app",
"type": "http",
"created_at": "2024-01-15T09:30:00Z",
"http_port": 8080,
"https_port": 8443,
"service_id": "550e8400-e29b-41d4-a716-446655440000",
"tls_settings": {
"cert_verification_mode": "verify_full"
},
"updated_at": "2024-01-15T10:45:00Z"
}
],
"result_info": {
"count": 1,
"page": 1,
"per_page": 20,
"total_count": 2000,
"total_pages": 100
}
}