Skip to main content
GET
/
api
/
workers
/
{workerId}
/
deployments
/
{deploymentId}
/
history
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 history = await client.workers.deployments.history.retrieve('deploymentId', {
  workerId: 'workerId',
});

console.log(history.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
)
history = client.workers.deployments.history.retrieve(
deployment_id="deploymentId",
worker_id="workerId",
)
print(history.data)
curl --request GET \
--url https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/{deploymentId}/history \
--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}/deployments/{deploymentId}/history",
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}/deployments/{deploymentId}/history"

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}/deployments/{deploymentId}/history")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/deployments/{deploymentId}/history")

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>",
      "createdAt": "2023-11-07T05:31:56Z",
      "deploymentId": "<string>",
      "committedFlowVersionId": "<string>",
      "previousValue": {},
      "newValue": {},
      "comment": "<string>",
      "changedById": "<string>",
      "deployedAt": "2023-11-07T05:31:56Z",
      "status": "<string>",
      "flowVersion": 123,
      "metadata": {}
    }
  ],
  "total": 123,
  "hasMore": true
}

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required
deploymentId
string
required

Query Parameters

limit
integer
default:20
Required range: 1 <= x <= 100
offset
integer
default:0
Required range: x >= 0
changeType
enum<string>
Available options:
FLOW_VERSION,
CONFIG,
VOICE_SETTINGS,
STATUS,
PARAMETERS

Response

Paginated list of history entries

data
object[]
total
integer
hasMore
boolean