/threatlocker:api-patternsfrom threatlocker
Documents ThreatLocker Portal API patterns: raw-key auth (no Bearer prefix), multi-tenant routing via organizationId header, POST-based GetByParameters list endpoints, pagination shape, and child-organization fan-out.
Ships in threatlocker. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The ThreatLocker MCP server wraps the ThreatLocker Portal API
(https://portalapi.g.threatlocker.com/portalapi) and exposes tools
across computers, computer groups, approval requests, audit log
("Action Log" in the UI), and organizations. The API has two quirks
that surprise people: the auth header does NOT use Bearer, and most
"list" endpoints are POSTs against /Entity/EntityGetByParameters with
a structured body — not GETs with query strings.
organizationId header and the childOrganizations flag; the tools
that actually list children, fetch auth keys, and resolve move targets
are threatlocker-organizations.threatlocker-organizations — treat its output as a secret.ThreatLocker authenticates with a raw API key — no Bearer prefix:
| Header | Value |
|---|---|
Authorization | <apiKey> (raw, no prefix) |
ManagedClientId | (optional) for legacy partner setups |
organizationId | (optional) tenant to scope this call to |
Common mistake: Sending
Authorization: Bearer <key>returns 401. Send the key bare.
The API key, optional organization ID and optional instance are stored on
the ThreatLocker connection in Conduit. Conduit injects them on every
request (as X-Threatlocker-Api-Key, X-Threatlocker-Organization-Id and
X-Threatlocker-Instance), and the MCP server turns them into the upstream
headers above. Nothing is set on the client.
ThreatLocker is built for MSPs and uses organizations as the tenant boundary. Three patterns:
organizationId header. The API uses
the API key's primary organization.organizationId to a child org ID to
scope a single call to that tenant.childOrganizations: true
on *GetByParameters endpoints to roll up data across all child
organizations the API key can see.For tenant pivots, see the organizations skill.
| Tool | Description |
|---|---|
threatlocker_computers_list | List computers with pagination/filters |
threatlocker_computers_get | Get full details for one computer |
threatlocker_computers_get_checkins | Recent check-in history |
| Tool | Description |
|---|---|
threatlocker_computer_groups_list | Full group list with metadata |
threatlocker_computer_groups_dropdown | Slim list for selection UIs |
| Tool | Description |
|---|---|
threatlocker_approvals_list | List approval requests |
threatlocker_approvals_get | Single approval with full context |
threatlocker_approvals_pending_count | Quick pending-queue size |
threatlocker_approvals_get_permit_application | Application that would be permitted |
| Tool | Description |
|---|---|
threatlocker_audit_search | Search Action Log by time/host/file |
threatlocker_audit_get | Full record for one action |
threatlocker_audit_file_history | All actions for a given file path/hash |
| Tool | Description |
|---|---|
threatlocker_organizations_list_children | All child orgs visible to the key |
threatlocker_organizations_get_auth_key | Auth key for a specific org |
threatlocker_organizations_for_move_computers | Orgs eligible as move targets |
Most list endpoints are POST /Entity/EntityGetByParameters with a
JSON body. Request shape:
{
"pageNumber": 1,
"pageSize": 50,
"isAscending": false,
"orderBy": "lastCheckin",
"searchText": "",
"childOrganizations": false
}
Response shape:
{
"totalItems": 1284,
"items": [ /* array of entities */ ]
}
ThreatLocker uses page numbers, not cursors:
pageNumber: 1, pageSize: 50 (or 100/200).totalPages = ceil(totalItems / pageSize).totalItems rows or reached
the last page.Avoid huge pageSize values — large pages can time out. 50–200 is the
sweet spot.
orderBy is an entity-specific column name (e.g. lastCheckin,
computerName).isAscending toggles direction.searchText is a substring match across the entity's searchable
columns (computer name, hostname, OS, etc.).| Code | Meaning | Fix |
|---|---|---|
| 401 | Bad API key OR Bearer prefix included | Send raw key |
| 403 | Key valid, but no access to requested org | Check organizationId |
| 404 | Wrong endpoint or unknown entity ID | Recheck path |
| 429 | Rate limited | Backoff and retry |
| 500 | Portal API hiccup | Retry, then escalate |
pageSize: 100 and paginate; always check totalItems
before assuming you have the full set.childOrganizations: true
rather than looping per-org when the entity supports it.threatlocker_organizations_list_children —
child org lists rarely change within a session.organizationId explicitly when generating client-facing
reports so the source tenant is unambiguous.What SKILL.md sets; muted values are Claude Code's defaults
When working with ThreatLocker auth headers, multi-tenant requests, POST-based list endpoints, pagination, or fanning queries across child organizations. Use when: threatlocker api, threatlocker authentication, threatlocker pagination, threatlocker organizationid, threatlocker mcp, threatlocker tools, threatlocker child organizations, threatlocker getbyparameters, or threatlocker portalapi.
Three short reads, in order
npx claudepluginhub wyre-ai/msp-claude-plugins --plugin threatlocker6 skills in this plugin
/approval-requestsThreatLocker Approval RequestsThreatLocker application approval request triage: pulling the pending queue, grouping requests by application and hash, signed-publisher and path heuristics, and approve/deny recommendations with audit-friendly reasoning.
/audit-logThreatLocker Audit LogThe ThreatLocker Action Log (the API name is "audit"): incident timelines, tracing a file's history across endpoints, repeated-denial detection, and correlating policy bypasses or audit-only matches with user and computer context.
/computer-groupsThreatLocker Computer GroupsThreatLocker computer groups — the policy-scoping boundary that determines which allow/deny rules apply to which endpoints. Covers listing groups, mapping a computer to its group, and the difference between the dropdown and full list endpoints.
/computersThreatLocker ComputersThreatLocker-protected endpoints: fleet inventory, identifying offline agents, a single computer's check-in history, and correlating computers across organizations and groups.
/organizationsThreatLocker OrganizationsThe ThreatLocker MSP multi-tenant model: enumerating child organizations, retrieving per-org auth keys, and identifying valid move targets when relocating computers between tenants.
Other plugins' skills for the same job