For the complete documentation index, see llms.txt. This page is also available as Markdown.

NAS Volume Browser API Reference

How to use the VergeOS volume_browser API to browse NAS volume contents programmatically, including the asynchronous job workflow, polling for results, and troubleshooting common issues.

Overview

Key Points

  • The volume_browser API is asynchronous - create a job, then poll for results

  • You must include ?fields=id,status,result when polling or the result won't be returned

  • Use empty string "" for the root directory path (not /)

  • The NAS service VM must be running to browse volumes

The volume_browser API provides file system browsing capabilities for NAS volumes. This is useful for automation, integrations, and building custom file management tools.

Prerequisites

  • A running NAS service with at least one online volume

  • API access with appropriate permissions

  • The volume's SHA1 key identifier (found in the volume dashboard URL or API)

How It Works

Browsing a volume is a two-step process:

  1. POST to /api/v4/volume_browser to create a browse job

  2. GET to /api/v4/volume_browser/{job_id}?fields=id,status,result to poll for results

Step 1: Create a Browse Request

Endpoint

Request Body

Field Reference

Field
Type
Required
Description

volume

string

Yes

Volume key (SHA1 hash identifier)

query

string

Yes

Operation type: get-dir, rename, delete, paste

params

object

Yes

Query parameters (see below)

Params Object

Field
Type
Description

dir

string

Directory path to browse. Use "" for root.

limit

integer

Maximum number of entries to return (e.g., 1000)

offset

integer/null

Pagination offset, null for first page

filter.extensions

string

Filter by file extensions (empty string for all)

volume

string

Volume key (must match top-level volume)

sort

string

Sort field (empty string for default)

Response

The $key field contains the job ID needed for polling.

Step 2: Poll for Results

Endpoint

Without ?fields=id,status,result:

With ?fields=id,status,result:

Status Values

Status
Description

running

Job is still processing

complete

Job finished successfully

error

Job failed (check result for error message)

Polling Strategy

Result Format

When status is complete, the result field contains an array of file/directory entries:

Entry Fields

Field
Type
Description

name

string

File or directory name

n_name

string

Normalized name (lowercase)

size

integer

Size in bytes

date

integer

Modification time (Unix timestamp)

type

string

"file" or "directory"

Empty Directories

For empty directories, result will be an empty array:

Examples

cURL

Python

Troubleshooting

Common Mistakes

  1. Using path instead of dir - The field is named dir, not path

  2. Sending params as JSON string - The params field must be an object, not a JSON-encoded string

  3. Missing params fields - All fields in the params object are expected

  4. Forgetting ?fields=id,status,result - Without this, no file data is returned

Requirements

  • The NAS service VM must be running to browse volumes

  • The volume must be online (mounted)

  • User must have read permissions on the volume

Additional Resources

Feedback

Need Help?

If you need further assistance or have any questions about this article, please don't hesitate to reach out to the VergeOS Support Team.

Last updated

Was this helpful?