Data Types

ListFolder

Lists the folder's contents.

The result may be paginated: subsequent pages can be requested by passing the cursor from the response into the next request.

Pagination is complete when the response includes isPaginationComplete=true.

GET /v2/accounts/{accountId}/folders/list
cURL
1curl "https://api.bytescale.com/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 "*"
13 ]
14 }
15 },
16 "scope": "Children"
17 }
18 ],
19 "storageLayer": {
20 "type": "InternalStorageV2"
21 }
22 },
23 "type": "Folder",
24 "virtual": true
25 },
26 "isPaginationComplete": true,
27 "items": [
28 {
29 "filePath": "/uploads/image.jpg",
30 "fileUrl": "https://upcdn.io/A623uY2/raw/uploads/image.jpg",
31 "lastModified": 1615680311115,
32 "size": 43182,
33 "type": "File"
34 }
35 ]
36}

Your account ID.

This is visible on the settings page:

https://www.bytescale.com/dashboard/settings

Example: "A623uY2"

Type: String

Length: 7

Pagination cursor. This is used to fetch subsequent pages of results from large folders.

To fetch the next page of results, you must set this to the value of the cursor field from the previous ListFolderResponse.

Pagination is complete when ListFolderResponse contains isPaginationComplete=true.

Example: "aGVsbG8="

Type: String

This parameter allows you to simulate a CopyFolder or DeleteFolder operation without performing the operation.

When set to true this operation will return the same set of items that would be operated on by the CopyFolder and DeleteFolder operations, assuming you provide the same folderPath and filter parameters to this operation as you do to the CopyFolder and DeleteFolder operations.

Default: false

Type: Boolean

Absolute path to a folder. Begins with a /. Should not end with a /.

Example: "/uploads"

Type: String

Min Length: 1

Max Length: 512

If true then files will be included in the result.

Default: true

Type: Boolean

If false then if a file's parent folder has overridden storage settings, the file won't be included in the result.

If you don't use folders with custom storage settings (like AWS S3 buckets), you don't need to worry about this setting.

Default: true

Type: Boolean

If true then folders automatically created by file upload operations will be included.

This field is automatically set to false when recursive=true.

Default: true

Type: Boolean

If true then folders explicitly created using PutFolder will be included.

Default: true

Type: Boolean

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 if you are filtering the result (via the include* flags).

Example: 50

Type: Integer

Minimum: 1

Maximum: 1000

If true then iterates sub-folders recursively.

Default: false

Type: Boolean

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 with apikey as your username and your API key as your password.

For advanced options, please see:

https://www.bytescale.com/docs/auth

Type: String

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: