Get this Tempus account's settings (user)
How the account is configured, for a client deciding which screens to show. Read it once per session: the answer is the same for every user in the PBX.
Separate from the profile on purpose. The profile is assembled from one employee's active contract and returns 422 without one, so an account-wide answer could not be read by a client that has no employee in hand yet, or by one whose employee is between contracts.
Today it carries one field, approval_engine, which says whether requests are routed
by approval chains or by the older validator rules. The two need different approval
screens and cannot be told apart from the API version in the path.
Any authenticated user of the PBX may read it. Nothing here is privileged: it says how requests are routed, not who routes them.
User bearer token. Default authentication for customer-facing endpoints.
Obtain a token by calling POST /login with your credentials, then send it
on every subsequent request as Authorization: Bearer <token>. The token
inherits the permissions and PBX scope of the authenticated user.
- HTTP Authorization Scheme
bearer- Bearer format
Bearer <token>
application/jsonResponses
data*object
approval_chains validator_rulesapproval_chainsAuthorization Token is missingYou do not have access to this PBX.No query results for model [App\Models\Pbx].https://cockpit.voxbi.com/api/v1/v2/{pbx}/settings
curl -X GET 'https://cockpit.voxbi.com/api/v1/v2/{pbx}/settings' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/v2/{pbx}/settings', {
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/v2/{pbx}/settings',
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/v2/{pbx}/settings', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"data": { … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057