Fetch the internal users
Prerequisites
- An access token for the HIPE instance
Get the internal users
To get the internal users available in HIPE, you will need to make a GET request to the /api/users endpoint with filters API reference.
page: The page numberlimit: The number of users to return per page (default:25, maximum:100)role: Comma-separated list of roles to filter users. Available roles:contactsuperadminadminsalesexternal_salesguest
sort: Sort order for the results (recommended:createdAt,DESCfor descending order by creation time)
curl --location 'https://{ YOUR INSTANCE }-hipe.packitoo.com/api/users/pagination?page={ PAGE }&limit={ LIMIT }&role={ ROLES }&sort=createdAt,DESC' \--header 'X-ACCESS-TOKEN: { YOUR ACCESS TOKEN }'example:
curl --location 'https://{ YOUR INSTANCE }-hipe.packitoo.com/api/users/pagination?page=1&limit=25&role=contact,superadmin,admin,sales,external_sales,guest&sort=createdAt,DESC' \--header 'X-ACCESS-TOKEN: { YOUR ACCESS TOKEN }'This will return an array of all the available users and a meta object that informs you if more pages are available.
Get roles list
To get the list of available roles in HIPE, make a GET request to the /api/roles endpoint.
curl --location 'https://{ YOUR INSTANCE }-hipe.packitoo.com/api/roles' \--header 'X-ACCESS-TOKEN: { YOUR ACCESS TOKEN }'This will return an array of all the available roles.