View Source WorkOS.DirectorySync (WorkOS SDK for Elixir v0.3.0)
The Directory Sync module provides convenience methods for working with the WorkOS Directory Sync platform. You'll need a valid API key and to have created a Directory Sync connection on your WorkOS dashboard.
Link to this section Summary
Functions
Delete the directory with the given ID.
Retrieve the directory with the given ID.
Retrieve the directory group with the given ID.
Retrieve the directory group with the given ID.
Retrieve directories.
Retrieve directory groups.
Retrieve directory users.
Link to this section Functions
Delete the directory with the given ID.
parameters
Parameters
- directory (string) the id of the directory to delete
example
Example
WorkOS.DirectorySync.delete_directory("directory_12345")
Retrieve the directory with the given ID.
parameters
Parameters
- directory (string) the id of the directory to retrieve
example
Example
WorkOS.DirectorySync.get_directory("directory_12345")
Retrieve the directory group with the given ID.
parameters
Parameters
- group (string) the id of the group to retrieve
example
Example
WorkOS.DirectorySync.get_group("directory_group_12345")
Retrieve the directory group with the given ID.
parameters
Parameters
- user (string) the id of the user to retrieve
example
Example
WorkOS.DirectorySync.get_user("directory_user_12345")
Retrieve directories.
parameters
Parameters
- params (map)
- domain (string) the id of the domain to list directories for
- search (string) the keyword to search directories for
- limit (number - optional) Upper limit on the number of objects to return, between 1 and 100. The default value is 10
- before (string - optional) An object ID that defines your place in the list
- after (string - optional) An object ID that defines your place in the list
- order ("asc" or "desc" - optional) Supported values are "asc" and "desc" for ascending and descending order respectively
- organization_id (string) the id of the organization to list directories for
example
Example
WorkOS.DirectorySync.list_directories(%{domain: "workos.com"})
Retrieve directory groups.
parameters
Parameters
- params (map)
- directory (string) the id of the directory to list groups for
- user (string) the id of the user to list groups for
- limit (number - optional) Upper limit on the number of objects to return, between 1 and 100. The default value is 10
- before (string - optional) An object ID that defines your place in the list
- after (string - optional) An object ID that defines your place in the list
- order ("asc" or "desc" - optional) Supported values are "asc" and "desc" for ascending and descending order respectively
example
Example
WorkOS.DirectorySync.list_groups(%{directory: "directory_12345"})
Retrieve directory users.
parameters
Parameters
- params (map)
- directory (string) the id of the directory to list users for
- group (string) the id of the group to list users for
- limit (number - optional) Upper limit on the number of objects to return, between 1 and 100. The default value is 10
- before (string - optional) An object ID that defines your place in the list
- after (string - optional) An object ID that defines your place in the list
- order ("asc" or "desc" - optional) Supported values are "asc" and "desc" for ascending and descending order respectively
example
Example
WorkOS.DirectorySync.list_users(%{directory: "directory_12345"})