Skip to main content
The v2 API is REST + JSON over HTTPS. Every request authenticates with a service account using HTTP Basic, every response is wrapped in a standard envelope, and every error is RFC 7807 ProblemDetails. Base URL
Authentication
Conventions
  • Content-Type: application/json (or multipart/form-data for operating procedure uploads)
  • Property names are camelCase; enum values are PascalCase (Sentinel, High, TwentyFourHours)
  • Workspace IDs and most other identifiers are GUIDs
  • Source segment values: Sentinel, DefenderXDR, CrowdStrike, QRadar, Splunk, SentinelOne, SumoLogic. The segment is case-insensitive, so the lowercased source from a webhook event can be used as is. Any other value returns 400 VALIDATION_ERROR with the accepted values listed under errors.source.

Workspace-Scoped Endpoints

Path prefix: /workspaces/{workspaceId}/... The workspace ID is a GUID and identifies the customer environment the request operates against. The credential’s service account must have a role on the target workspace, otherwise the request returns 403 INSUFFICIENT_WORKSPACE_ROLE.
Every incident is the child of one SIEM source — the source is encoded as a route segment, not a query parameter.
Separate endpoints for the incident summary, entities, alert rules, bulk updates and the high-severity list are not on the v2 surface yet. They will be added once their handlers operate against an explicit source rather than implicitly defaulting to Sentinel. An incident’s entities are already returned in investigationDetails.entities by GET /workspaces/{workspaceId}/incidents/{source}/{incidentId}.

Integration health

