Hanzo AI
OpenapiSpace

List files

Lists one folder level of a drive. Folder-style by default: sub-folders come back as folder entries, which is the file-manager view.

GET /v1/space/{space}/drives/{drive}/files

Addresshttps://api.hanzo.ai/v1/space/{space}/drives/{drive}/files
MethodGET
Operationget_space_by_space_drives_by_drive_files
AuthAuthorization: Bearer $HANZO_API_KEY

Lists one folder level of a drive.

Folder-style by default: sub-folders come back as folder entries, which is the file-manager view. ?recursive=true lists every file flat under the folder instead. Names are RELATIVE to ?folder=, and the listing is bounded so a huge drive cannot exhaust memory — Total is what came back, not what the drive holds.

Billed per call: the balance is checked BEFORE anything is touched, so an unfunded org is refused with nothing read, and the debit lands only once the listing has succeeded.

Request

4 fields.

FieldInTypeRequiredDescription
spacepathstringyesSpace is the space to list in, from the path.
drivepathstringyesDrive is the drive to list, from the path.
folderquerystring
recursivequerystring

Response

StatusBodyMeaning
200space.fileListok
defaultproblem-detailsrefused

200 body — 10 fields.

FieldInTypeAlwaysDescription
drivebodystringDrive is the drive that was listed.
filesbodyspace.fileItem[]Files are the entries at this level, names RELATIVE to Folder.
files[].etagbodystringETag is the store's entity tag for the bytes currently at this name, with the quotes the store wraps it in stripped.
files[].isFolderbodybooleanFolder is true for a folder entry, which is emergent from "/" in the names beneath it rather than a thing that was created.
files[].modifiedAtbodyinteger (int64)ModifiedAt is when the file was last written, in unix seconds, and 0 for a folder.
files[].namebodystringName is the entry's name RELATIVE to the folder that was listed.
files[].sizebodyinteger (int64)Size is the file's size in bytes, and 0 for a folder.
folderbodystringFolder is the sub-folder the listing was scoped to, cleaned.
spacebodystringSpace is the space that was listed.
totalbodyinteger (int64)Total is how many entries came back. The listing is BOUNDED, so a drive with more files than the cap answers the cap and this says so — it is not a count of…

Failure carries the platform error shape — see Errors.

Examples

hanzo space drives files <space> <drive>

Space API · All Hanzo APIs · Interactive reference

How is this guide?

On this page