Skip to content

Fetch the internal users

Prerequisites

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 number
  • limit: The number of users to return per page (default: 25, maximum: 100)
  • role: Comma-separated list of roles to filter users. Available roles:
    • contact
    • superadmin
    • admin
    • sales
    • external_sales
    • guest
  • sort: Sort order for the results (recommended: createdAt,DESC for descending order by creation time)
Terminal window
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:

Terminal window
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.

Terminal window
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.