GET /workspaces/{workspaceId}/health tells you whether ContraForce can still work with each integration of a workspace. ContraForce checks every connected integration about every 15 minutes. Any workspace role can read it, including Workspace Reader, and so can a service account with datasources:read. To be told when health changes instead of polling, subscribe a webhook to integration.health.changed.v1.
A module that has not been checked yet is left out of modules; there is no “unknown” state. | CrowdStrikeCredentialRejected | Disconnected | true | CrowdStrike refused ContraForce’s API client: its secret was reset or the API client deleted. No detections arrive. | | CrowdStrikeCredentialMissing | Disconnected | true | ContraForce cannot find the client ID or secret saved for CrowdStrike Falcon in the workspace. | | CrowdStrikeAlertsScopeMissing | Disconnected | true | The API client no longer has the Alerts: Read scope, so no detections arrive. | | CrowdStrikeFeatureScopesMissing | Degraded | true | Detections still arrive, but the API client is missing scopes that other features need, such as analyst names, device details, process trees, alert comments, cases or NG-SIEM searches. missingAccess lists them. Scopes the API client never had are an update instead (CrowdStrikeFeatureScopesAdded). | | CrowdStrikeResponseCredentialRejected | Disconnected | true | CrowdStrike refused the API client of CrowdStrike Response (CrowdStrike Response), so gamebook actions on hosts fail. | | CrowdStrikeResponseCredentialMissing | Disconnected | true | ContraForce cannot find the client ID or secret saved for CrowdStrike Response. | | CrowdStrikeResponseScopesMissing | Disconnected | true | The API client of CrowdStrike Response is missing scopes, so gamebook actions on hosts (contain, lift containment, scan) fail. missingAccess lists them. | | HuntressCredentialRejected | Disconnected | true | Huntress refused the API credential saved for the workspace: it was deleted, or its user removed or given a role that cannot read the organization. No incident reports or escalations arrive. | | HuntressOrganizationUnavailable | Disconnected | true | Huntress no longer returns the workspace’s organization to the API credential: the organization was deleted, or the credential may no longer read it. | | HuntressReadAccessMissing | Disconnected | true | Huntress returns the workspace’s organization to the API credential but refuses a list ContraForce reads (escalations or incident reports), for example because the credential’s user has an organization-level role, which cannot view escalations. missingAccess names the refused lists. | | HuntressCredentialMissing | Disconnected | true | ContraForce cannot find the Huntress API secret saved for the workspace. | | Rapid7CredentialRejected | Disconnected | true | Rapid7 refused the API key saved for the workspace (Rapid7 SIEM): it was revoked, or its user removed. No investigations arrive. | | Rapid7AccessMissing | Disconnected | true | Rapid7 accepts the API key but refuses to let it read the workspace’s InsightIDR investigations: the key’s user lost InsightIDR access, or a multi-tenant key no longer reaches the organization. | | Rapid7CredentialMissing | Disconnected | true | ContraForce cannot find the Rapid7 API key saved for the workspace. | | SumoLogicCredentialRejected | Disconnected | true | Sumo Logic refused the OAuth client saved for the workspace: the client was deleted or disabled. No alerts arrive. | | SumoLogicWrongDeployment | Disconnected | true | Sumo Logic answers that the workspace’s organization is not hosted in the saved deployment. No alerts arrive. | | SumoLogicAlertsAccessDenied | Disconnected | true | Sumo Logic accepts the OAuth client but no longer lets it read monitor alerts: the client lost the viewAlerts scope, or its service account the permission to view alerts. missingAccess names a missing scope. | | SumoLogicFeatureScopesMissing | Degraded | true | Alerts still arrive, but the OAuth client is missing scopes that the Monitors and Logs tabs and resolving alerts on close need (viewMonitorsV2, runLogSearch, manageMonitorsV2). missingAccess lists them. Scopes the OAuth client never had are an update instead (SumoLogicFeatureScopesAdded). | | SumoLogicCredentialMissing | Disconnected | true | ContraForce cannot find the Sumo Logic client secret saved for the workspace. | | SentinelOneTokenRejected | Disconnected | true | SentinelOne refused the detection API token saved for the workspace: it expired or was revoked, or its service user was disabled. No threats arrive. | | SentinelOneReadAccessMissing | Disconnected | true | SentinelOne accepts the detection API token but no longer lets it read threats: the service user’s role or scope changed. | | SentinelOneConsoleNotFound | Disconnected | true | The saved management console address no longer answers as a SentinelOne console. | | SentinelOneCredentialMissing | Disconnected | true | ContraForce cannot find the SentinelOne detection API token or console address saved for the workspace. | | SentinelOneResponseTokenRejected | Disconnected | true | SentinelOne refused the API token of SentinelOne Response (SentinelOne Response), so gamebook actions on endpoints fail. | | SentinelOneResponseAccessMissing | Disconnected | true | SentinelOne accepts the SentinelOne Response token but no longer lets it read endpoints, so gamebook actions on them fail. | | SentinelOneResponseCredentialMissing | Disconnected | true | ContraForce cannot find the SentinelOne Response API token saved for the workspace. | For every Defender code the fix is the same: a Global Administrator or Privileged Role Administrator opens the module in the workspace’s Security Modules page and selects Consent, which grants the permissions again. For a CrowdStrike code, fix the API client in the Falcon console (Support and resources > API clients and keys): grant the scopes in missingAccess, or reset the secret and enter the new client ID and secret on the module in the workspace’s Security Modules page. A scope change in the Falcon console applies at once, so testing the connection right after it shows the result. The scopes ContraForce checks follow the workspace’s CrowdStrike license tier: a scope only another tier uses is not checked. For a Huntress code, generate a new API credential in the Huntress portal (your account menu > API Credentials) and enter its key and secret on Huntress in the workspace’s Security Modules page, or, if the customer moved to another Huntress organization, test the connection there and choose it. For HuntressReadAccessMissing, use a credential whose user can view escalations and incident reports, such as an account-level Admin or Security Engineer. ContraForce checks that it can still read the workspace’s organization, its escalations and its incident reports; Huntress does not report whether a credential can write, so a read-only credential is not a health problem. For a Rapid7 code, generate a new key in the Rapid7 Command Platform (Administration > API Key Management) and enter it on Rapid7 SIEM in the workspace’s Security Modules page. For Rapid7AccessMissing, use an organization key or a key whose user can read InsightIDR investigations; for a multi-tenant key, check that the partner account still manages the organization. ContraForce checks that it can read the workspace’s investigations in the saved region; Rapid7 does not report whether a key can write, so a read-only key is not a health problem. For a Sumo Logic code, fix the OAuth client in Sumo Logic (Administration > Account Security Settings > OAuth Clients): give it the scopes in missingAccess, or create a new Client Credentials client with all four required scopes and enter its client ID and secret on Sumo Logic in the workspace’s Security Modules page. For SumoLogicAlertsAccessDenied without a missing scope, give the client’s service account permission to view alerts. For SumoLogicWrongDeployment, select the deployment the organization is hosted in. ContraForce requests a new token on every check, so a scope change shows at the next check. For a SentinelOne code, generate a new API token for the service user in the SentinelOne console and enter it on the module (SentinelOne or SentinelOne Response) in the workspace’s Security Modules page; for an access code, give the service user the SOC role (detection) or the IR Team role (SentinelOne Response), or a custom role with the permissions the configuration page lists. ContraForce checks that each token can read threats (detection) or endpoints (SentinelOne Response); SentinelOne does not report whether a token can write without a write, so the write permissions are not checked. New codes may be added. Treat an unknown code by its state and needsUserAction. ContraForce reports a lost access only after two checks in a row fail, so a permission change still settling does not flip the state. A missing permission that ContraForce reads directly from its own consent (DefenderPermissionsMissing, DefenderFeaturePermissionsMissing, GamebooksDefenderPermissionsMissing, GamebooksDefenderFeaturePermissionsMissing) is reported on the first check. While a module is Disconnected for SentinelAccessLost, SentinelWorkspaceUnreachable, MicrosoftAppAccessRevoked, DefenderPermissionsMissing, DefenderAccessLost or DefenderConsentRevoked, ContraForce stops polling it, and resumes on the first check that succeeds. ContraForce also stops polling CrowdStrike while its Detection module is Disconnected, for the same rule. SentinelQueryAccessLost, DefenderFeaturePermissionsMissing and CrowdStrikeFeatureScopesMissing keep polling, because incidents still arrive, and a Gamebooks for Defender XDR or CrowdStrike Response problem never stops incident polling. A missing CrowdStrike secret (CrowdStrikeCredentialMissing, CrowdStrikeResponseCredentialMissing) is reported on the first check; a rejected API client or a missing scope after two. Every Huntress code stops polling; HuntressCredentialMissing is reported on the first check, the others after two. The same holds for Rapid7: every code stops polling, Rapid7CredentialMissing on the first check and the others after two. For Sumo Logic, every Disconnected code stops polling, SumoLogicCredentialMissing on the first check and the others after two; SumoLogicFeatureScopesMissing keeps polling, because alerts still arrive. Every SentinelOne detection code stops polling, SentinelOneCredentialMissing on the first check and the others after two; a SentinelOne Response problem never stops incident polling.

