View Source WorkOS.DirectorySync (WorkOS SDK for Elixir v0.1.3)

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.

@see https://docs.workos.com/directory-sync/overview

Link to this section Summary

Functions

Delete 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

Link to this function

delete_directory(directory, opts \\ [])

View Source

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")

Link to this function

get_group(group, opts \\ [])

View Source

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")

Link to this function

get_user(user, opts \\ [])

View Source

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")

Link to this function

list_directories(params, opts \\ [])

View Source

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

example

Example

WorkOS.DirectorySync.list_directories(%{domain: "workos.com"})

Link to this function

list_groups(params, opts \\ [])

View Source

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

example

Example

WorkOS.DirectorySync.list_groups(%{directory: "directory_12345"})

Link to this function

list_users(params, opts \\ [])

View Source

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

example

Example

WorkOS.DirectorySync.list_users(%{directory: "directory_12345"})