List folders and prefixes over S3

List a Dosya workspace by prefix and slash delimiter, follow every 1,000-key page, and distinguish file objects from folder common prefixes.

Last reviewed

Dosya maps each workspace to an S3 bucket named by workspace ID. File and folder names become keys; a slash delimiter returns immediate files as objects and immediate folders as CommonPrefixes.

Four-step workflow map for List folders and prefixes over S3: Use the exact workspace ID as the bucket, do not substitute its display name. List with slash delimiter and page limit, request no more than 1,000 keys. Narrow to a child prefix with exact case, keep its trailing slash. Follow continuation tokens page by page, stop when IsTruncated is false.
This map follows list folders and prefixes over s3 from “Use the exact workspace ID as the bucket, do not substitute its display name.” through “List with slash delimiter and page limit, request no more than 1,000 keys.” and “Narrow to a child prefix with exact case, keep its trailing slash.”, ending with “Follow continuation tokens page by page, stop when IsTruncated is false.”. Open full-size screenshot.

Before you start

Use a read-capable or full-access API key with S3 allowed. An upload-only key can list buckets for client handshake but object listing returns AccessDenied: API key scope ‘upload’ cannot list files. The member role must allow both S3 and file access.

A folder-anchored key starts at that folder as its logical root. Prefixes are relative to the anchor, so do not prepend the hidden parent path.

Steps

  1. List buckets and select the exact wks_… value for the workspace; never substitute its display name.
  2. Request the root with delimiter=/ and max-keys at or below 1000.
  3. Separate returned Contents entries from CommonPrefixes; a common prefix ends in / and represents a Dosya folder.
  4. Choose one child prefix such as photos/ and issue the next listing with that exact case and trailing slash.
  5. When IsTruncated is true, pass NextContinuationToken to the following V2 request; V1 clients must continue with NextMarker.
  6. Stop only after the final page reports no truncation, then compare the complete set with the permitted folder in Dosya.
Reference for “List folders and prefixes over S3”: Dosya S3-compatible access overview page.
Reference for “List folders and prefixes over S3”: Dosya S3-compatible access overview page. Open full-size screenshot.

Expected result

The client traverses the accessible Dosya tree without skipping entries after the first 1,000 results. Exact-file prefixes return that file alone, partial name prefixes filter siblings, and a nonexistent prefix returns an empty result rather than broadening to the bucket root.

If the bucket appears but its contents do not, check API-key scope, the member role’s file permission, hidden-file rules, and any folder anchor. A pinned key lists only its pinned workspace.

Was this helpful?

Loading helpfulness results…

Voting saves a necessary ballot cookie for up to 180 days so you can change your answer.

Questions and replies

Ask about the steps in this guide. Questions are reviewed before publication.

Keep account details, credentials and private files out of public questions. Use private support for those.

Loading questions…

    Sign in to your Dosya account to ask a question.

    Check the outcome before you retry

    Use these shared checks when a task needs a second look.