Skip to main content

List groups

Group resources can be retrieved as a paged list by passing an optional GroupListOptions object as an argument.

list(options?: GroupListOptions): Promise<PagedList<Group>>

Returns

A Promise that will resolve with a PagedList that contains an array of Group objects.

Example

JavaScript
client.security.groups.list({
        q: 'Administrators',
        pageOptions: { pageIndex: 1, pageSize: 5 },
        order: ['name']
  })
  .then(result => {      
    console.log('API call result: ', result);              
  })
  .catch(error => {
    console.log('API call error: ', error);      
});

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request