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 cursor request parameter.

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

In: Path

Required: Yes

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: ?cursor=aGVsbG8=

Type: String

In: Querystring

Required: No

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 include* parameters to this operation as you do to the CopyFolder and DeleteFolder operations.

Default: false

Type: Boolean

In: Querystring

Required: No

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

Example: ?folderPath=/uploads

Type: String

Min Length: 1

Max Length: 512

In: Querystring

Required: Yes

If true then files will be included in the result.

Default: true

Type: Boolean

In: Querystring

Required: No

If true then includes files from folders that have overridden storage settings, else skips them.

If the current folder inherits its storage settings from an ancestor folder that has overridden storage settings, then files from the current folder will be included in this operation, regardless of this flag.

You can ignore this setting if your account does not use folders with overridden storage settings (e.g. custom AWS S3 buckets).

Default: true

Type: Boolean

In: Querystring

Required: No

If true then folders automatically created as a result of files being uploaded to them will be included.

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

Default: true

Type: Boolean

In: Querystring

Required: No

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

Default: true

Type: Boolean

In: Querystring

Required: No

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.

Example: ?limit=50

Type: Integer

Minimum: 1

Maximum: 1000

In: Querystring

Required: No

If true then iterates sub-folders recursively.

Default: false

Type: Boolean

In: Querystring

Required: No

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: