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

console.log(flow.id);
{
  "id": "<string>",
  "version": 123,
  "name": "<string>",
  "code": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "workerId": "<string>",
  "variables": {},
  "label": "<string>",
  "lastEditedByType": "USER",
  "lastEditedByUserId": "<string>",
  "lastEditedByApiKeyId": "<string>"
}

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required
flowId
string
required

Query Parameters

versionId
string

If provided, returns the flow with code/variables from this specific version

deploymentId
string

If provided, returns the flow with merged flow+deployment parameters

Response

Flow details

id
string
required
version
integer
required
name
string
required
code
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
workerId
string
required
variables
object
required
label
string | null
lastEditedByType
enum<string>
Available options:
USER,
API_KEY
lastEditedByUserId
string | null
lastEditedByApiKeyId
string | null