/v1/tools/list_filesfreeList your files
Lists the files in this workspace, newest first, fifty at a time: uploads and results, each with its file_id to pass as a file input, its size, what made it (with its job_id, and the results of that job that fill a setting, by type: a voice’s script), and the folder it is in. Free. Also the workspace’s folders, each with its id (fld_…), name and how many files it holds. Give folder to list only one folder’s files (none for those in no folder), tool (and input) to list only the files that input takes, kind to list only images, clips, sound or documents, name to find files whose name has those words, in any folder, and file_ids to include those files however old. total says how many match; when more is true, pass the last file_id as before for the next fifty.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
tool | string | None | An action or tool id, to list only files it takes |
input | string | None | One of its file inputs, by name |
kind | array | None | Only these kinds of file: image, video, audio, or document (anything else: PDFs, spreadsheets, text, subtitles, transcripts) |
file_ids | array | None | Files to include however old, by file_id |
name | string | None | Only files whose name has these words, however old |
before | string | None | The next page: the files after this file_id, the last one listed |
folder | string | None | A folder’s id (fld_…) for its files only, or none for the files in no folder |
Call it
Request
curl -X POST https://app.scrub.app/v1/tools/list_files \
-H "Authorization: Bearer $SCRUB_KEY" \
-H "Content-Type: application/json" \
-d '{}'Answer
{
"ok": true,
"result": {
"…": "…"
}
}What result holds is said above.
Every call can also answer an error: what comes back. Try it with your key from Account.