This article will encompass all portalAPI calls that are related to /portalAPI/ComputerGroup/* 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
ComputerGroupGetGroupAndComputer
https://portalapi.INSTANCE.threatlocker.com/portalapi/ComputerGroup/ComputerGroupGetGroupAndComputer
- Method: GET
- Description: This API is used in most sidebars where policies are configured in the ThreatLocker Portal, including but not limited to, Application Control Policies, Storage Control Policies, and Network Control Policies. This API will retrieve a list of computers and groups depending on the parameters passed into the endpoint. If looking to view the computer groups from a different organization than the currently logged in/managed organization, utilize the managedOrganizationId header as described below.
- Required Body/Parameters
- Valid APIKey/Authorization Token in header
- Optional Body/Parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- OSType: This field will limit the computer groups displayed to those of the selected OSType, OSTypes to select from are listed below and this field expects the Integer associated with the OSType:
- All = 0
- Windows = 1
- MAC = 2
- Linux = 3
- Windows XP = 5
- includeGlobal: This field will determine whether the Global group, used for permitting applications on a global scale across your organization(s), is displayed in the results.
- Expects: true or false
- includeOrganizations: This field can also include the organizations that the user/currently authorized user has access to. If managing a grandchild organization, only the grand-child organization will be displayed. If managing a child organization, the parent organization and any child organizations of that child will be displayed, a grand-child of the parent organization.
- Expects: true or false
- includeParentGroups: This field will show all the parent computer groups, of the organization currently managed as long as the currently logged-in/authenticated user has access to the organization, including grandparents of the currently managed organization.
- Expects: true or false
- includeLoggedInObjects: This field will display additional information in the “label” fields of each computer group, computer, and organizations. For instance, if the organizations that are a direct parent of the currently managedOrganization will show “PARENT\\organizationName”, for the computer groups it will show “organizationName\\computerGroupName”, and for computers it will show “organizationName\\computerGroupName\\computerName”
- Expects: true or false
- Permissions Needed for User
- Super Admin
ComputerGroupGetDropdownWithOrganization
https://portalapi.INSTANCE.threatlocker.com/portalapi/ComputerGroup/ComputerGroupGetDropdownWithOrganization
- Method: GET
- Description: This API is used when copying policies from their respective pages, when looking to move computers on the Devices page, and when selecting to view computers from all child organizations on the Devices page in the ThreatLocker Portal. This API will return a list of all computer groups, including child organizations, and the organizations where they apply. This can be used to get all of the computer groups that can be installed into. The “label” field indicates the name of the organization or computer group. The “value” field is the organzationId or computerGroupId. When using the managedOrganizationId header, only the current organization and any child of the current organization will be displayed, unless the includeAvailableOrganizations field is used as described below.
- Required Body/Parameters
- Valid APIKey/Authorization Token in header
- Optional Body/Parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- includeAvailableOrganizations: Will include a list of all the computer groups, including child AND parent organizations, and the organizations where they apply for any organization the effectively "logged in"/authenticated user has access to, regardless of the managedOrganizationId passed in.
- Permissions Needed for User
- Edit Computers
- Edit Computer Groups
- View Computers
ComputerGroupGetDropdownByOrganizationId
https://portalapi.INSTANCE.threatlocker.com/portalapi/ComputerGroup/ComputerGroupGetDropdownByOrganizationId
- Method: GET
- Description: This API is used on the Devices page in the ThreatLocker Portal when viewing an invidual computer and is typically used to load the computer groups where the computer can be moved to within the organization. This API will return a list of computer groups from a specific organization. To narrow the search results down more to specific OS Types, it is important to use both the computerGroupOSTypeId field and the computerOSType fields. Ensure that the computerGroupOSTypeId and the computerOSType apply to the same operating system and do not conflict. (1 goes with "windows", 2 goes with "mac", etc.). If looking to view the computer groups from a different organization than the currently logged in/managed organization, utilize the managedOrganizationId header as described below.
- Required Body/Parameters
- Valid APIKey/Authorization Token in header
- Optional Body/Parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- computerGroupOSTypeId: This field expexts one of the Intergers from below to be entered AND should correspond with the computerOSType field from below:
- Windows = 1
- MAC = 2
- Linux = 3
- Windows XP = 5
- computerOSType: This field expects one of the strings from below to be entered AND should correspond with the ID entered above:
- "windows"
- "mac"
- "linux"
- "windows xp"
- Permissions Needed for User
- Edit Computers
- View Computers
- Install Computers
ComputerGroupGetForDownload
https://portalapi.INSTANCE.threatlocker.com/portalapi/ComputerGroup/ComputerGroupGetForDownload
- Method: GET
- Description: This API is used on the Devices page in the ThreatLocker Portal when selecting the Install Computer button and selecting a computer group to install into. This API will display the installation information for a computer group, including organizationId, name, OSType, whether the EULA has been accepted, whether a computer can be installed into the computer group, and whether there is a valid install link for the group. Utilize the install key for the computer group you would like to return the information from.
- Manadatory Body/Parameters
- Valid APIKey/Authorization Token in header
- installKey - 24 characters found on the Computer Groups page
- Optional Body/Parameters
- N/A
- Permissions Needed for User
- Since a valid install key is required to call this, no permissions are required