getOrganizationList()
Retrieves a list of organizations.
const organizations = await clerkClient.organizations. getOrganizationList();
GetOrganizationListParams
Name | Type | Description |
---|---|---|
limit? | number | The number of results to return. Must be an integer greater than zero and less than 500. |
offset? | number | The number of results to skip. |
query? | string | A search query to filter organizations by. |
Example
getOrganizationList({ limit })
Retrieves organization list that is filtered by the number of results.
const sessions = await clerkClient.organizations.getOrganizationList({ // returns the first 10 results limit: 10, });
getOrganizationList({ offset })
Retrieves organization list that is filtered by the number of results to skip.
const sessions = await clerkClient.organizations.getOrganizationList({ // skips the first 10 results offset: 10, });
getOrganizationList({ query })
Retrieves list of organizations that match the query.
const organizationsMatchingTest = await clerkClient.organizations.getOrganizationList({ query: 'test' })