WorkOS PHP SDK

Events
in package

Table of Contents

Properties

$client  : HttpClient

Methods

__construct()  : mixed
listEvents()  : PaginatedResponse<string|int, EventSchema>
List events

Properties

Methods

listEvents()

List events

public listEvents([string|null $before = null ][, string|null $after = null ][, int|null $limit = null ][, EventsOrder $order = EventsOrder::Desc ][, array<string|int, string>|null $events = null ][, string|null $rangeStart = null ][, string|null $rangeEnd = null ][, string|null $organizationId = null ][, RequestOptions|null $options = null ]) : PaginatedResponse<string|int, EventSchema>

List events for the current environment.

Parameters
$before : string|null = null

An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with "obj_123", your subsequent call can include before="obj_123" to fetch a new batch of objects before "obj_123".

$after : string|null = null

An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with "obj_123", your subsequent call can include after="obj_123" to fetch a new batch of objects after "obj_123".

$limit : int|null = null

Upper limit on the number of objects to return, between 1 and 100. Defaults to 10.

$order : EventsOrder = EventsOrder::Desc

Order the results by the creation time. Supported values are "asc" (ascending), "desc" (descending), and "normal" (descending with reversed cursor semantics where before fetches older records and after fetches newer records). Defaults to descending. Defaults to "desc".

$events : array<string|int, string>|null = null

Filter events by one or more event types (e.g. dsync.user.created).

$rangeStart : string|null = null

ISO-8601 date string to filter events created after this date.

$rangeEnd : string|null = null

ISO-8601 date string to filter events created before this date.

$organizationId : string|null = null

Filter events by the Organization that the event is associated with.

$options : RequestOptions|null = null
Tags
throws
WorkOSException
Return values
PaginatedResponse<string|int, EventSchema>

        
On this page

Search results