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 version = await client.workers.flows.versions.retrieve('versionId', {
workerId: 'workerId',
flowId: 'flowId',
});
console.log(version.id);{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"flowId": "<string>",
"versionNumber": 123,
"code": "<string>",
"variables": {},
"commitMessage": "<string>",
"authorType": "USER",
"authorUserId": "<string>",
"authorApiKeyId": "<string>"
}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 version = await client.workers.flows.versions.retrieve('versionId', {
workerId: 'workerId',
flowId: 'flowId',
});
console.log(version.id);{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"flowId": "<string>",
"versionNumber": 123,
"code": "<string>",
"variables": {},
"commitMessage": "<string>",
"authorType": "USER",
"authorUserId": "<string>",
"authorApiKeyId": "<string>"
}API key authentication
Version details