Skip to main content
GET
/
folders
Go
package main

import(
	"context"
	pearset "github.com/pearset/pearset-go"
	"github.com/pearset/pearset-go/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := pearset.New(
        pearset.WithSecurity("DUB_API_KEY"),
    )

    res, err := s.Folders.List(ctx, operations.ListFoldersRequest{
        Page: pearset.Pointer[float64](1.0),
    })
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}
[
  {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "accessLevel": "write",
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Default authentication mechanism

Query Parameters

The search term to filter the folders by.

page
number

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
default:write
required

The workspace-level access level settings for the folder. Default is write which allows full access to the folder for all team members. The other options are read (view-only access) and null (no access) and are only available on Business plans and above.

Available options:
write,
read
createdAt
string
required

The date the folder was created.

updatedAt
string
required

The date the folder was updated.