JavaScript
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const voices = await client.workers.deploymentLogs.voice.list('workerId');
console.log(voices.data);import os
from brainbase_labs import BrainbaseLabs
client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
voices = client.workers.deployment_logs.voice.list(
worker_id="workerId",
)
print(voices.data)curl --request GET \
--url https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"externalCallId": "<string>",
"direction": "<string>",
"fromNumber": "<string>",
"toNumber": "<string>",
"transcription": "<string>",
"messages": {},
"recordingUrl": "<string>",
"data": {
"latency": {},
"tts": {},
"llm_websocket_network_rtt": 123
},
"Telephony_source": "<string>",
"status": "<string>",
"call_sid": "<string>",
"duration": 123,
"transferData": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"callSid": "<string>",
"voiceLogId": "<string>",
"status": "<string>",
"duration": "<string>",
"transferEvents": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"duration": "<string>",
"toNumber": "<string>",
"fromNumber": "<string>",
"callTransferId": "<string>",
"type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"parentCallSid": "<string>",
"callSid": "<string>"
}
],
"metrics": {
"transfers": 123,
"transferMinutes": 123,
"transferEvents": 123,
"transferEventMinutes": 123
}
}
}
],
"nextCursor": "<string>",
"hasMore": true,
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123,
"hasNext": true,
"hasPrev": true
}
}Voice Deployment Logs
List voice deployment logs for a worker with optional filtering and pagination
Retrieves voice deployment logs for the worker with pagination support. Optionally, logs can be filtered by deploymentId and/or flowId by providing corresponding query parameters.
GET
/
api
/
workers
/
{workerId}
/
deploymentLogs
/
voice
JavaScript
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const voices = await client.workers.deploymentLogs.voice.list('workerId');
console.log(voices.data);import os
from brainbase_labs import BrainbaseLabs
client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
voices = client.workers.deployment_logs.voice.list(
worker_id="workerId",
)
print(voices.data)curl --request GET \
--url https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice \
--header 'x-api-key: <api-key>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deploymentLogs/voice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "<string>",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"externalCallId": "<string>",
"direction": "<string>",
"fromNumber": "<string>",
"toNumber": "<string>",
"transcription": "<string>",
"messages": {},
"recordingUrl": "<string>",
"data": {
"latency": {},
"tts": {},
"llm_websocket_network_rtt": 123
},
"Telephony_source": "<string>",
"status": "<string>",
"call_sid": "<string>",
"duration": 123,
"transferData": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"callSid": "<string>",
"voiceLogId": "<string>",
"status": "<string>",
"duration": "<string>",
"transferEvents": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"duration": "<string>",
"toNumber": "<string>",
"fromNumber": "<string>",
"callTransferId": "<string>",
"type": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"parentCallSid": "<string>",
"callSid": "<string>"
}
],
"metrics": {
"transfers": 123,
"transferMinutes": 123,
"transferEvents": 123,
"transferEventMinutes": 123
}
}
}
],
"nextCursor": "<string>",
"hasMore": true,
"pagination": {
"page": 123,
"limit": 123,
"total": 123,
"totalPages": 123,
"hasNext": true,
"hasPrev": true
}
}Query Parameters
Comma-separated list of fields to include in the response. When omitted, all fields are returned. The id field is always included. Allowed fields: id, createdAt, updatedAt, workerId, deploymentId, flowId, bbEngineSessionId, extractionsData, metadata, flowSnapshot, sessionLogData, type, startTime, endTime, externalCallId, direction, fromNumber, toNumber, transcription, messages, recordingUrl, data, Telephony_source, status, call_sid, duration, successResults, transferData
