A valid request URL is required to generate request examples{
"apps": [
{
"platform": "android",
"bundle_id": "com.example.phone",
"fcm_project_id": "example-phone",
"fcm_project_number": "123456789012"
},
{
"platform": "ios",
"bundle_id": "com.example.phone",
"name": "Example Phone",
"apns_team_id": "ABCDE12345",
"apns_key_id": "ABC123DEFG",
"apns_environment": "production",
"delivery_mode": "always_push"
}
],
"upstreams": [
{
"name": "Main PBX",
"host": "192.0.2.10",
"domains": [
"acme.example.com"
],
"port": 5060,
"transport": "tcp",
"max_expires": 3600,
"strict_path": true,
"contact_strategy": "masquerade",
"keepalive_seconds": 30,
"mode": "managed",
"managed_registration": "per_user",
"user_source": "pgw",
"app_auth": "both",
"bearer": {
"issuer": "https://auth.example.com/",
"audience": "pgw",
"jwks_url": "https://auth.example.com/.well-known/jwks.json"
},
"users": [
{
"username": "1001",
"domain": "acme.example.com",
"enabled": true
},
{
"username": "1002",
"domain": "acme.example.com",
"auth_username": "acme-1002",
"enabled": false
}
]
},
{
"name": "asterisk",
"host": "pbx.example.com",
"domains": [
"*.example.com"
],
"port": 5060,
"transport": "udp",
"max_expires": 3600,
"invite_source_cidrs": [
"203.0.113.10/32"
],
"strict_path": true,
"contact_strategy": "path",
"keepalive_seconds": 30,
"mode": "passthrough",
"user_source": "pgw",
"app_auth": "digest",
"users": []
}
]
}{
"error": "missing or unknown API key"
}{
"error": "internal error"
}Export the tenant's configuration
Returns the tenant’s apps, upstreams, and managed mode users as a
snapshot that POST /config/sync accepts. Apps are sorted by
platform and bundle ID, upstreams by host, and each upstream’s users
by domain, then username. pgw returns no secret: it leaves out
apns_key_pem, fcm_service_account_json, kamailio.password, and
each user’s password, like every other empty field. It also leaves
out the users of an upstream with user_source: kamailio.
A valid request URL is required to generate request examples{
"apps": [
{
"platform": "android",
"bundle_id": "com.example.phone",
"fcm_project_id": "example-phone",
"fcm_project_number": "123456789012"
},
{
"platform": "ios",
"bundle_id": "com.example.phone",
"name": "Example Phone",
"apns_team_id": "ABCDE12345",
"apns_key_id": "ABC123DEFG",
"apns_environment": "production",
"delivery_mode": "always_push"
}
],
"upstreams": [
{
"name": "Main PBX",
"host": "192.0.2.10",
"domains": [
"acme.example.com"
],
"port": 5060,
"transport": "tcp",
"max_expires": 3600,
"strict_path": true,
"contact_strategy": "masquerade",
"keepalive_seconds": 30,
"mode": "managed",
"managed_registration": "per_user",
"user_source": "pgw",
"app_auth": "both",
"bearer": {
"issuer": "https://auth.example.com/",
"audience": "pgw",
"jwks_url": "https://auth.example.com/.well-known/jwks.json"
},
"users": [
{
"username": "1001",
"domain": "acme.example.com",
"enabled": true
},
{
"username": "1002",
"domain": "acme.example.com",
"auth_username": "acme-1002",
"enabled": false
}
]
},
{
"name": "asterisk",
"host": "pbx.example.com",
"domains": [
"*.example.com"
],
"port": 5060,
"transport": "udp",
"max_expires": 3600,
"invite_source_cidrs": [
"203.0.113.10/32"
],
"strict_path": true,
"contact_strategy": "path",
"keepalive_seconds": 30,
"mode": "passthrough",
"user_source": "pgw",
"app_auth": "digest",
"users": []
}
]
}{
"error": "missing or unknown API key"
}{
"error": "internal error"
}Response
The tenant's configuration, without secrets.
A tenant's configuration. The records use the fields of the create
requests, except that a secret can be empty, which keeps the stored
one. A null list leaves its records alone, even with prune. An empty list names the section with no records,
so prune deletes every record of that kind. An export always
sends apps, upstreams, and the users of each upstream whose
users pgw stores.