Skip to main content
GET
/
api
/
workers
/
{workerId}
/
resources
/
file
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 resources = await client.workers.resources.file.list('workerId');

console.log(resources);
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
)
resources = client.workers.resources.file.list(
"workerId",
)
print(resources)
curl --request GET \
--url https://brainbase-monorepo-api.onrender.com/api/workers/{workerId}/resources/file \
--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}/resources/file",
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}/resources/file"

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

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

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
[
  {
    "id": "<string>",
    "lastUpdated": "2023-11-07T05:31:56Z",
    "updateFrequency": "<string>",
    "rawLink": "<string>",
    "key": "<string>",
    "s3FilePath": "<string>",
    "imageS3FilePath": "<string>",
    "signedS3FilePath": "<string>",
    "numScrolls": 123,
    "fileName": "<string>",
    "mimeType": "<string>",
    "processingError": "<string>",
    "graphStatus": {},
    "size": 123,
    "uploadedAt": "2023-11-07T05:31:56Z",
    "folderId": "<string>"
  }
]

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required

Response

List of file resources

id
string
required
ragType
enum<string>
required
Available options:
FILE,
WEBPAGE,
SITEMAP
lastUpdated
string<date-time> | null
updateFrequency
string | null
key
string | null
s3FilePath
string | null
imageS3FilePath
string | null
signedS3FilePath
string | null
numScrolls
integer | null
fileName
string | null
mimeType
string | null
status
enum<string>
Available options:
STARTED,
PROCESSING,
FAILED,
AVAILABLE,
DELETED
processingError
string | null
graphStatus
object | null
size
integer | null
uploadedAt
string<date-time> | null
folderId
string | null