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(array<string|int, string> $events[, string|null $after = null ][, int|null $limit = null ][, DateTimeImmutable|null $rangeStart = null ][, DateTimeImmutable|null $rangeEnd = null ][, string|null $organizationId = null ][, RequestOptions|null $options = null ]) : PaginatedResponse<string|int, EventSchema>

List events for the current environment. Events are returned oldest first; use after to page forward.

Parameters
$events : array<string|int, string>

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

$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.

$rangeStart : DateTimeImmutable|null = null

ISO 8601 UTC timestamp with a Z suffix to filter events created after this date. Timezone offsets such as +00:00 are not accepted.

$rangeEnd : DateTimeImmutable|null = null

ISO 8601 UTC timestamp with a Z suffix to filter events created before this date. Timezone offsets such as +00:00 are not accepted.

$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