Data Types

ListFolder

Lists the folder's contents.

Pagination is complete when the response cursor is null or matches the request cursor.

GET /v2/accounts/{accountId}/folders/list
cURL
1curl "https://api.upload.io/v2/accounts/{accountId}/folders/list?folderPath=/uploads" \
2 -H "Authorization: Bearer YOUR_API_KEY"
Response (200)
1{
2 "cursor": "/uploads/file.jpg",
3 "folder": {
4 "folderPath": "/uploads",
5 "settings": {
6 "description": "This is an example folder description.",
7 "publicPermissions": [
8 {
9 "permissions": {
10 "file": {
11 "downloadFile": [
12 "thumbnail"
13 ]
14 }
15 },
16 "scope": "Children"
17 }
18 ],
19 "storageLayer": {
20 "type": "InternalStorageV2"
21 }
22 },
23 "status": "Deleting",
24 "type": "Folder"
25 },
26 "items": [
27 {
28 "filePath": "/uploads/image.jpg",
29 "fileUrl": "https://upcdn.io/A623uY2/raw/uploads/image.jpg",
30 "lastModified": 1615680311115,
31 "size": 43182,
32 "type": "File"
33 }
34 ]
35}

Response Body

URL Parameters

accountId

Your account ID.

This is visible on the settings page:

https://upload.io/dashboard/settings

Type: String

Length: 7

Example: A623uY2

In: Path

Required: Yes

cursor

Cursor for listing folder items.

Type: String

Min Length: 1

Max Length: 512

Example: ?cursor=/uploads/file.jpg

In: Querystring

Required: No

dryRun

If true the operation will behave as a "dry run" for CopyFolder or DeleteFolder.

Specifically, the operation will return the same set of items the CopyFolder and DeleteFolder operations would run against given the same folderPath and include* filters.

Default: false

Type: Boolean

In: Querystring

Required: No

folderPath

Absolute path to a folder. Must begin with a /. Should not end with a /.

Type: String

Min Length: 1

Max Length: 512

Example: ?folderPath=/uploads

In: Querystring

Required: Yes

includeExternalItems

If true then includes files and physical sub-folders from folders that have overridden storage settings at this level and below.

If false then skips files and physical sub-folders that have been introduced by overridden storage settings at this level and below.

If the current folder inherits its storage settings from an ancestor that has overridden storage settings — e.g. an ancestor folder that's configured to use S3, and this folder inherits those settings — then the files and physical sub-folders of this folder will be included in this operation, regardless of this flag.

Default: true

Type: Boolean

Example: ?includeExternalItems=true

In: Querystring

Required: No

includeFiles

If true then files will be included.

Default: true

Type: Boolean

Example: ?includeFiles=true

In: Querystring

Required: No

includePhysicalFolders

If true then physical folders will be included. Physical folders are folders that are automatically created as a result of uploading files under their path, rather than being created with the PutFolder endpoint.

Default: true

Type: Boolean

Example: ?includePhysicalFolders=true

In: Querystring

Required: No

includeVirtualFolders

If true then virtual folders will be included. Virtual folders are folders that have been explicitly created with the PutFolder endpoint.

Default: true

Type: Boolean

Example: ?includeVirtualFolders=true

In: Querystring

Required: No

limit

The maximum number of items to return.

The response might contain fewer items but will never contain more.

This limit is applied on the unfiltered result, which means the response may contain fewer items than the limit even when there are more items to return. This will occur only when one or more include* flags are set to false.

Type: Integer

Minimum: 1

Maximum: 1000

Example: ?limit=50

In: Querystring

Required: No

recursive

If true then iterates sub-folders recursively.

Physical folders are only included when this flag is set to false.

Default: true

Type: Boolean

Example: ?recursive=true

In: Querystring

Required: No

Request Headers

Authorization

Add one of these Authorization header values to your request:

Option 1: prefix "Bearer " to your API key. The result is your Authorization header value.

Option 2: use HTTP basic authorization, specifying apikey as your username, and your API key as your password.

Type: String

In: Header

Required: Yes

Was this section helpful? Yes No

You are using an outdated browser.

This website requires a modern web browser -- the latest versions of these browsers are supported: