{"openapi":"3.1.0","info":{"title":"Hermes","version":"1.0.0","description":"Hermes is a read-only REST API over the Octiga tenant cache: the directory, mail-flow and risk data Octiga already holds for every tenant of an MSP, served in the shape of the Microsoft Graph and Exchange Online endpoints it came from, plus a live pass-through to Graph for what the cache does not hold. Every /v1 call authenticates with an API key (oct_<env>_...) or a Hermes OAuth 2.1 access token, is scoped to the caller's MSP and tenants, and is limited to 600 requests a minute per key (60 live Graph calls a minute per tenant)."},"servers":[{"url":"https://api.stagingoctiga.com"}],"security":[{"bearerAuth":[]}],"paths":{"/":{"get":{"summary":"Landing page","security":[],"responses":{"200":{"description":"An HTML page describing Hermes and linking its documents.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["OAuth"],"summary":"OAuth 2.1 authorization-server metadata (RFC 8414)","responses":{"200":{"description":"The metadata document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthMetadata"}}}}},"security":[]}},"/.well-known/oauth-protected-resource":{"get":{"tags":["OAuth"],"summary":"Protected-resource metadata (RFC 9728)","responses":{"200":{"description":"The metadata document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthMetadata"}}}}},"security":[]}},"/oauth/authorize":{"get":{"tags":["OAuth"],"summary":"Authorization endpoint (code + PKCE S256) — serves the consent page","parameters":[{"schema":{"type":"string","enum":["code"]},"required":true,"name":"response_type","in":"query"},{"schema":{"type":"string"},"required":true,"name":"client_id","in":"query"},{"schema":{"type":"string"},"required":true,"name":"redirect_uri","in":"query"},{"schema":{"type":"string","description":"S256 PKCE challenge, 43-128 characters."},"required":true,"description":"S256 PKCE challenge, 43-128 characters.","name":"code_challenge","in":"query"},{"schema":{"type":"string","enum":["S256"]},"required":true,"name":"code_challenge_method","in":"query"},{"schema":{"type":"string","enum":["read"]},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string"},"required":false,"name":"state","in":"query"},{"schema":{"type":"string","description":"RFC 8707; repeatable. Hermes and Nereus resource URIs are accepted."},"required":false,"description":"RFC 8707; repeatable. Hermes and Nereus resource URIs are accepted.","name":"resource","in":"query"}],"responses":{"200":{"description":"The consent page (HTML).","content":{"text/html":{"schema":{"type":"string"}}}},"302":{"description":"An error redirected to the client (`error`, `error_description`, `state`, `iss`)."},"400":{"description":"The client or redirect URI is not valid; not redirected."}},"security":[]}},"/oauth/authorize/complete":{"post":{"tags":["OAuth"],"summary":"Complete an authorize request with the user’s Entra access token (called by the consent page)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeCompleteRequest"}}}},"responses":{"200":{"description":"Where to send the browser next.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeCompleteResponse"}}}},"401":{"description":"`invalid_token` — the Entra token did not verify."},"403":{"description":"`access_denied` — the Microsoft account has no Octiga user."},"404":{"description":"`invalid_request` — the authorize request is unknown or expired."}},"security":[]}},"/oauth/callback":{"get":{"tags":["OAuth"],"summary":"Where Entra returns the browser after sign-in (HTML, finishes the flow)","responses":{"200":{"description":"The sign-in page (HTML).","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[]}},"/oauth/jwks.json":{"get":{"tags":["OAuth"],"summary":"The access-token verification keys (JWKS)","responses":{"200":{"description":"A JSON Web Key Set with one EC P-256 signing key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Jwks"}}}}},"security":[]}},"/oauth/register":{"post":{"tags":["OAuth"],"summary":"Dynamic client registration (RFC 7591) — public clients only","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientRegistrationRequest"}}}},"responses":{"201":{"description":"The registered client (no secret is ever issued).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientRegistration"}}}},"400":{"description":"`invalid_redirect_uri` or `invalid_client_metadata`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"Too many registrations from this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}},"security":[]}},"/oauth/revoke":{"post":{"tags":["OAuth"],"summary":"Revoke a refresh token (and its family) — RFC 7009","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/RevokeRequest"}}}},"responses":{"200":{"description":"Always, for any presented token."},"400":{"description":"`invalid_request` — no `token` parameter."}},"security":[]}},"/oauth/token":{"post":{"tags":["OAuth"],"summary":"Token endpoint: authorization_code (PKCE S256) and refresh_token (rotating)","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TokenRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}}},"responses":{"200":{"description":"The tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"RFC 6749 §5.2 error (`invalid_request`, `invalid_grant`, `invalid_scope`, `invalid_target`, …).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"`invalid_client` — unknown `client_id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"Rate limited; see `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}}},"security":[]}},"/openapi.json":{"get":{"summary":"This OpenAPI document","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document of Hermes.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/alerts":{"get":{"operationId":"listAlerts","summary":"Alerts across the MSP, newest first","description":"The Microsoft events that raised an alert, baseline deviations and notifications, for every tenant the caller may read.\nFollow `@odata.nextLink` for the next page.","tags":["Monitoring"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Window start: a date (`2026-11-01`, UTC) or a date-time with an offset. Default: 7 days before `to`."},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","description":"Window end, inclusive (a date means the whole day). Default: now. The window may span at most 30 days."},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","description":"One or more of info, warning, danger, critical, comma-separated."},"required":false,"name":"severity","in":"query"},{"schema":{"type":"string","enum":["true","false","all"],"description":"`true` only dismissed, `false` hide dismissed, `all` (default) both."},"required":false,"name":"dismissed","in":"query"},{"schema":{"type":"string","description":"Free text matched against actor, affected user and description."},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","description":"Rows per page, 1 to 200 (default 50)."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. Valid for one hour, for the same caller and the same filters."},"required":false,"name":"$skiptoken","in":"query"},{"schema":{"type":"string","description":"One or more of event, deviation, notification, comma-separated."},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","description":"One or more tenant ids, comma-separated, to narrow to. A tenant the caller may not read is ignored."},"required":false,"name":"tenantId","in":"query"}],"responses":{"200":{"description":"A page of alerts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringList"}}}},"400":{"description":"`unsupported_query_option`, `invalid_request`, `window_too_large` or `invalid_skiptoken` (expired, or sent with other filters).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`monitoring_rate_limited` (per minute, per MSP and key or client, across all tenants: 20 reads plus 1 per tenant, at most 60; following `@odata.nextLink` does not count), with `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`monitoring_unavailable`: the store is not configured here, failed, or did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/alerts/{id}":{"get":{"operationId":"getAlert","summary":"One alert in full","description":"The alert or event behind an `id` from a list: where it came from, what the rules did on arrival, and what operators did since. The event-only fields are `null` for a deviation or a notification.","tags":["Monitoring"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"The opaque alert id from a list."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The alert.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDetail"}}}},"404":{"description":"`not_found`: no such alert for this caller (an unknown id and an alert of a tenant the caller may not read are the same answer).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`monitoring_rate_limited` (per minute, per MSP and key or client, across all tenants: 20 reads plus 1 per tenant, at most 60; following `@odata.nextLink` does not count), with `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`monitoring_unavailable`: the store is not configured here, failed, or did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/fleet/posture":{"get":{"operationId":"getFleetPosture","summary":"Baselines, account risks and freshness of every tenant the caller may read","description":"One row per tenant `GET /v1/tenants` lists, read from each tenant’s summaries in three queries for the whole MSP. A tenant whose compliance or risk summary is not written yet has no `baselines` or `risks` block (never zeros). The risk counts leave dismissed findings out, like `GET /v1/tenants/{tenantId}/risks/summary`; a row says `dismissalsApplied: false` in the rare case its dismissals were not applied. Unsorted: the order is the tenant list’s.","tags":["Tenants"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FleetPosture"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled` / `risk_journal_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants":{"get":{"operationId":"listTenants","summary":"The caller’s tenants that Stolos ingests","description":"The caller’s MSP tenants from Aurora (active, within the key’s tenant scope) that have a `SUMMARY#FRESHNESS` item in the Stolos cache. Tenants Stolos does not ingest are not listed.","tags":["Tenants"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The tenants.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantList"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/baselines":{"get":{"operationId":"listBaselines","summary":"Baseline verdicts of a tenant and its users","description":"Octiga’s verdict on each baseline — `passing`, `deviated` or `none` — for the tenant’s own baselines and its users’ baselines, from the Stolos cache. `verdict=deviated` lists only deviations; `scope=user&verdict=deviated` is \"which users deviate\"; `userId` is one user’s baselines. A page holds at most `limit` rows and may hold fewer; follow `@odata.nextLink` until it is absent. A deployed baseline that has not been evaluated yet is not listed.","tags":["Baselines"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","enum":["tenant","user","all"],"description":"`tenant`, `user` or `all` (default; `user` when `userId` is given)."},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string","enum":["passing","deviated","none"],"description":"Keep only rows of this verdict."},"required":false,"name":"verdict","in":"query"},{"schema":{"type":"string","format":"uuid","description":"One user’s baselines (object id)."},"required":false,"name":"userId","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size, 1 to 100 (default 100)."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. The only query option the cache honours; with any other option a Graph request is answered live."},"required":false,"name":"$skiptoken","in":"query"}],"responses":{"200":{"description":"A page of verdicts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaselineVerdicts"}}}},"400":{"description":"`invalid_request`, `unsupported_query_option` or `invalid_skiptoken`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/events":{"get":{"operationId":"listEvents","summary":"One tenant’s graded Microsoft events, newest first","description":"Every Microsoft audit event Octiga ingested for the tenant, with the grade it was given (`info` included).\nFollow `@odata.nextLink` for the next page.","tags":["Monitoring"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","description":"Window start: a date (`2026-11-01`, UTC) or a date-time with an offset. Default: 7 days before `to`."},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","description":"Window end, inclusive (a date means the whole day). Default: now. The window may span at most 30 days."},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","description":"One or more of info, warning, danger, critical, comma-separated."},"required":false,"name":"severity","in":"query"},{"schema":{"type":"string","enum":["true","false","all"],"description":"`true` only dismissed, `false` hide dismissed, `all` (default) both."},"required":false,"name":"dismissed","in":"query"},{"schema":{"type":"string","description":"Free text matched against actor, affected user and description."},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","description":"Rows per page, 1 to 200 (default 50)."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. Valid for one hour, for the same caller and the same filters."},"required":false,"name":"$skiptoken","in":"query"}],"responses":{"200":{"description":"A page of events (`@octiga.tenantId` names the tenant).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringList"}}}},"400":{"description":"`unsupported_query_option`, `invalid_request`, `window_too_large` or `invalid_skiptoken` (expired, or sent with other filters).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"`monitoring_rate_limited` (per minute, per MSP and key or client, across all tenants: 20 reads plus 1 per tenant, at most 60; following `@odata.nextLink` does not count), with `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`monitoring_unavailable`: the store is not configured here, failed, or did not answer in time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/exchange/{resource}":{"get":{"operationId":"exchangeGet1","summary":"Exchange / SharePoint cache","description":"A tenant-level configuration object, or the collection of a policy list / the mailboxes of the tenant. Cache only; the objects carry the cmdlet's property names, as stored. Only `$skiptoken` is honoured.","tags":["Exchange"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","description":"The kebab-case resource: organization-config, transport-config, admin-audit-log-config, transport-rules, remote-domains, dkim-signing-configs, malware-filter-policies, eop-protection-policy-rules, anti-phish-policies, hosted-content-filter-policies, hosted-outbound-spam-filter-policies, quarantine-policies, safe-attachment-policies, safe-links-policies, mobile-device-mailbox-policies, spo-tenant, mailboxes, cas-mailboxes."},"required":true,"name":"resource","in":"path"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. The only query option the cache honours; with any other option a Graph request is answered live."},"required":false,"name":"$skiptoken","in":"query"}],"responses":{"200":{"description":"A cached collection or object.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExchangeCacheCollection"},{"$ref":"#/components/schemas/ExchangeCacheObject"}]}}}},"400":{"description":"`unsupported_query_option` (only `$skiptoken` is honoured) or `invalid_skiptoken`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found, `unknown_resource` (the body lists the known names), or the object is not in the cache.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/exchange/{resource}/{id}":{"get":{"operationId":"exchangeGet2","summary":"Exchange / SharePoint cache","description":"One object of a collection resource. Cache only; the objects carry the cmdlet's property names, as stored. Only `$skiptoken` is honoured.","tags":["Exchange"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","description":"The kebab-case resource: organization-config, transport-config, admin-audit-log-config, transport-rules, remote-domains, dkim-signing-configs, malware-filter-policies, eop-protection-policy-rules, anti-phish-policies, hosted-content-filter-policies, hosted-outbound-spam-filter-policies, quarantine-policies, safe-attachment-policies, safe-links-policies, mobile-device-mailbox-policies, spo-tenant, mailboxes, cas-mailboxes."},"required":true,"name":"resource","in":"path"},{"schema":{"type":"string","description":"The object’s `Identity` (policies), or the user object id (mailboxes)."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. The only query option the cache honours; with any other option a Graph request is answered live."},"required":false,"name":"$skiptoken","in":"query"}],"responses":{"200":{"description":"A cached collection or object.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExchangeCacheCollection"},{"$ref":"#/components/schemas/ExchangeCacheObject"}]}}}},"400":{"description":"`unsupported_query_option` (only `$skiptoken` is honoured) or `invalid_skiptoken`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found, `unknown_resource` (the body lists the known names), or the object is not in the cache.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/exchange/{resource}/{id}/{sub}":{"get":{"operationId":"exchangeGet3","summary":"Exchange / SharePoint cache","description":"A per-mailbox sub-resource (`mailboxes/{oid}/<sub>`). Cache only; the objects carry the cmdlet's property names, as stored. Only `$skiptoken` is honoured.","tags":["Exchange"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","description":"The kebab-case resource: organization-config, transport-config, admin-audit-log-config, transport-rules, remote-domains, dkim-signing-configs, malware-filter-policies, eop-protection-policy-rules, anti-phish-policies, hosted-content-filter-policies, hosted-outbound-spam-filter-policies, quarantine-policies, safe-attachment-policies, safe-links-policies, mobile-device-mailbox-policies, spo-tenant, mailboxes, cas-mailboxes."},"required":true,"name":"resource","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The user object id."},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"cas-mailbox, mailbox-settings, inbox-rules, mail-folders, mailbox-permissions, recipient-permissions."},"required":true,"name":"sub","in":"path"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. The only query option the cache honours; with any other option a Graph request is answered live."},"required":false,"name":"$skiptoken","in":"query"}],"responses":{"200":{"description":"A cached collection or object.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExchangeCacheCollection"},{"$ref":"#/components/schemas/ExchangeCacheObject"}]}}}},"400":{"description":"`unsupported_query_option` (only `$skiptoken` is honoured) or `invalid_skiptoken`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found, `unknown_resource` (the body lists the known names), or the object is not in the cache.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/exchange/{resource}/{id}/{sub}/{subId}":{"get":{"operationId":"exchangeGet4","summary":"Exchange / SharePoint cache","description":"One item of a per-mailbox collection sub-resource. Cache only; the objects carry the cmdlet's property names, as stored. Only `$skiptoken` is honoured.","tags":["Exchange"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","description":"The kebab-case resource: organization-config, transport-config, admin-audit-log-config, transport-rules, remote-domains, dkim-signing-configs, malware-filter-policies, eop-protection-policy-rules, anti-phish-policies, hosted-content-filter-policies, hosted-outbound-spam-filter-policies, quarantine-policies, safe-attachment-policies, safe-links-policies, mobile-device-mailbox-policies, spo-tenant, mailboxes, cas-mailboxes."},"required":true,"name":"resource","in":"path"},{"schema":{"type":"string","format":"uuid"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":true,"name":"sub","in":"path"},{"schema":{"type":"string","description":"The rule / folder id or the trustee."},"required":true,"name":"subId","in":"path"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. The only query option the cache honours; with any other option a Graph request is answered live."},"required":false,"name":"$skiptoken","in":"query"}],"responses":{"200":{"description":"A cached collection or object.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExchangeCacheCollection"},{"$ref":"#/components/schemas/ExchangeCacheObject"}]}}}},"400":{"description":"`unsupported_query_option` (only `$skiptoken` is honoured) or `invalid_skiptoken`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found, `unknown_resource` (the body lists the known names), or the object is not in the cache.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/graph/{version}/{graphPath}":{"get":{"operationId":"graphGet","summary":"Microsoft Graph (cache first, live otherwise)","description":"Read-only Microsoft Graph emulation. `graphPath` is any Graph path and may contain slashes (`users`, `users/{id}/mailFolders`, `identity/conditionalAccess/policies`).\n\nA path the route table holds, with no query option or `$skiptoken` alone, is answered from the Stolos cache: collections are `{ @odata.context, value, @odata.nextLink?, @octiga.* }`, a single object carries its own properties plus `@octiga.*`, a missing object is Graph’s `404 Request_ResourceNotFound`.\nAny other query option, or a path the table does not hold, is proxied to Microsoft Graph (GET only) on the allow-list; a denied path is `403 path_not_allowed`, the live budget is `429 live_graph_rate_limited`, and Microsoft’s own errors (including `429` with `Retry-After`) pass through unchanged.\n`@octiga.graphVersion` is the version asked for; the cache serves its one projection for both.","tags":["Graph"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","enum":["v1.0","beta"],"description":"The Graph version. The cache holds ONE (beta-shaped) projection per class and serves it for both versions; `@octiga.graphVersion` echoes the version asked for."},"required":true,"name":"version","in":"path"},{"schema":{"type":"string","description":"The Graph path after the version, e.g. `users/<id>/authentication/methods`."},"required":true,"name":"graphPath","in":"path"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. The only query option the cache honours; with any other option a Graph request is answered live."},"required":false,"name":"$skiptoken","in":"query"},{"schema":{"type":"string","description":"Forwarded to Microsoft on a live call (`eventual` for advanced queries)."},"required":false,"name":"ConsistencyLevel","in":"header"}],"responses":{"200":{"description":"A cached collection or object, or a live Graph response.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/GraphCacheCollection"},{"$ref":"#/components/schemas/GraphCacheObject"},{"$ref":"#/components/schemas/GraphLiveResponse"}]}}}},"400":{"description":"Malformed path, `invalid_skiptoken`, or `invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"`path_not_allowed` — the live proxy refuses this path.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found (`not_found`), unknown Graph version, or a cached object that does not exist (Graph error shape).","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Problem"},{"$ref":"#/components/schemas/GraphError"}]}}}},"429":{"description":"`live_graph_rate_limited`, or Microsoft’s own throttle (with `Retry-After`).","content":{"application/json":{"schema":{}}}},"502":{"description":"The cache or Microsoft could not be reached (`stolos_read_failed`, `live_graph_*`), or Microsoft’s own 5xx.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled` / `live_graph_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"504":{"description":"`live_graph_timeout`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/risks":{"get":{"operationId":"listRisks","summary":"Account risks, worst first","description":"The tenant’s accounts with their risk findings, worst first. `rule` and `level` keep the accounts that hold a matching finding (`rule=dormant-account` is \"the dormant accounts\"). Findings dismissed in Octiga are left out, as on the Account risks page; `includeDismissed=true` lists them marked `dismissed`. A page holds at most `limit` rows and may hold fewer; follow `@odata.nextLink` until it is absent.","tags":["Risks"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","enum":["mfa","admin-mailbox","anonymous-admin","dormant-account","dormant-admin","dormant-guest","shared-mailbox-signin","role-named-mailbox","guest-privileged","guest-invite-pending"],"description":"Keep accounts with a finding of this rule."},"required":false,"name":"rule","in":"query"},{"schema":{"type":"string","enum":["info","warning","danger","critical"],"description":"Keep accounts with a finding at this level."},"required":false,"name":"level","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Also list dismissed findings, each marked `dismissed` (default `false`)."},"required":false,"name":"includeDismissed","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"description":"Page size, 1 to 100 (default 100)."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"Opaque continuation token taken from `@odata.nextLink`. The only query option the cache honours; with any other option a Graph request is answered live."},"required":false,"name":"$skiptoken","in":"query"}],"responses":{"200":{"description":"A page of accounts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRisks"}}}},"400":{"description":"`invalid_request`, `unsupported_query_option` or `invalid_skiptoken`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled` / `risk_journal_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/risks/{userId}":{"get":{"operationId":"getAccountRisk","summary":"One account’s risks","description":"Every rule’s outcome for one account: `active`, `dismissed`, `clear`, `suppressed` or `notEvaluable`, with its level, reason and since when. A rule that could not be evaluated is `notEvaluable`, never `clear`.","tags":["Risks"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The user’s object id."},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"The account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRiskDetail"}}}},"400":{"description":"`invalid_request`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found, or `user_not_found` (no risk evaluation for this user).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled` / `risk_journal_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/risks/summary":{"get":{"operationId":"getRiskSummary","summary":"Account risk counts of a tenant","description":"Accounts at risk and, per rule, how many accounts are affected at each level, how many findings are dismissed and how many accounts could not be evaluated. Dismissed findings are taken out of the active counts, so the numbers equal the cards of the Account risks page.","tags":["Risks"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"}],"responses":{"200":{"description":"The summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRiskSummary"}}}},"404":{"description":"Tenant not found, or `risk_summary_not_available` (the tenant has not been evaluated yet).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled` / `risk_journal_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/tenants/{tenantId}/users/{id}/profile":{"get":{"operationId":"getUserProfile","summary":"A user’s profile","description":"Identity, authentication methods, mailbox settings, inbox rules, account risk and group memberships of one user, from the Stolos cache. Parts that are not cached are `null` / `[]`.","tags":["Users"],"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","description":"The tenant (the Entra directory id). A tenant outside the caller’s scope or MSP is `404`."},"required":true,"name":"tenantId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The user’s object id."},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfile"}}}},"400":{"description":"`invalid_request` — the user id is not a GUID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Tenant not found, or `user_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"`stolos_read_failed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"`stolos_unavailable` / `stolos_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"parameters":{},"schemas":{"AccountRisk":{"type":"object","properties":{"userId":{"type":"string","description":"The user’s object id."},"displayName":{"type":"string"},"userPrincipalName":{"type":"string"},"mail":{"type":"string"},"userType":{"type":"string","description":"`Member` or `Guest`."},"accountEnabled":{"type":"boolean"},"privilege":{"type":"string","description":"`global`, `privileged` or `none`."},"licenceCount":{"type":"number"},"mailboxType":{"type":"string"},"lastActivityAt":{"type":"string"},"mfaPosture":{"type":"string","description":"The `mfa` rule’s finding code, or `protected`."},"worstLevel":{"type":"string","enum":["info","warning","danger","critical"],"description":"The worst level among the findings that are NOT dismissed; absent when none is left."},"findings":{"type":"array","items":{"$ref":"#/components/schemas/RiskFinding"},"description":"The account’s active findings. Dismissed findings are left out unless `includeDismissed=true`."},"notEvaluableRules":{"type":"array","items":{"type":"string"},"description":"Rules that could not be evaluated for this account. \"No finding\" for one of these is NOT \"clear\"."},"coverage":{"type":"string","description":"`full`, `partial` or `unavailable`."},"evaluatedAt":{"type":"string"}},"required":["userId","privilege","findings","notEvaluableRules"]},"AccountRiskDetail":{"type":"object","properties":{"userId":{"type":"string","description":"The user’s object id."},"displayName":{"type":"string"},"userPrincipalName":{"type":"string"},"mail":{"type":"string"},"userType":{"type":"string","description":"`Member` or `Guest`."},"accountEnabled":{"type":"boolean"},"privilege":{"type":"string","description":"`global`, `privileged` or `none`."},"licenceCount":{"type":"number"},"mailboxType":{"type":"string"},"lastActivityAt":{"type":"string"},"mfaPosture":{"type":"string","description":"The `mfa` rule’s finding code, or `protected`."},"worstLevel":{"type":"string","enum":["info","warning","danger","critical"],"description":"The worst level among the findings that are NOT dismissed; absent when none is left."},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/RiskOutcome"},"description":"Every rule of the catalogue, in catalogue order."},"inputs":{"type":"object","additionalProperties":{},"description":"Per input: when it was synced and its coverage."},"coverage":{"type":"string"},"evaluatedAt":{"type":"string"},"catalogueVersion":{"type":"number"},"@octiga.source":{"type":"string","enum":["cache"],"description":"The answer came from the Stolos cache."},"@octiga.projectionVersion":{"type":["integer","null"],"description":"The highest `projectionVersion` among the items that built the answer; `null` for an empty page."},"@octiga.tenantId":{"type":"string","format":"uuid"},"@octiga.syncedAt":{"type":["string","null"],"description":"ISO-8601 UTC: when the write landed in the cache."},"@octiga.firstSeenAt":{"type":["string","null"],"description":"ISO-8601 UTC: the first write of the key (an item written before this attribute existed answers its `syncedAt`)."},"@octiga.changedAt":{"type":["string","null"],"description":"ISO-8601 UTC: the last write whose projected value differed (an item without it answers its `syncedAt`)."}},"required":["userId","privilege","outcomes","inputs","@octiga.source","@octiga.projectionVersion","@octiga.tenantId","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt"]},"AccountRisks":{"type":"object","properties":{"value":{"type":"array","items":{"$ref":"#/components/schemas/AccountRisk"}},"@odata.nextLink":{"type":"string"},"@octiga.source":{"type":"string","enum":["cache"],"description":"The answer came from the Stolos cache."},"@octiga.projectionVersion":{"type":["integer","null"],"description":"The highest `projectionVersion` among the items that built the answer; `null` for an empty page."},"@octiga.tenantId":{"type":"string","format":"uuid"},"@octiga.syncedAt":{"$ref":"#/components/schemas/StampRange"},"@octiga.firstSeenAt":{"allOf":[{"$ref":"#/components/schemas/StampRange"},{"description":"Oldest and newest `firstSeenAt` over the page: the first write of the key (an item written before this attribute existed answers its `syncedAt`)."}]},"@octiga.changedAt":{"allOf":[{"$ref":"#/components/schemas/StampRange"},{"description":"Oldest and newest `changedAt` over the page: the last write whose projected value differed (an item without it answers its `syncedAt`)."}]}},"required":["value","@octiga.source","@octiga.projectionVersion","@octiga.tenantId","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt"]},"AccountRiskSummary":{"type":"object","properties":{"evaluatedAt":{"type":"string","description":"When the summary was last written."},"catalogueVersion":{"type":"number"},"users":{"type":"object","properties":{"evaluated":{"type":"number"},"atRisk":{"type":"number","description":"Accounts with a finding that is not dismissed."},"byWorstLevel":{"type":"object","properties":{"info":{"type":"number"},"warning":{"type":"number"},"danger":{"type":"number"},"critical":{"type":"number"}},"required":["info","warning","danger","critical"]},"privileged":{"type":"number"},"guests":{"type":"number"},"blocked":{"type":"number"},"unlicensed":{"type":"number","description":"Absent means not counted yet, never zero."}},"required":["evaluated","atRisk","byWorstLevel","privileged","guests","blocked"]},"byRule":{"type":"object","additionalProperties":{"type":"object","properties":{"active":{"type":"object","properties":{"info":{"type":"number"},"warning":{"type":"number"},"danger":{"type":"number"},"critical":{"type":"number"}},"required":["info","warning","danger","critical"],"description":"Accounts affected, by level, dismissed ones excluded."},"dismissed":{"type":"number"},"notEvaluable":{"type":"number"},"coverage":{"type":"object","properties":{"value":{"type":["number","null"]},"coverage":{"type":"string"},"reason":{"type":"string"}},"required":["value","coverage"]}},"required":["active","dismissed","notEvaluable","coverage"]}},"@octiga.source":{"type":"string","enum":["cache"],"description":"The answer came from the Stolos cache."},"@octiga.projectionVersion":{"type":["integer","null"],"description":"The highest `projectionVersion` among the items that built the answer; `null` for an empty page."},"@octiga.tenantId":{"type":"string","format":"uuid"},"@octiga.syncedAt":{"type":["string","null"],"description":"ISO-8601 UTC: when the write landed in the cache."},"@octiga.firstSeenAt":{"type":["string","null"],"description":"ISO-8601 UTC: the first write of the key (an item written before this attribute existed answers its `syncedAt`)."},"@octiga.changedAt":{"type":["string","null"],"description":"ISO-8601 UTC: the last write whose projected value differed (an item without it answers its `syncedAt`)."}},"required":["users","byRule","@octiga.source","@octiga.projectionVersion","@octiga.tenantId","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt"]},"AlertDetail":{"allOf":[{"$ref":"#/components/schemas/MonitoringRow"},{"type":"object","properties":{"storedSeverity":{"type":"string","description":"The grade as stored on arrival, before any later re-grade."},"title":{"type":["string","null"]},"longDescription":{"type":["string","null"]},"actorName":{"type":["string","null"]},"affectedUserName":{"type":["string","null"]},"city":{"type":["string","null"]},"lat":{"type":["number","null"]},"lng":{"type":["number","null"]},"isp":{"type":["string","null"]},"organization":{"type":["string","null"]},"workload":{"type":["string","null"]},"recordType":{"type":["integer","null"]},"objectId":{"type":["string","null"]},"fields":{"description":"The fields Octiga extracted from the event, as stored."},"arrival":{"type":["object","null"],"properties":{"severityWithoutRules":{"type":["string","null"]},"ruleEffect":{"type":["string","null"]},"appliedRuleId":{"type":["string","null"]},"matchedRuleIds":{"type":"array","items":{"type":"string"}}},"required":["severityWithoutRules","ruleEffect","appliedRuleId","matchedRuleIds"],"description":"What the event rules did on arrival; `null` for a deviation or a notification."},"history":{"type":"array","items":{"$ref":"#/components/schemas/AlertHistoryEntry"},"description":"Re-grades and dismissals since, newest first."},"@octiga.source":{"type":"string","enum":["monitoring"]}},"required":["storedSeverity","title","longDescription","actorName","affectedUserName","city","lat","lng","isp","organization","workload","recordType","objectId","arrival","history","@octiga.source"]}]},"AlertHistoryEntry":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["severity"]},"from":{"type":"string"},"to":{"type":"string"},"origin":{"type":"string","enum":["reclassification"]},"ruleId":{"type":["string","null"]},"ruleName":{"type":["string","null"]},"ruleType":{"type":["string","null"]},"timestamp":{"type":"string"}},"required":["kind","from","to","origin","ruleId","ruleName","ruleType","timestamp"]},{"type":"object","properties":{"kind":{"type":"string","enum":["dismissal"]},"action":{"type":"string","enum":["dismissed","undismissed"]},"by":{"type":"string","description":"The operator’s display name."},"timestamp":{"type":"string"}},"required":["kind","action","by","timestamp"]}]},"AuthorizeCompleteRequest":{"type":"object","properties":{"request_id":{"type":"string"},"entra_token":{"type":"string"}},"required":["request_id","entra_token"]},"AuthorizeCompleteResponse":{"type":"object","properties":{"redirect_to":{"type":"string","format":"uri"}},"required":["redirect_to"]},"BaselineVerdict":{"type":"object","properties":{"scope":{"type":"string","enum":["tenant","user"],"description":"Whose baseline this is: the tenant’s own, or one user’s (a baseline assigned through a group is a user baseline)."},"tag":{"type":"string","description":"The baseline tag."},"title":{"type":"string","description":"The baseline’s display name (the tag, for a retired baseline)."},"category":{"type":"string"},"verdict":{"type":"string","enum":["passing","deviated","none"],"description":"`passing`, `deviated`, or `none` when Octiga has no verdict (see `status`). The same verdict Kraken shows."},"status":{"type":"string","description":"The evaluator’s status: `compliant`, `nonCompliant`, `notEvaluable` or `unlicensed`. A `notEvaluable` or `unlicensed` baseline is never `passing`."},"reason":{"type":"string","description":"Why the status is `notEvaluable`."},"evaluatedAt":{"type":"string","description":"When the evaluation ran (ISO-8601 UTC)."},"since":{"type":"string","description":"When the current status began."},"baselineId":{"type":"string","description":"The id of the baseline row the verdict is for — Kraken’s `?baseline=<id>`."},"deviationId":{"type":"string"},"failingPaths":{"type":"array","items":{"type":"string"},"description":"The settings that failed (instance paths), for a deviated baseline. Values are not served."},"objRef":{"type":"string","description":"Tenant scope: the governed object (`TENANT` for a tenant-wide baseline)."},"userId":{"type":"string","description":"User scope: the user’s object id."},"userDisplayName":{"type":"string"},"userPrincipalName":{"type":"string"},"effective":{"type":"object","properties":{"channel":{"type":"string"},"groupId":{"type":"string"}},"required":["channel"],"description":"User scope: how the baseline reached the user — `direct`, `managed` or `group` (with the group’s id)."}},"required":["scope","tag","title","verdict","status"]},"BaselineVerdicts":{"type":"object","properties":{"value":{"type":"array","items":{"$ref":"#/components/schemas/BaselineVerdict"}},"@odata.nextLink":{"type":"string"},"@octiga.source":{"type":"string","enum":["cache"],"description":"The answer came from the Stolos cache."},"@octiga.projectionVersion":{"type":["integer","null"],"description":"The highest `projectionVersion` among the items that built the answer; `null` for an empty page."},"@octiga.tenantId":{"type":"string","format":"uuid"},"@octiga.syncedAt":{"$ref":"#/components/schemas/StampRange"},"@octiga.firstSeenAt":{"allOf":[{"$ref":"#/components/schemas/StampRange"},{"description":"Oldest and newest `firstSeenAt` over the page: the first write of the key (an item written before this attribute existed answers its `syncedAt`)."}]},"@octiga.changedAt":{"allOf":[{"$ref":"#/components/schemas/StampRange"},{"description":"Oldest and newest `changedAt` over the page: the last write whose projected value differed (an item without it answers its `syncedAt`)."}]}},"required":["value","@octiga.source","@octiga.projectionVersion","@octiga.tenantId","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt"]},"ClientRegistration":{"type":"object","properties":{"client_id":{"type":"string"},"client_id_issued_at":{"type":"integer"},"redirect_uris":{"type":"array","items":{"type":"string"}},"token_endpoint_auth_method":{"type":"string","enum":["none"]},"grant_types":{"type":"array","items":{"type":"string"}},"response_types":{"type":"array","items":{"type":"string"}},"scope":{"type":"string"},"client_name":{"type":"string"}},"required":["client_id","client_id_issued_at","redirect_uris","token_endpoint_auth_method","grant_types","response_types","scope"]},"ClientRegistrationRequest":{"type":"object","properties":{"redirect_uris":{"type":"array","items":{"type":"string"},"minItems":1,"description":"https URLs, or http://localhost / 127.0.0.1 / [::1] loopback URLs; no fragment."},"client_name":{"type":"string"},"token_endpoint_auth_method":{"type":"string","enum":["none"]},"grant_types":{"type":"array","items":{"type":"string","enum":["authorization_code","refresh_token"]}},"response_types":{"type":"array","items":{"type":"string","enum":["code"]}},"scope":{"type":"string","enum":["read"]},"client_uri":{"type":"string","format":"uri"},"logo_uri":{"type":"string","format":"uri"},"software_id":{"type":"string"},"software_version":{"type":"string"}},"required":["redirect_uris"]},"ExchangeCacheCollection":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Cmdlet objects with their own property names (`Identity`, `RecipientTypeDetails`, …)."},"@odata.nextLink":{"type":"string"},"@octiga.source":{"type":"string","enum":["cache"],"description":"The answer came from the Stolos cache."},"@octiga.projectionVersion":{"type":["integer","null"],"description":"The highest `projectionVersion` among the items that built the answer; `null` for an empty page."},"@octiga.tenantId":{"type":"string","format":"uuid"},"@octiga.syncedAt":{"$ref":"#/components/schemas/StampRange"},"@octiga.firstSeenAt":{"allOf":[{"$ref":"#/components/schemas/StampRange"},{"description":"Oldest and newest `firstSeenAt` over the page: the first write of the key (an item written before this attribute existed answers its `syncedAt`)."}]},"@octiga.changedAt":{"allOf":[{"$ref":"#/components/schemas/StampRange"},{"description":"Oldest and newest `changedAt` over the page: the last write whose projected value differed (an item without it answers its `syncedAt`)."}]}},"required":["value","@octiga.source","@octiga.projectionVersion","@octiga.tenantId","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt"]},"ExchangeCacheObject":{"type":"object","properties":{"@octiga.source":{"type":"string","enum":["cache"],"description":"The answer came from the Stolos cache."},"@octiga.projectionVersion":{"type":["integer","null"],"description":"The highest `projectionVersion` among the items that built the answer; `null` for an empty page."},"@octiga.tenantId":{"type":"string","format":"uuid"},"@octiga.syncedAt":{"type":["string","null"],"description":"ISO-8601 UTC: when the write landed in the cache."},"@octiga.firstSeenAt":{"type":["string","null"],"description":"ISO-8601 UTC: the first write of the key (an item written before this attribute existed answers its `syncedAt`)."},"@octiga.changedAt":{"type":["string","null"],"description":"ISO-8601 UTC: the last write whose projected value differed (an item without it answers its `syncedAt`)."}},"required":["@octiga.source","@octiga.projectionVersion","@octiga.tenantId","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt"],"additionalProperties":{}},"FleetPosture":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"tenantId":{"type":"string","format":"uuid","description":"The tenant id, as on `GET /v1/tenants`."},"tenantName":{"type":"string"},"freshness":{"type":"object","properties":{"state":{"type":"string","enum":["fresh","stale","degraded","unlicensed"]},"syncedAt":{"type":"string"}},"required":["state"],"description":"How current the tenant’s cached data is."},"baselines":{"type":"object","properties":{"applied":{"type":"integer","description":"Baselines at least one subject carries."},"deviating":{"type":"integer","description":"Baselines at least one subject is non-compliant with."},"passing":{"type":"integer","description":"Applied baselines whose non-compliant count is a known zero."},"nonCompliantSubjects":{"type":["integer","null"],"description":"Non-compliant subjects in all (the tenant, or a user, per baseline); `null` when not computed."},"syncedAt":{"type":"string"}},"required":["applied","deviating","passing","nonCompliantSubjects"],"description":"Absent until the tenant’s compliance summary has been written."},"risks":{"type":"object","properties":{"evaluated":{"type":"integer","description":"Accounts evaluated."},"atRisk":{"type":"integer","description":"Accounts with at least one active finding; dismissed findings are left out."},"byWorstLevel":{"type":"object","properties":{"info":{"type":"integer"},"warning":{"type":"integer"},"danger":{"type":"integer"},"critical":{"type":"integer"}},"required":["info","warning","danger","critical"],"description":"Each account at risk under its worst level, of what is not dismissed."},"byRule":{"type":"object","additionalProperties":{"type":"object","properties":{"active":{"type":"object","properties":{"info":{"type":"integer"},"warning":{"type":"integer"},"danger":{"type":"integer"},"critical":{"type":"integer"}},"required":["info","warning","danger","critical"]},"dismissed":{"type":"integer"},"notEvaluable":{"type":"integer"}},"required":["active","dismissed","notEvaluable"]},"description":"Per risk rule: accounts with an active finding at each level, findings dismissed, and accounts the rule could not be evaluated for (never read those as clear)."},"dismissalsApplied":{"type":"boolean","description":"`true`: the counts equal the Account risks page’s. `false`: this tenant has dismissals that were not applied (past the request’s cap), so its counts include dismissed findings."},"syncedAt":{"type":"string"}},"required":["evaluated","atRisk","byWorstLevel","byRule","dismissalsApplied"],"description":"Absent until the tenant’s risk summary has been written."}},"required":["tenantId","tenantName","freshness"]}},"@octiga.source":{"type":"string","enum":["cache"]},"@octiga.tenantId":{"type":"null"}},"required":["value","@octiga.source","@octiga.tenantId"]},"GraphCacheCollection":{"type":"object","properties":{"@odata.context":{"type":"string"},"value":{"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Microsoft Graph objects as projected by Stolos."},"@odata.nextLink":{"type":"string","description":"Present when more pages exist; follow it as is (a Hermes `$skiptoken`)."},"@octiga.source":{"type":"string","enum":["cache"],"description":"The answer came from the Stolos cache."},"@octiga.projectionVersion":{"type":["integer","null"],"description":"The highest `projectionVersion` among the items that built the answer; `null` for an empty page."},"@octiga.tenantId":{"type":"string","format":"uuid"},"@octiga.syncedAt":{"$ref":"#/components/schemas/StampRange"},"@octiga.firstSeenAt":{"allOf":[{"$ref":"#/components/schemas/StampRange"},{"description":"Oldest and newest `firstSeenAt` over the page: the first write of the key (an item written before this attribute existed answers its `syncedAt`)."}]},"@octiga.changedAt":{"allOf":[{"$ref":"#/components/schemas/StampRange"},{"description":"Oldest and newest `changedAt` over the page: the last write whose projected value differed (an item without it answers its `syncedAt`)."}]},"@octiga.graphVersion":{"type":"string","enum":["v1.0","beta"]},"@octiga.view":{"type":"string","enum":["detail","summary"],"description":"Only `/users/{id}/authentication/methods`: whether the per-user detail has been read."}},"required":["@odata.context","value","@octiga.source","@octiga.projectionVersion","@octiga.tenantId","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt","@octiga.graphVersion"]},"GraphCacheObject":{"type":"object","properties":{"@odata.context":{"type":"string"},"@octiga.source":{"type":"string","enum":["cache"],"description":"The answer came from the Stolos cache."},"@octiga.projectionVersion":{"type":["integer","null"],"description":"The highest `projectionVersion` among the items that built the answer; `null` for an empty page."},"@octiga.tenantId":{"type":"string","format":"uuid"},"@octiga.syncedAt":{"type":["string","null"],"description":"ISO-8601 UTC: when the write landed in the cache."},"@octiga.firstSeenAt":{"type":["string","null"],"description":"ISO-8601 UTC: the first write of the key (an item written before this attribute existed answers its `syncedAt`)."},"@octiga.changedAt":{"type":["string","null"],"description":"ISO-8601 UTC: the last write whose projected value differed (an item without it answers its `syncedAt`)."},"@octiga.graphVersion":{"type":"string","enum":["v1.0","beta"]},"@octiga.view":{"type":"string","enum":["detail","summary"]}},"required":["@odata.context","@octiga.source","@octiga.projectionVersion","@octiga.tenantId","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt","@octiga.graphVersion"],"additionalProperties":{}},"GraphError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"Request_ResourceNotFound"},"message":{"type":"string"}},"required":["code","message"]},"@octiga.source":{"type":"string","enum":["cache"]}},"required":["error"]},"GraphLiveResponse":{"type":"object","properties":{"@octiga.source":{"type":"string","enum":["live"]},"@octiga.graphVersion":{"type":"string","enum":["v1.0","beta"]},"@octiga.tenantId":{"type":"string","format":"uuid"}},"required":["@octiga.source","@octiga.graphVersion","@octiga.tenantId"],"additionalProperties":{},"description":"Microsoft Graph’s response with `@odata.nextLink` / `@odata.deltaLink` / `@odata.context` rewritten to Hermes; no `syncedAt` or `projectionVersion`."},"Jwks":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["keys"]},"MonitoringList":{"type":"object","properties":{"value":{"type":"array","items":{"$ref":"#/components/schemas/MonitoringRow"}},"@odata.nextLink":{"type":"string"},"@octiga.source":{"type":"string","enum":["monitoring"],"description":"The answer came from the monitoring store."},"@octiga.window":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"description":"The window that was read, both ends inclusive, ISO-8601 UTC."},"@octiga.tenantId":{"type":"string","format":"uuid","description":"The tenant, on a tenant’s event list only."}},"required":["value","@octiga.source","@octiga.window"]},"MonitoringRow":{"type":"object","properties":{"id":{"type":"string","description":"The opaque alert id, for `GET /v1/alerts/{id}`."},"timestamp":{"type":"string","description":"When it happened, ISO-8601 UTC."},"severity":{"type":"string","enum":["info","warning","danger","critical"],"description":"The effective grade: a re-grade made in Octiga wins over the grade given on arrival."},"source":{"type":"string","enum":["event","deviation","notification"],"description":"`event` a Microsoft audit event, `deviation` a baseline deviation, `notification` a notice from Octiga."},"tenantId":{"type":"string","format":"uuid"},"tenantName":{"type":["string","null"]},"operation":{"type":["string","null"],"description":"The stored operation name."},"description":{"type":["string","null"],"description":"The stored short description."},"actor":{"type":["string","null"]},"affectedUser":{"type":["string","null"]},"countryCode":{"type":["string","null"],"description":"ISO 3166-1 alpha-2."},"ip":{"type":["string","null"]},"asn":{"type":["integer","null"]},"dismissed":{"type":"boolean","description":"Whether an operator dismissed it in Octiga."}},"required":["id","timestamp","severity","source","tenantId","tenantName","operation","description","actor","affectedUser","countryCode","ip","asn","dismissed"]},"OAuthError":{"type":"object","properties":{"error":{"type":"string"},"error_description":{"type":"string"}},"required":["error","error_description"]},"OAuthMetadata":{"type":"object","additionalProperties":{},"description":"A JSON metadata document (RFC 8414 / RFC 9728)."},"Problem":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"not_found"},"message":{"type":"string"},"details":{}},"required":["code","message"]}},"required":["error"]},"RevokeRequest":{"type":"object","properties":{"token":{"type":"string"},"token_type_hint":{"type":"string","enum":["refresh_token","access_token"]},"client_id":{"type":"string"}},"required":["token"]},"RiskDismissal":{"type":"object","properties":{"at":{"type":"string","description":"When the finding was dismissed (ISO-8601)."},"by":{"type":"string","description":"The UPN of who dismissed it."},"byName":{"type":"string"},"note":{"type":"string"}},"required":["at","by"],"description":"Present when the finding is dismissed (only listed with `includeDismissed=true`)."},"RiskFinding":{"type":"object","properties":{"rule":{"type":"string","enum":["mfa","admin-mailbox","anonymous-admin","dormant-account","dormant-admin","dormant-guest","shared-mailbox-signin","role-named-mailbox","guest-privileged","guest-invite-pending"]},"level":{"type":"string","enum":["info","warning","danger","critical"]},"finding":{"type":"string","description":"The rule’s finding code."},"since":{"type":"string","description":"When this finding began (ISO-8601)."},"dismissed":{"$ref":"#/components/schemas/RiskDismissal"}},"required":["rule"]},"RiskOutcome":{"type":"object","properties":{"rule":{"type":"string","enum":["mfa","admin-mailbox","anonymous-admin","dormant-account","dormant-admin","dormant-guest","shared-mailbox-signin","role-named-mailbox","guest-privileged","guest-invite-pending"]},"state":{"type":"string","description":"`active`, `dismissed` (active, but dismissed in Octiga), `clear`, `suppressed` or `notEvaluable` (could not be evaluated: never read it as clear)."},"level":{"type":"string","enum":["info","warning","danger","critical"]},"finding":{"type":"string"},"reason":{"type":"string","description":"Why the rule is suppressed or not evaluable."},"since":{"type":"string"},"evidence":{"type":"object","additionalProperties":{},"description":"The rule’s facts, small and flat."},"coverage":{"type":"string"},"coverageReason":{"type":"string"},"dismissed":{"$ref":"#/components/schemas/RiskDismissal"}},"required":["rule","state","coverage"]},"StampRange":{"type":"object","properties":{"oldest":{"type":["string","null"],"description":"The earliest value among the page’s items (ISO-8601 UTC); `null` for an empty page."},"newest":{"type":["string","null"],"description":"The latest value among the page’s items; `null` for an empty page."}},"required":["oldest","newest"],"description":"Oldest and newest `syncedAt` over the page: when the write landed in the cache."},"TenantList":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The tenant id — use it as `:tenantId` of every tenant route."},"name":{"type":"string"},"engine":{"type":"string","description":"`tenant.data_engine` (`v1 | testing | migrating | v2`); informational — Hermes serves any tenant Stolos ingests."},"stolos":{"type":"object","properties":{"ingested":{"type":"boolean","enum":[true],"description":"Always `true`: only tenants whose `SUMMARY#FRESHNESS` item exists are listed."},"freshness":{"type":"object","properties":{"state":{"type":"string","enum":["fresh","stale","degraded","unlicensed"],"description":"The roll-up freshness state."},"refreshMode":{"type":"string"},"backfilled":{"type":"boolean"},"backfilledAt":{"type":"string"},"origin":{"type":"string"},"syncedAt":{"type":"string","description":"When the freshness item was last written."},"health":{"type":"object","additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string"}]}},"resources":{"type":"object","additionalProperties":{"type":"object","properties":{"state":{"type":"string"},"syncedAt":{"type":"string"},"nextDueAt":{"type":"string"},"lastError":{"type":"object","additionalProperties":{}}},"required":["state"]}}},"required":["state","backfilled","health","resources"],"description":"The informative subset of the tenant’s `SUMMARY#FRESHNESS` item."}},"required":["ingested","freshness"]}},"required":["id","name","engine","stolos"]}},"@octiga.source":{"type":"string","enum":["cache"]},"@octiga.tenantId":{"type":"null"}},"required":["value","@octiga.source","@octiga.tenantId"]},"TokenRequest":{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"]},"client_id":{"type":"string"},"code":{"type":"string"},"redirect_uri":{"type":"string"},"code_verifier":{"type":"string"},"refresh_token":{"type":"string"},"scope":{"type":"string"},"resource":{"type":"string","description":"RFC 8707; must be a subset of the grant’s resources."}},"required":["grant_type","client_id"]},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string","description":"An ES256 JWT, one hour."},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"number","enum":[3600]},"refresh_token":{"type":"string"},"scope":{"type":"string"}},"required":["access_token","token_type","expires_in","scope"]},"UserProfile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"identity":{"type":"object","additionalProperties":{},"description":"The Graph user object (`USER#<oid>` data)."},"authenticationMethods":{"type":["object","null"],"additionalProperties":{},"description":"`USER#<oid>#AUTHMETHODS` data: registration summary and, once read, the `methods` detail."},"mailboxSettings":{"type":["object","null"],"additionalProperties":{}},"inboxRules":{"type":"array","items":{"type":"object","additionalProperties":{}}},"risk":{"type":["object","null"],"additionalProperties":{},"description":"The stored `USER#<oid>#RISK` fields: `outcomes`, `worstLevel`, `activeRules`, `states`, `profile`, `rank`, …"},"memberOf":{"type":"array","items":{"type":"string"},"description":"Ids of the groups the user is a cached member of."},"@octiga.source":{"type":"string","enum":["cache"]},"@octiga.syncedAt":{"type":"object","properties":{"identity":{"type":["string","null"]},"authenticationMethods":{"type":["string","null"]},"mailboxSettings":{"type":["string","null"]},"inboxRules":{"type":["string","null"],"description":"The oldest rule’s `syncedAt`."},"risk":{"type":["string","null"]}},"required":["identity","authenticationMethods","mailboxSettings","inboxRules","risk"]},"@octiga.firstSeenAt":{"type":"object","properties":{"identity":{"type":["string","null"]},"authenticationMethods":{"type":["string","null"]},"mailboxSettings":{"type":["string","null"]},"inboxRules":{"type":["string","null"],"description":"The oldest rule’s `firstSeenAt`."},"risk":{"type":["string","null"]}},"required":["identity","authenticationMethods","mailboxSettings","inboxRules","risk"]},"@octiga.changedAt":{"type":"object","properties":{"identity":{"type":["string","null"]},"authenticationMethods":{"type":["string","null"]},"mailboxSettings":{"type":["string","null"]},"inboxRules":{"type":["string","null"],"description":"The oldest rule’s `changedAt`."},"risk":{"type":["string","null"]}},"required":["identity","authenticationMethods","mailboxSettings","inboxRules","risk"]},"@octiga.tenantId":{"type":"string","format":"uuid"}},"required":["id","identity","authenticationMethods","mailboxSettings","inboxRules","risk","memberOf","@octiga.source","@octiga.syncedAt","@octiga.firstSeenAt","@octiga.changedAt","@octiga.tenantId"]}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key (`oct_<env>_…`) or a Hermes-issued OAuth 2.1 access token."}}},"webhooks":{}}