Updates

When ContraForce adds a permission to one of its Microsoft apps for a new feature, a tenant that consented earlier has not granted it; when it starts using a new CrowdStrike or Sumo Logic scope, an API client created earlier does not have it. ContraForce tells this apart from a permission someone removed: a permission it has seen granted before and now finds missing was removed, which is a problem with a reason code above; a permission it has never seen granted is an update. An update leaves state as it is, sends no webhook or email, and is reported in update: To accept an update of a Microsoft module, have a Global Administrator or Privileged Role Administrator open the module in the workspace’s Security Modules page and select Consent. For CrowdStrike and Sumo Logic, add the scopes to the API client in the vendor’s console; update.fix says where. ContraForce also notices a refusal while it collects incidents, between checks. When Microsoft Sentinel, Microsoft Defender XDR, CrowdStrike Falcon, Huntress, Rapid7, Sumo Logic or SentinelOne refuses at least three collection attempts in a row for the same reason, over at least 15 minutes, the module reports the code its check uses for that refusal, even if the last check passed. It clears as soon as collection succeeds again or Test connection passes; a passing scheduled check alone does not clear it, because the check may not exercise what collection was refused. While it lasts, ContraForce tries to collect once every 45 minutes to find out whether it has recovered.

Testing a connection

POST /workspaces/{workspaceId}/health/test runs the workspace’s checks now, the same checks as the scheduled ones, and returns what each found. It needs datasources:manage (the workspace Owner role) because a Connected result updates the health at once: after fixing a problem, test the connection instead of waiting for the next check. A problem is reported but not saved; the scheduled checks still decide when a module becomes Disconnected. The request has no body. To test one module, pass source and module as query parameters, for example POST /workspaces/{workspaceId}/health/test?source=CrowdStrike&module=Response. Each filter can be used alone. Without them, every module of the workspace is tested. A module other than Detection or Response answers 400; a source the workspace does not have returns an empty modules list. A test checks more than the scheduled checks for CrowdStrike: the scheduled checks only read, so the write scopes (such as Alerts: Write, or Hosts: Write for CrowdStrike Response) are checked only when you test the connection. ContraForce checks a write scope with an empty request that CrowdStrike rejects, so it changes nothing, but the request can appear in the Falcon audit log.
Azure applies a changed role assignment or consent after a delay of up to about 10 minutes, so a test run right after fixing access can still report the problem. result is Connected, Problem (with the reason fields, using the codes above) or NoAnswer when the integration did not answer (throttling, an outage, a timeout), in which case the test says nothing about its health; try again later. For a Problem, state says whether it only limits the module (Degraded: it still does its work, for example incidents still arrive) or stops it (Disconnected); it is null otherwise. missingAccess names the missing scopes, as in the health response. A permission never granted is reported as an update: result is Connected and update says what to grant.

