For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
AI Hub
OverviewApp editorFlow editorAdminAPI & SDK
OverviewApp editorFlow editorAdminAPI & SDK
  • Overview
    • Using the API and SDK
    • Authorization
    • Response statuses
  • API & SDK guides
    • Run automation apps by SDK
  • API reference
      • POSTCreate batch
      • GETList batches
      • GETGet batch information
      • DELDelete batch
      • PUTUpload file to batch
      • GETList files in a batch
      • DELDelete file from batch
      • GETPoll batches job
      • POSTStart multipart upload session
      • PUTUpload part to multipart session
      • POSTCommit or abort multipart session
  • Legacy APIs
    • Job status
    • Run apps
    • Run results
    • Mount
AI Hub
API referenceBatches

List files in a batch

GET
https://aihub.instabase.com/api/v2/batches/:batch_id/files
GET
/api/v2/batches/:batch_id/files
$curl "${API_ROOT}/v2/batches/<BATCH-ID>/files" \
> -H "Authorization: Bearer ${API_TOKEN}" \
> -H "IB-Context: ${IB_CONTEXT}"
1{
2 "nodes": [
3 {
4 "full_path": "/path/to/document1.pdf",
5 "metadata": {
6 "node_type": "file",
7 "size": 1024,
8 "modified_timestamp": 1647532800
9 },
10 "perms": {
11 "can_read": true,
12 "can_write": true,
13 "can_delete": true
14 },
15 "name": "document1.pdf"
16 },
17 {
18 "full_path": "/path/to/document2.pdf",
19 "metadata": {
20 "node_type": "file",
21 "size": 2048,
22 "modified_timestamp": 1647619200
23 },
24 "perms": {
25 "can_read": true,
26 "can_write": false,
27 "can_delete": false
28 },
29 "name": "document2.pdf"
30 }
31 ],
32 "next_page_token": "eyJwYWdlIjogMn0=",
33 "has_more": true
34}
Return a list of files in a batch.
Was this page helpful?
Previous

Delete file from batch

Next
Built with

Authentication

AuthorizationBearer
Bearer HTTP authentication.

Path parameters

batch_idintegerRequired
The batch ID.

Headers

IB-ContextstringOptional

Typically your organization ID. See Authorization and context identification for details.

Query parameters

page_sizeintegerOptional
The number of files to return in each page.
start_tokenstringOptional
The token to start the list from.

Response

Request successful.
nodeslist of objects
List of files in the batch.
next_page_tokenstring
Token for retrieving the next page of results.
has_moreboolean
Indicates whether there are more files to be retrieved.

Errors

404
Not Found Error