DirectorySync
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- deleteDirectory() : void
- Delete a Directory
- getDirectory() : Directory
- Get a Directory
- getGroup() : DirectoryGroup
- Get a Directory Group
- getUser() : DirectoryUserWithGroups
- Get a Directory User
- listDirectories() : PaginatedResponse<string|int, Directory>
- List Directories
- listGroups() : PaginatedResponse<string|int, DirectoryGroup>
- List Directory Groups
- listUsers() : PaginatedResponse<string|int, DirectoryUserWithGroups>
- List Directory Users
Properties
$client read-only
private
HttpClient
$client
Methods
__construct()
public
__construct(HttpClient $client) : mixed
Parameters
- $client : HttpClient
deleteDirectory()
Delete a Directory
public
deleteDirectory(string $id[, RequestOptions|null $options = null ]) : void
Permanently deletes an existing directory. It cannot be undone.
Parameters
- $id : string
-
Unique identifier for the Directory.
- $options : RequestOptions|null = null
Tags
getDirectory()
Get a Directory
public
getDirectory(string $id[, RequestOptions|null $options = null ]) : Directory
Get the details of an existing directory.
Parameters
- $id : string
-
Unique identifier for the Directory.
- $options : RequestOptions|null = null
Tags
Return values
DirectorygetGroup()
Get a Directory Group
public
getGroup(string $id[, RequestOptions|null $options = null ]) : DirectoryGroup
Get the details of an existing Directory Group.
Parameters
- $id : string
-
Unique identifier for the Directory Group.
- $options : RequestOptions|null = null
Tags
Return values
DirectoryGroupgetUser()
Get a Directory User
public
getUser(string $id[, RequestOptions|null $options = null ]) : DirectoryUserWithGroups
Get the details of an existing Directory User.
Parameters
- $id : string
-
Unique identifier for the Directory User.
- $options : RequestOptions|null = null
Tags
Return values
DirectoryUserWithGroupslistDirectories()
List Directories
public
listDirectories([string|null $before = null ][, string|null $after = null ][, int|null $limit = null ][, EventsOrder $order = EventsOrder::Desc ][, string|null $organizationId = null ][, string|null $search = null ][, string|null $domain = null ][, RequestOptions|null $options = null ]) : PaginatedResponse<string|int, Directory>
Get a list of all of your existing directories matching the criteria specified.
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.
- $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.
- $limit : int|null = null
-
Upper limit on the number of objects to return, between
1and100. Defaults to 10. - $order : EventsOrder = EventsOrder::Desc
-
Order the results by the creation time. Defaults to "desc".
- $organizationId : string|null = null
-
Filter Directories by their associated organization.
- $search : string|null = null
-
Searchable text to match against Directory names.
- $domain : string|null = null
-
(deprecated) Filter Directories by their associated domain.
- $options : RequestOptions|null = null
Tags
Return values
PaginatedResponse<string|int, Directory>listGroups()
List Directory Groups
public
listGroups([string|null $before = null ][, string|null $after = null ][, int|null $limit = null ][, EventsOrder $order = EventsOrder::Desc ][, string|null $directory = null ][, string|null $user = null ][, RequestOptions|null $options = null ]) : PaginatedResponse<string|int, DirectoryGroup>
Get a list of all of existing directory groups matching the criteria specified.
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 includebefore="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 includeafter="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
1and100. 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 wherebeforefetches older records andafterfetches newer records). Defaults to descending. Defaults to "desc". - $directory : string|null = null
-
Unique identifier of the WorkOS Directory. This value can be obtained from the WorkOS dashboard or from the WorkOS API.
- $user : string|null = null
-
Unique identifier of the WorkOS Directory User. This value can be obtained from the WorkOS API.
- $options : RequestOptions|null = null
Tags
Return values
PaginatedResponse<string|int, DirectoryGroup>listUsers()
List Directory Users
public
listUsers([string|null $before = null ][, string|null $after = null ][, int|null $limit = null ][, EventsOrder $order = EventsOrder::Desc ][, string|null $directory = null ][, string|null $group = null ][, RequestOptions|null $options = null ]) : PaginatedResponse<string|int, DirectoryUserWithGroups>
Get a list of all of existing Directory Users matching the criteria specified.
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 includebefore="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 includeafter="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
1and100. 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 wherebeforefetches older records andafterfetches newer records). Defaults to descending. Defaults to "desc". - $directory : string|null = null
-
Unique identifier of the WorkOS Directory. This value can be obtained from the WorkOS dashboard or from the WorkOS API.
- $group : string|null = null
-
Unique identifier of the WorkOS Directory Group. This value can be obtained from the WorkOS API.
- $options : RequestOptions|null = null