This article will encompass all portalAPI calls that are related to /portalAPI/CMPolicy/* endpoints
If you are new to working with ThreatLocker PortalAPI endpoints and/or have questions regarding authentication and terminology used throughout this article, please look through the following guide:
Table of Contents
CMPolicyGetbyParameters
https://portalapi.INSTANCE.threatlocker.com/portalapi/CMPolicy/CMPolicyGetbyParameters
- Method: POST
- Description: This API is used when navigating to the Config Manager page in the ThreatLocker Portal and selecting the Config Manager tab in the top right corner. This API loads all Config Manager policies on the Config Manager tab that apply in your organization; However, it does not include any policies listed under the Legacy Config tab of the Config Manager page. To view Config Manager policies in a different organization than the currently logged-in/managed organization, use the managedOrganizationId header.
- Required Body/Parameters
- Fields
- appliesTo: This field determines the scope of the policies that will be returned. Any valid organizationId, computerGroupId, or computerId can be entered. When an ID is entered into this field, the search will be narrowed to that specific ID (location). For example, when entering a computerId, the returned policies will be only those applied at that computer, if any are applied at that level. When applicable, ensure the selected ID is within the managedOrganizationId entered in the header. When this field is set to "00000000-0000-0000-0000-000000000000", all policies at any level within the current organization will be returned, dependent on any other fields used.
- Expects: <GUID> in format "00000000-0000-0000-0000-000000000000"
- pageNumber and pageSize: These fields determine how many policies will be returned, as if the response were on the Config Manager page. However, this field does not follow the same conventions for pageNumber and pageSize as the Portal does (the Portal uses 25, 50, or 100 for pageSize). Any valid integer can be entered, and it will return in the selected formatting. For instance, if there are 5 policies to be returned but “pageNumber”: 1 and “pageSize”: 2, 2 entries will be returned per page, and the first two policies will be shown.
- Expects: An Integer value
- status: This field determines which policies will be returned based on the status of the policy. This field expects only one of the corresponding Integer values to be entered.
- Not Configured = -1
- Disabled = 0
- Enabled = 1
- All = 99
- appliesTo: This field determines the scope of the policies that will be returned. Any valid organizationId, computerGroupId, or computerId can be entered. When an ID is entered into this field, the search will be narrowed to that specific ID (location). For example, when entering a computerId, the returned policies will be only those applied at that computer, if any are applied at that level. When applicable, ensure the selected ID is within the managedOrganizationId entered in the header. When this field is set to "00000000-0000-0000-0000-000000000000", all policies at any level within the current organization will be returned, dependent on any other fields used.
- Fields
Required body
{
"appliesTo": "00000000-0000-0000-0000-000000000000",
"pageNumber": <Integer>,
"pageSize": <Integer>,
"status": <Integer>
}
- Optional Body/Parameters
- Fields
- searchText: This field allows you to search through the policies by inputting any text/details you want to search for. When this field is omitted, all policies will be shown based on the other fields used. This field searches for policies by name, with wildcards on either end of the text you enter, and returns only those that match. For example, when entering "ThreatL" into this field, any policy that contains the text "ThreatL" anywhere in the name will be returned.
- Expects: Any text input
- searchText: This field allows you to search through the policies by inputting any text/details you want to search for. When this field is omitted, all policies will be shown based on the other fields used. This field searches for policies by name, with wildcards on either end of the text you enter, and returns only those that match. For example, when entering "ThreatL" into this field, any policy that contains the text "ThreatL" anywhere in the name will be returned.
- Fields
Optional body
{
"appliesTo": "00000000-0000-0000-0000-000000000000",
"pageNumber": <Integer>,
"pageSize": <Integer>,
"searchText": "<String>",
"status": <Integer>
}
- Permissions Needed for User
- View Configuration Manager
- Edit Configuration Manager Policies
Help Center