Cross-Workspace Endpoints

These endpoints span every workspace your service account can see — no workspace ID in the path. The handlers filter results to the workspaces the credential has been mapped to.

Paginating /incidents/across-workspaces

The cross-workspace incidents list uses opaque continuation tokens. The first request leaves the token map empty; every subsequent request echoes the previous response’s tokens back unchanged. Tokens are server-encrypted strings — treat them as a single blob the API gave you, never parse or construct one yourself. First request:
Response (truncated):
Next-page request — set isFirstCall: false and pass sourcePageTokens back verbatim as workspacePageTokens:
Iterate until the response returns moreIncidentsAvailable: false. A workspace that has finished paging drops out of sourcePageTokens on subsequent responses; do not synthesize entries for it. Page size is server-controlled. A token that has been modified or hand-built returns 400 VALIDATION_ERROR with the message One or more pagination tokens are invalid. Use the tokens from the previous response unmodified. Recover by restarting from the first call with an empty workspacePageTokens array.

Workspaces that could not be read

One workspace failing never blanks the list for the others: the response still holds every incident that could be read, and unreadableSources names each workspace, or source within one, that could not be. It is an empty list when every workspace was read, so a short or empty page is only complete when unreadableSources is empty.
  • source is null when none of the workspace’s sources could be read.
  • code is the integration health reason code when the source refused ContraForce (for example SentinelAccessLost), or IncidentsReadFailed when the read failed for another reason, such as a timeout or throttling. reason and fix are ContraForce’s text for that code; the vendor’s own error message is never returned.
  • A source listed here has no continuation token, so the next page does not read it again; each response reports its own failures. A refused source keeps failing until its fix is applied; IncidentsReadFailed usually clears on the next request.

Syncing incident updates with filterByLastModified

By default timeFilterSelection bounds the incident’s creation time, so a list call cannot tell you which existing incidents changed. If you mirror incidents into an external system and need to pick up updates, set filterByLastModified: true. The same window then bounds the incident’s last-modified time as recorded by the vendor (Microsoft Sentinel lastModifiedTimeUtc, Microsoft Defender XDR lastUpdateDateTime), and the page is ordered by last-modified time descending. Sentinel and Defender XDR move that timestamp on every change recorded on the incident: an alert grouped in, a severity change, a status change, an owner change, a label, or a comment. Incidents created long before the window are returned as soon as they are touched. Note that the two modes are not equivalent for a bounded window: an incident created inside the window but modified after its end matches the creation-time query and not the last-modified one. In a polling loop whose windows end at the time of each call, that incident simply shows up in the next poll. Polling pattern:
Poll on a fixed cadence, set customStartUtc to your previous customEndUtc minus a short overlap (one or two minutes), page until moreIncidentsAvailable is false, then fetch by id only the incidents whose lastModificationTime differs from the copy you stored. An unchanged incident returned twice because of the overlap compares equal and costs nothing. Things to know:
  • The filter uses the vendor’s last-modified time, not lastActivityTime. lastActivityTime is the event time of the latest alert and is usually earlier than the incident’s creation time; it does not move when an analyst edits the incident.
  • The response carries the incident as it is now, not the fields that changed. Keep comparing against your stored copy.
  • Supported for Sentinel and DefenderXDR. Leave sources empty to query both; naming any other source together with filterByLastModified returns 400 VALIDATION_ERROR (FilterByLastModified is supported for Sentinel, DefenderXDR only; …).
  • Changes that exist only inside ContraForce and are not written to the vendor incident do not move the vendor timestamp.
  • In this mode each workspace’s window is returned in full in one call unless it exceeds the server’s page cap (several hundred incidents per workspace). If moreIncidentsAvailable comes back true, narrow the window and call again rather than paging: vendor continuations are positional, and an incident edited past the window’s end between two calls can shift them. A short polling window never hits the cap.
  • Each page is ordered by last-modified time descending. Sources are merged per page, so if you do page, read every page before assuming you have the full window.

