Skip to main content
GET
/
folders
PHP
declare(strict_types=1);

require 'vendor/autoload.php';

use Dub;

$sdk = Dub\Dub::builder()
    ->setSecurity(
        'DUB_API_KEY'
    )
    ->build();



$response = $sdk->folders->list(
    page: 1,
    pageSize: 50

);

if ($response->folderSchemas !== null) {
    // handle response
}
[
  {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "type": "default",
    "accessLevel": null,
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

The search term to filter the folders by.

page
number
default:1

The page number for pagination.

Required range: x > 0
Example:

1

pageSize
number
default:50

The number of items per page.

Required range: 0 < x <= 50
Example:

50

Response

A list of folders

id
string
required

The unique ID of the folder.

name
string
required

The name of the folder.

description
string | null
required

The description of the folder.

type
enum<string>
required
Available options:
default,
mega
accessLevel
enum<string> | null
required

The access level of the folder within the workspace.

Available options:
write,
read
createdAt
string
required

The date the folder was created.

updatedAt
string
required

The date the folder was updated.