Skip to main content
Retrieves a paginated list of all segments.

Methods

List

Lists all segments using the default background context.

ListWithContext

Lists all segments with a custom context for cancellation and timeout control.

ListWithOptions

Lists segments with pagination options.

Query Parameters

When using ListWithOptions, you can pass a ListOptions struct with the following fields:
number
The maximum number of segments to return per page.
number
The number of segments to skip before starting to return results.

Response

string
The object type, always list.
Segment[]
An array of segment objects.
boolean
Indicates whether there are more segments available beyond the current page.

Example

Example with pagination