Skip to content

Scans API

Maintained by: Aether365 Team Audience: Developers Scope: Scan API endpoints - triggering and listing scans

List Scans

Returns a paginated list of scans for the authenticated tenant, newest first.

GET /tenants/me/scans

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerResults per page (default: 20, max: 100)
scanTypestringFilter by type: compliance
showHiddenbooleanInclude hidden scans (default: false)

INFO

There is no server-side status filter. To find, for example, the latest completed scan, filter the returned list on the status field client-side.

Example Request

bash
curl "https://api.aether365.io/tenants/me/scans?limit=20" \
  -H "Authorization: Bearer ak_live_..."

Example Response

json
{
  "success": true,
  "data": [
    {
      "id": "0d9f6f9e-3b0c-4a9d-9c1e-2f6a8b7c5d4e",
      "tenantId": "7c1b2a3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
      "status": "completed",
      "scanType": "compliance",
      "triggeredBy": "manual",
      "mode": "manual",
      "startedAt": "2026-04-09T00:00:12+00:00",
      "completedAt": "2026-04-09T00:14:23+00:00",
      "passCount": 87,
      "failCount": 12,
      "skipCount": 5,
      "errorMessage": null,
      "createdAt": "2026-04-09T00:00:00+00:00",
      "msTenantId": "f1e2d3c4-b5a6-9788-1c2d-3e4f5a6b7c8d",
      "orgName": "Contoso Ltd",
      "reportStatus": "ready",
      "reportLocale": "en",
      "highCount": 4,
      "medCount": 8,
      "lowCount": 0,
      "frameworkBreakdown": [
        { "name": "CIS", "value": 64, "passed": 55 },
        { "name": "EIDSCA", "value": 40, "passed": 32 }
      ]
    }
  ],
  "meta": {
    "total": 24,
    "page": 1,
    "limit": 20
  }
}

The example omits some always-present fields for brevity. The complete set is listed in the Scan Object reference below.

Scan Object

All field names are camelCase. Every scan response contains:

FieldTypeDescription
idstringScan ID (UUID)
tenantIdstringAether365 tenant ID
statusstringpending, running, completed, failed, cancelled, or expired
scanTypestringcompliance
scannerVersionstring or nullScanner engine version
triggeredBystringmanual or scheduler
modestringmanual or ai_pilot
startedAt / completedAtstring or nullISO 8601 timestamps
passCount / failCount / skipCountintegerFinal result counters
s3ResultKeystring or nullInternal storage reference for the raw result file
errorMessagestring or nullFailure reason when status is failed
isHiddenbooleanWhether the scan is hidden from the default list
createdAt / updatedAtstring or nullISO 8601 timestamps
currentPhase / currentTestId / currentTestTitlestring or nullLive progress while the scan runs
phaseUpdatedAtstring or nullTimestamp of the last progress update
partialPassCount / partialFailCountintegerRunning counters while the scan is in progress
msTenantIdstring or nullMicrosoft tenant the scan ran against
orgNamestring or nullOrganization display name
reportStatusstringPDF report state: none, rendering, ready, or error
reportLocalestring or nullReport language
reportGeneratedAtstring or nullWhen the PDF report was rendered
reportErrorstring or nullReport render failure reason

List responses additionally include highCount, medCount, lowCount (failed findings bucketed by severity) and frameworkBreakdown (per-framework totals as { name, value, passed }). Single-scan responses (GET /scans/{scanId}) additionally include unchangedSincePrevious (boolean).

There is no score field. If you need a pass rate, derive it from the counters: passCount / (passCount + failCount).


Get Scan

Returns details of a single scan.

GET /scans/{scanId}

Example Request

bash
curl https://api.aether365.io/scans/0d9f6f9e-3b0c-4a9d-9c1e-2f6a8b7c5d4e \
  -H "Authorization: Bearer ak_live_..."

Example Response

json
{
  "success": true,
  "data": {
    "id": "0d9f6f9e-3b0c-4a9d-9c1e-2f6a8b7c5d4e",
    "tenantId": "7c1b2a3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    "status": "completed",
    "scanType": "compliance",
    "triggeredBy": "manual",
    "mode": "manual",
    "startedAt": "2026-04-09T00:00:12+00:00",
    "completedAt": "2026-04-09T00:14:23+00:00",
    "passCount": 87,
    "failCount": 12,
    "skipCount": 5,
    "errorMessage": null,
    "createdAt": "2026-04-09T00:00:00+00:00",
    "msTenantId": "f1e2d3c4-b5a6-9788-1c2d-3e4f5a6b7c8d",
    "orgName": "Contoso Ltd",
    "reportStatus": "ready",
    "reportLocale": "en",
    "unchangedSincePrevious": false
  }
}

Trigger a Scan

Starts a scan immediately for the authenticated tenant.

POST /tenants/me/scans

Request Body

json
{
  "scanType": "compliance"
}
FieldTypeRequiredDescription
scanTypestringNocompliance
connectionIdstringNoTarget a specific connected Microsoft tenant. Defaults to the primary connection.

Example Request

bash
curl -X POST https://api.aether365.io/tenants/me/scans \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -d '{"scanType": "compliance"}'

Example Response

Returns 201 with the newly created scan object:

json
{
  "success": true,
  "data": {
    "id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
    "tenantId": "7c1b2a3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
    "status": "pending",
    "scanType": "compliance",
    "triggeredBy": "manual",
    "mode": "manual",
    "startedAt": null,
    "completedAt": null,
    "passCount": 0,
    "failCount": 0,
    "skipCount": 0,
    "errorMessage": null,
    "reportStatus": "none",
    "reportLocale": null
  }
}

Errors

CodeHTTPDescription
SCAN_ALREADY_RUNNING409A scan (of any type) is already in progress for this tenant
TENANT_NOT_CONNECTED400Microsoft consent has not been completed for this tenant
AUTH_INSUFFICIENT_SCOPE403On-demand scans not available on the current plan
SCAN_TYPE_DISABLED403This scan type is currently disabled for the tenant
SCAN_PLAN_LIMIT_REACHED429Plan scan window reached (the scan window for your plan)

Other Scan Operations

EndpointDescription
POST /scans/{scanId}/cancelCancels a pending or running scan. A terminal-state scan returns 409 SCAN_NOT_CANCELLABLE. Returns the scan.
PATCH /scans/{scanId}/hideHides the scan from the default list (data: null). Reverse with PATCH /scans/{scanId}/unhide.
DELETE /scans/{scanId}Deletes a scan and its results. A pending or running scan returns 409 SCAN_NOT_DELETABLE - cancel it first.
Was this page helpful?