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 will retrieve a list of computers and groups depending on the parameters passed in. To view the computer groups from a different organization, utilize the managedOrganizationId header to view the computer groups from a different organization/effectively “manage” a different organization from your call.
- Required body/parameters
- Requires valid APIKey/Authorization Token in header
- Optional body/parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- Optional parameters to include
- OSType: Will limit the computer groups displayed to those of the selected OSType, OSTypes to select from:
- All = 0
- Windows = 1
- MAC = 2
- Linux = 3
- Windows XP = 5
- IncludeGlobal: Will determine whether the Global group is displayed in the results.
- Expects true or false
- IncludeOrganizations: Will also include the organizations that the user/currently authorized user has access to. If managing a grand-child 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 organziation.
- Expects true or false
- IncludeParentGroups: 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: 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
- OSType: Will limit the computer groups displayed to those of the selected OSType, OSTypes to select from:
- Permissions
- Super Admin
ComputerGroupGetDropdownWithOrganization
https://portalapi.INSTANCE.threatlocker.com/portalapi/ComputerGroup/ComputerGroupGetDropdownWithOrganization
- Method: GET
- Description: 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 managing a child organization (utilizing the managedOrganizationId field), the parent organizations will not be returned, just the child organizations of the child organization will be returned, effectively the grand-child of the parent organization.
- Required body/parameters
- Requires 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 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
- Edit Computers
- Edit Computer Groups
- View Computers
ComputerGroupGetDropdownByOrganizationId
https://portalapi.INSTANCE.threatlocker.com/portalapi/ComputerGroup/ComputerGroupGetDropdownByOrganizationId
- Method: GET
- Description: This API will return a list of computer groups from a specific organization (managedOrganization). To view the computer groups from a different organization, add a header for “managedOrganizationId” and input the organizationId as the value. 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.)
- Required body/parameters
- Requires valid APIKey/Authorization Token in header
- Optional body/parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- computerGroupOSTypeId: Requires one of the IDs (integers) from below
- Windows = 1
- MAC = 2
- Linux = 3
- Windows XP = 5
- computerOSType: Requires one string associated with the ID entered above
- "windows"
- "mac"
- "linux"
- "windows xp"
- hideGlobals: Will allow you to either hide or display the Global Computer Group. When true is passed in, the Global Computer Group will be hidden from the output and when false, it will be displayed.
- Expects true or false
- Permissions
- Edit Computers
- View Computers
- Install Computers
ComputerGroupGetForDownload
https://portalapi.INSTANCE.threatlocker.com/portalapi/ComputerGroup/ComputerGroupGetForDownload
- Method: GET
- Description: 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.
- OSTypes
- Windows = 1
- MAC = 2
- Linux = 3
- Windows XP = 5
- OSTypes
- Manadatory body/parameters
- Requires valid APIKey/Authorization Token in header
- installKey - 24 characters found on the Computer Groups page
- Permissions
- Since a valid install key is required to call this, no permissions are required