Scrub API
POST/v1/tools/list_filesfree

List 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

FieldTypeDefaultWhat it is
toolstringNoneAn action or tool id, to list only files it takes
inputstringNoneOne of its file inputs, by name
kindarrayNoneOnly these kinds of file: image, video, audio, or document (anything else: PDFs, spreadsheets, text, subtitles, transcripts)
file_idsarrayNoneFiles to include however old, by file_id
namestringNoneOnly files whose name has these words, however old
beforestringNoneThe next page: the files after this file_id, the last one listed
folderstringNoneA 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.