Reporting

The reporting endpoints return the totals, trends and records behind the portal’s reporting page, so you can feed them into your own dashboards and BI tools. They span workspaces, like the other cross-workspace endpoints.
  • Scope: incidents:read. A credential without it gets 403 INSUFFICIENT_SCOPE.
  • Workspaces: a service account reads the workspaces it holds a role on. Leave workspaceIds out to read all of them, or name up to 500. Naming a workspace the service account holds no role on returns 403 FORBIDDEN, the same answer as for an ID that does not exist.
  • Spend: a service account gets the activity counts but not the spend. costUsd, unitPriceUsd and totalTokens are null, costBasis is Restricted, and an investigation export has no cost column.

The selection

Every reporting call is a POST with the selection in the body, because a selection can hold more workspace IDs than fit in a URL:
  • from and to are UTC days, both included. A range spans at most 366 days.
  • Reports with a trend return one point per day for a range of up to 92 days, and one point per month for a longer range. granularity says which (day or month), and each point’s date is yyyy-MM-dd or yyyy-MM.
  • Breakdowns are objects keyed by name in the casing shown on the object models page, such as { "Agent": 71, "Analyst": 52 }.
  • Every report carries a read object describing how it was read (scope, workspaceCount, documentsRead, fromCache, authorizeMs, readMs). It is there for diagnosis; for a service account scope is always workspaces.

Ranking workspaces

/reporting/by-workspace takes the selection plus:
  • metric: received, closed, investigated, actions, breached or atRisk.
  • top: how many workspaces to list, from 1 to 10. The default is 6.
It returns the workspaces with the highest value, highest first, and none with a value of zero. remainder is the total less the listed workspaces, so the breakdown adds up to total, and otherWorkspaces counts the selected workspaces that are not listed.

Reading the records

/reporting/facts returns the records behind a report, one record type at a time. Send the selection, a type, any filters that apply to it, and optionally pageSize (1 to 200, default 50):
  • severity is Informational, Low, Medium or High.
  • rule is an incident title, exactly as closedByRule lists it in the incident-flow report. Other, the remainder in that report, is not a rule and returns 400 VALIDATION_ERROR.
  • A filter that does not apply to the type returns 400 VALIDATION_ERROR.
  • verdict, slaType and tier are matched in any case. Any other value returns 400 VALIDATION_ERROR, and its detail lists the accepted values.
  • closerType, outcome and severity must be written exactly as listed, including case. Any other value is not refused: it matches no records.
Every record carries id, type, workspaceId, day, eventAt and the incident it is about (source, id, number, severity, title), plus the fields of its own type. The fields of other types are null. Paging: a response with a continuationToken has more records. Send the same body again with that token in its continuationToken field to read the next page, until the token comes back null. A page can hold fewer than pageSize records while a token remains. A token belongs to the body it came from: changing the selection or the filters while paging returns 400 VALIDATION_ERROR.

Exporting the records

/reporting/facts/export takes the same body as /reporting/facts, without the paging fields, and returns every matching record as one table:
  • columns: each column’s header and kind (text, number or time).
  • rows: one array of cells per record, in column order. Every cell is a string, or null when the record has no value for it. Times are UTC ISO 8601 and numbers use a period as the decimal separator.
An export holds at most 50,000 rows. A selection with more returns 400 VALIDATION_ERROR; narrow the dates or the filters and try again.

Rate limits

Each service account can make 120 reporting calls a minute, and separately 10 exports a minute. All of a service account’s credentials share these budgets. A call over the limit returns 429 Too Many Requests with an empty body and no Retry-After header. The budget refills at the end of each one-minute window: wait, then retry. Pace bulk pulls to stay under the limit rather than retrying in a tight loop.

Organization-Scoped Endpoints

These endpoints operate on the organization (service provider). The credential’s service account must hold the relevant org-level scope; workspace mappings are not required.
Read (webhooks:read):Manage (webhooks:manage):

What Comes Back

Every successful response is wrapped in the standard envelope:
List endpoints add a pagination block; see the object models page for shapes per endpoint family. Error responses are RFC 7807 ProblemDetails (application/problem+json) with a stable code extension you can switch on — the error reference lists every code.
Last modified on December 4, 2026