Skip to content

List versions

listVersions

GET /api/v1/shares/{share_id}/versions

Scope: foldr.readRate cost: 2

The versions of a file its storage keeps, newest first: earlier saves (Foldr’s own hosted storage, S3 and Azure that keep versions, SharePoint) or an SMB server’s shadow copies (Previous Versions)

One page holds them all. Storage that keeps none answers an empty list. Someone who may only read the approved version of a published file is shown that version alone.

Terminal window
curl "$FOLDR/api/v1/shares/$SHARE_ID/versions?path=%2FReports%2Fq3.pdf" \
-H "Authorization: Bearer $TOKEN"

$FOLDR is your site’s address (for example https://files.example.com) and $TOKEN is an access token. See Getting access.

NameInTypeRequiredDescription
share_idpathstringYesThe share’s id.
pathquerystringYesThe path of the file.
StatusMeaningBody
200One page of Versions.application/json: VersionPage

VersionPage:

FieldTypeDescription
itemsarray of VersionRequired. This page’s entries.
next_cursorstring or nullRequired. The cursor for the next page, or null when this is the last.
truncatedbooleanRequired. True when the collection holds more than one listing can read (a folder of more than 25,000 entries): the pages give the first 25,000 the storage lists, and every page of it says true, so a null next_cursor is not the whole folder. False otherwise.

Example:

{
"items": [
{
"id": "string",
"modified": "2026-11-04T09:30:00Z",
"size": 1,
"current": false
}
],
"next_cursor": "string",
"truncated": false
}

Every error is an application/problem+json document (ProblemDetails); branch on its type or code. See Errors.

StatusProblem typesWhen
400invalid-path
invalid-request
One of: Invalid path (invalid-path); Invalid request (invalid-request).
401invalid-tokenInvalid token (invalid-token).
403insufficient-scopeInsufficient scope (insufficient-scope).
404not-foundNot found (not-found).
409ambiguous-path
not-a-file
storage-account-not-connected
One of: Ambiguous path (ambiguous-path); Not a file (not-a-file); Storage account not connected (storage-account-not-connected).
429rate-limitedToo many requests (rate-limited).
500internal-errorInternal error (internal-error).
503share-unavailable
share-unreachable
write-failed
One of: Share unavailable (share-unavailable); Share unreachable (share-unreachable); Write failed (write-failed).