Download an example configuration file (pbx)
/configuration-import/example
Downloads a complete PBX configuration file of kind external, made up for this purpose. It holds at
least one record of every kind a file may contain, and it always passes the current rules, because a
test checks it against them. Use it to see how a finished file looks, to test your requests before
your own file is ready, and to compare your converter's output with a file Cockpit accepts.
The answer is a zip in the form the import takes: configuration.json and the sound file under
files/. You can send it unchanged to POST /configuration-import/validate to test your requests.
Do not send it to POST /configuration-imports with the key of a PBX in use: it would add a version
whose restore replaces the configuration of that PBX with made-up records.
Needs the configuration-import scope on the API key. Rate limit: 30 requests per minute per PBX,
shared with the other reading requests of this section (429 with Retry-After). Answers 503 while
configuration versions are switched off on this installation.
API key created on the Cockpit Integrations page (an "API key" integration).
It is a bearer token owned by the customer's PBX and limited to the scopes
selected when the key was created (e.g. phone-numbers, push-configuration).
Send it in the Authorization header:
Authorization: Bearer <api_key>
Manage keys (create / reveal / revoke) from Integrations → New integration → API key.
- HTTP Authorization Scheme
bearer
Responses
https://cockpit.voxbi.com/api/v1/configuration-import/example
curl -X GET 'https://cockpit.voxbi.com/api/v1/configuration-import/example' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/configuration-import/example', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://cockpit.voxbi.com/api/v1/configuration-import/example',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'GET',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/configuration-import/example', false, $context);
$data = json_decode($response, true);
print_r($data);
attachment; filename=cockpit-pbx-config-example.zip{ … }
application/json{ … }
application/json{ … }
60application/json