This article will encompass all portalAPI calls that are related to /portalAPI/UserRoles/* endpoints
Be sure to input the instance your organization exists on for each call. This is indicated with the "INSTANCE" text in each endpoint. Linked here is a KB to find your instance:
Locating Your Organization's Instance | ThreatLocker Help Center
UserRolesGetByParameters
https://portalapi.INSTANCE.threatlocker.com/portalapi/UserRoles/UserRolesGetByParameters
- Method: POST
- Description: This API is used when navigating to the Users page in the ThreatLocker Portal and clicking on the Roles tab in the top right corner to display the Roles available for use in the organization. Roles are available per individual organization, no inheritance of Roles from different or child organizations can be used. If looking to view user roles in a different organization than the currently logged in/managed organization, utilize the managedOrganizationId header as described in the Optional Body/Parameters section below.
- Required Body/Parameters
- Requires valid APIKey/Authorization Token in header
- Fields
- pageNumber and pageSize: This value determines how many Roles will be returned as if the response was on the Roles tab of the Users page. However, this field does not follow the same conventions of the pageNumber and pageSize values as the Portal does (pageSize in the Portal is 25, 50, 100, or 500). Any valid integer can be entered and it will return in the selected formatting. For example, no matter the total number of Roles to be returned, if “pageNumber” : 1 and “pageSize” : 2, 2 entries will be returned per page and the first two Roles will be shown.
- Expects: An Integer value
- pageNumber and pageSize: This value determines how many Roles will be returned as if the response was on the Roles tab of the Users page. However, this field does not follow the same conventions of the pageNumber and pageSize values as the Portal does (pageSize in the Portal is 25, 50, 100, or 500). Any valid integer can be entered and it will return in the selected formatting. For example, no matter the total number of Roles to be returned, if “pageNumber” : 1 and “pageSize” : 2, 2 entries will be returned per page and the first two Roles will be shown.
- Required body
{
"pageNumber": <Integer>,
"pageSize": <Integer>
}
- Optional Body/Parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- Fields
- searchText: This field allows you to search through the list of your Roles by inputting any text/details you want to search for. This field will narrow the search based on the name of the Role.
- Expects: Any text input
- searchText: This field allows you to search through the list of your Roles by inputting any text/details you want to search for. This field will narrow the search based on the name of the Role.
- Optional body
{
"pageNumber": <Integer>,
"pageSize": <Integer>,
"searchText": "<String>"
}
- Permissions Needed for User
- Role Administrator