API
Use The REST API
How to use the Hygiara REST API reference, OpenAPI document, and API key authentication.
Use the REST API for workflow automation against Hygiara.
Base path
https://app.hygiara.com/api/v1
Authenticate
Create an organization API key in Settings > API Keys and send it with each request:
X-API-Key: hygiara_your_key_here
Accept: application/json
Example:
curl -H "X-API-Key: hygiara_your_key_here" \
-H "Accept: application/json" \
https://app.hygiara.com/api/v1/projects
Use the generated reference
Use the generated reference for exact endpoints, request bodies, response shapes, and response codes.
Use the OpenAPI document for import, tooling, or client generation.
First workflow
- List or create a project with
GET /projectsorPOST /projects. Keep itsdata.uuid. - Create a reusable connection with
POST /azure-connections, usingauth_method: service_principal,tenant_id,client_id, andclient_secret.nameis optional. CallPOST /azure-connections/{uuid}/validatebefore using it. - Create a review with
POST /reviews. Creation queues the review immediately; do not call/startafterwards. - Poll
GET /reviews/{uuid}/statusuntilstatusiscompleted,failed, orcancelled. - After completion, retrieve findings, recommendations, and scores. Reports are queued automatically for standard reviews. Use
latest_run_uuidfrom the status response to pollGET /review-runs/{uuid}untildata.report_statusiscompleted, then downloadGET /review-runs/{uuid}/download.
Example review body (replace the UUID placeholders):
{
"project_uuid": "<project-uuid>",
"azure_connection_uuid": "<connection-uuid>",
"scope_type": "subscription",
"scope_identifiers": ["<azure-subscription-uuid>"],
"review_type": "standard",
"include_resource_scan": true,
"include_eslz": false
}
On an unlocked project, supply access_token instead of azure_connection_uuid for a one-use Azure token. Do not send the token in a URL. A project locked to a stored connection always uses that connection and rejects token overrides.
Supported Azure modes
- Stored connections use service principals. Both client ID and client secret are required.
- Reviews use subscription scope and standard review type. Omit
scope_identifiers, or send an empty array, to discover all subscriptions accessible to the supplied identity. - Tenant and management-group scope values, managed-identity connections, and server-side Azure CLI authentication are rejected with HTTP 422. You can obtain a one-use token using Azure CLI on your own machine; this is not a server-side CLI connection.
- Landing Zone assessment can still inspect management-group context for the selected subscriptions when the identity has the required permissions.
Connection validation proves subscription visibility, not every permission required by an assessment. Invalid credentials or an upstream subscription-discovery error return HTTP 422 rather than an empty successful result.
Status, cancellation, and reports
POST /reviews/{uuid}/start is only for an existing pending review. It is not part of the normal create workflow.
POST /reviews/{uuid}/cancel accepts queued or running reviews. Cancellation is cooperative: an in-flight Azure request or subscription scan may finish, but workers stop at their next cancellation boundary and do not mark the review completed.
Required assessment failures, including failure to obtain Landing Zone results when requested, fail the review after worker retries. Optional AI enrichment and cost collection do not determine assessment success. Individual Landing Zone checks may still be not_verified; inspect the evidence rather than treating completion as proof that every control passed.
Review completion and report completion are separate. POST /reviews/{uuid}/reports requests generation again for a completed review. While a report is pending or generating, repeated requests return the current run without queuing duplicate work. Queue-dispatch failure returns HTTP 503 and restores the previous report state; retry later. Continuous scans do not generate reports automatically.
Filters, identifiers, and pagination
Use bracket-style query parameters, for example:
GET /reviews/{uuid}/findings?filter[severity]=high&sort=-priority
GET /monitoring/scans?filter[status]=failed
GET /projects?filter[name]=Production&sort=-created_at
Prefix a sort field with - for descending order. Follow links.next until it is null; pagination links retain filters and sorting. Findings default to 50 per page and accept per_page from 1 to 50. Other paginated collections use their documented fixed page size.
Use the UUIDs returned by project, connection, review, run, and finding resources. Recommendations return a numeric id for GET /recommendations/{id}.
Interpreting totals
Executive summaries use the same canonical, deduplicated resource findings as the findings summary. total_findings excludes legacy-suppressed rows; active_findings also excludes fully accepted exceptions. suppressed_findings counts stored suppressed rows separately. Accepted exceptions do not change assessment scores.
Executive domain_scores and /domains contain aggregate pillar scores, not a single subscription's score. /scores also includes subscription-specific rows where available; subscription_id: null identifies an aggregate. A score with no applicable checks is null, not 100%.
Recurring reviews
Create a project review template, then a weekly or monthly schedule from that template. Scheduled reviews preserve both include_eslz and include_resource_scan. Templates and schedules require a stored service-principal connection, not a one-use token.
Rate limits
Authenticated requests are limited to 60 per minute per client IP. Poll conservatively, and respect HTTP 429 and the Retry-After response header.
Common failures
401 or 403
Check the X-API-Key header, key status, and organization automation settings.
404
Check the app domain, /api/v1 base path, and endpoint path.
Validation errors
HTTP 422 includes a message and, for field validation, an errors object. Compare the body with the generated reference and the supported modes above.
Queue unavailable
HTTP 503 means the review or report could not be queued. Retry after the service recovers. Do not assume a job exists merely because an earlier request was attempted.
AI client integration
Use MCP instead of giving API keys to an AI client.