This article will encompass all portalAPI calls that are related to /portalAPI/Policy/* 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
PolicyGetForViewPoliciesByApplicationId
https://portalapi.INSTANCE.threatlocker.com/portalapi/Policy/PolicyGetForViewPoliciesByApplicationId
- Method: GET
- Description: This API is used when clicking the Modules drop-down menu on the left side of the ThreatLocker® Portal, clicking Application Control, viewing the Applications page, and clicking on the policy icon in the Policies column next to the corresponding application to view the policies attached to the application. This API can be utilized to identify if/how many policies are applied to a specific application and how those policies are applied in the organization (either permitted, permitted with or without a Ringfence™, permitted with or without Elevation, or denied). If looking to narrow/expand the policy search for applications and/or policies in 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
- applicationId: This field determines which application's policies will be returned. To get a list of applicationIds for the applications currently permitted (with or without Ringfencing and/or Elevation), explicitly denied, and/or existing with no policies in your organization, use the ApplicationGetByParameters endpoint, as documented in this article: /portalAPI/Application/* | ThreatLocker Help Center
-
-
- 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 was on the Applications page. However, these fields do not follow the same conventions of the pageNumber and pageSize values as the Portal does (pageSize in the Portal is 25, 50, or 100). 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
-
- Optional Body/Parameters
- In header: "managedOrganizationId": <GUID> in format "00000000-0000-0000-0000-000000000000"
- includeDenies: This field determines whether explicit deny policies will be included when returning the policies associated with the selected application. When set to true, the deny policies will be included/shown. When set to false, or if this field is omitted completely, the deny policies will not be included/shown; Only policies that are set to permit or permit with a Ringfence™, with and without Elevation, will be included/shown.
- Expects: true or false
- Permissions Needed for User
- Edit Application Control Policies