> ## Documentation Index
> Fetch the complete documentation index at: https://developers.argosidentity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /analyses/:analysisId

> Retrieve detailed analysis results including risk assessment, extracted data, audit logs, and findings.

## Endpoint

```
GET /v1/analyses/{analysisId}
```

## Request

```bash theme={null}
curl -X GET "http://client-omni-api.argosidentity.com/v1/analyses/{analysisId}?waitForReport=true&timeoutSeconds=120" \
  -H "x-api-key: your-api-key-here"
```

## Query Parameters

| Parameter        | Type      | Required | Default | Description                               |
| ---------------- | --------- | -------- | ------- | ----------------------------------------- |
| `waitForReport`  | `boolean` |          | `false` | Wait for report generation (long polling) |
| `timeoutSeconds` | `number`  |          | `120`   | Max wait time in seconds (10–300)         |

<Note>
  When `waitForReport` is set to `true`, the request will hold the connection open until the report is generated or the `timeoutSeconds` threshold is reached. This is useful for synchronous workflows where you need the report immediately after analysis completes.
</Note>

***

## Response Structure

The analysis response has a **fixed skeleton** (top-level fields, risk assessment, system metadata, findings, etc.) that is always present regardless of your workflow configuration.

<Note>
  The `extractedData` and `outputSchema` sections are **determined by your workflow's output schema configuration**. The fields inside them change depending on how you defined your output schema. The example below shows a KYB verification workflow — your results will have different fields based on your own schema.
</Note>

***

## Top-Level Fields

These fields are always present in every analysis response.

<ResponseField name="id" type="string" required>
  Unique analysis ID (`analysis_` prefix)
</ResponseField>

<ResponseField name="profileId" type="string" required>
  Profile ID this analysis belongs to
</ResponseField>

<ResponseField name="folderId" type="string | null" required>
  Target folder ID (`null` for full-profile analysis)
</ResponseField>

<ResponseField name="engineId" type="string | null" required>
  Engine ID used (`null` when using default engine)
</ResponseField>

<ResponseField name="playbookId" type="string" required>
  Playbook ID used for the analysis (`PB-` prefix)
</ResponseField>

<ResponseField name="engine" type="object | null" required>
  Engine details (`null` when using default engine)
</ResponseField>

<ResponseField name="status" type="string" required>
  Analysis status: `pending` / `processing` / `completed` / `failed`
</ResponseField>

<ResponseField name="processingTimeMs" type="number" required>
  Processing time in milliseconds
</ResponseField>

<ResponseField name="verificationStatus" type="string" required>
  Final verification status: `pending_review` / `approved` / `rejected`
</ResponseField>

<ResponseField name="error" type="string | null" required>
  Error message (`null` on success)
</ResponseField>

<ResponseField name="options" type="object | null">
  Options passed when the analysis was requested
</ResponseField>

<ResponseField name="clientMetadata" type="object | null">
  Client metadata passed when the analysis was requested
</ResponseField>

<ResponseField name="primaryReportId" type="string | null">
  Primary report ID generated for this analysis (`rpt_` prefix)
</ResponseField>

<ResponseField name="requestedAt" type="string" required>
  Analysis request time (ISO 8601)
</ResponseField>

<ResponseField name="completedAt" type="string | null" required>
  Analysis completion time (ISO 8601, `null` if not completed)
</ResponseField>

<ResponseField name="createdAt" type="string" required>
  Record creation time (ISO 8601)
</ResponseField>

***

## `riskAssessment` — Risk Assessment

Final risk assessment computed by the AI agent after all verification steps.

| Field         | Type       | Description                                    |
| ------------- | ---------- | ---------------------------------------------- |
| `riskLevel`   | `string`   | Risk level: `low` / `medium` / `high`          |
| `riskScore`   | `number`   | Risk score (0–100, higher = riskier)           |
| `riskFactors` | `string[]` | List of factors contributing to the risk level |

***

## `systemMetadata` — Execution Metadata

Internal execution information from the AI agent during analysis.

| Field              | Type       | Description                              |
| ------------------ | ---------- | ---------------------------------------- |
| `totalIterations`  | `number`   | Total iterations performed by the agent  |
| `completedWorkIds` | `number[]` | IDs of successfully completed work items |
| `workflowHistory`  | `object[]` | Execution summary for each work item     |

### `systemMetadata.workflowHistory[]`

| Field        | Type      | Description                         |
| ------------ | --------- | ----------------------------------- |
| `workId`     | `number`  | Work sequence number (starts at 1)  |
| `actionName` | `string`  | Executed action function name       |
| `query`      | `string`  | Query/instruction used by the agent |
| `reason`     | `string`  | Agent's reasoning for the result    |
| `success`    | `boolean` | Whether the work succeeded          |
| `iteration`  | `number`  | Iteration number when completed     |
| `timestamp`  | `string`  | Completion time (ISO 8601)          |

***

## `extractedData` — Extracted Structured Data

<Warning>
  **This section is dynamic.** The fields inside `extractedData` are determined by the [output schema](/en/omni/dashboard/workflow-setup/output-schema) you defined in your workflow. The example below is from a KYB workflow with business registration verification — your fields will differ.
</Warning>

The AI extracts data from documents and structures it according to your output schema. The following sub-sections are common patterns:

### `extractedData.review_result` — Final Review Result

| Field                     | Type     | Description                                          |
| ------------------------- | -------- | ---------------------------------------------------- |
| `final_action`            | `string` | Final action: `approve` / `reject` / `manual_review` |
| `final_risk_level`        | `string` | Final risk level: `low` / `medium` / `high`          |
| `final_action_reason`     | `string` | Reasoning for the final action                       |
| `final_risk_level_reason` | `string` | Reasoning for the final risk level                   |

### `extractedData.extracted_values` — Raw Extracted Values

Values extracted directly from submitted documents. The fields depend on your output schema definition.

**Example (KYB with business registration):**

| Field                               | Type     | Description                                         |
| ----------------------------------- | -------- | --------------------------------------------------- |
| `brc_business_name`                 | `string` | Company name from business registration certificate |
| `brc_business_registration_number`  | `string` | Business registration number                        |
| `brc_corporate_registration_number` | `string` | Corporate registration number                       |
| `brc_representative_name`           | `string` | Representative name                                 |
| `brc_address`                       | `string` | Business address                                    |
| `brc_opening_date`                  | `string` | Opening date                                        |
| `brc_issue_date`                    | `string` | Issue date                                          |

### `extractedData.category_judgements` — Verification Judgements

Per-category verification results with pass/fail status and reasoning.

| Field                        | Type     | Description                                                     |
| ---------------------------- | -------- | --------------------------------------------------------------- |
| `{field}_check_result`       | `string` | Check result: `pass` / `fail` / `unverifiable` / `needs_review` |
| `{field}_check_reason`       | `string` | Reasoning for the check result                                  |
| `overall_consistency_result` | `string` | Overall consistency: `pass` / `needs_review` / `fail`           |
| `overall_consistency_reason` | `string` | Reasoning for overall consistency                               |

### `extractedData.document_validations` — Document Validity

| Field                        | Type      | Description                   |
| ---------------------------- | --------- | ----------------------------- |
| `{document}_is_valid`        | `boolean` | Whether the document is valid |
| `{document}_is_valid_reason` | `string`  | Reasoning for validity check  |

***

## `outputSchema` — Enriched Output Schema

<Note>
  Contains the same data as `extractedData`, structured as your workflow's JSON Schema with actual values filled in. Use `extractedData` as the canonical field.
</Note>

### Common fields in `outputSchema.properties`

| Field                    | Type       | Description                             |
| ------------------------ | ---------- | --------------------------------------- |
| `request_id`             | `string`   | Request identifier (same as profile ID) |
| `policy_flags`           | `string[]` | Policy violation/caution flags          |
| `review_result`          | `object`   | Final review result                     |
| `extracted_values`       | `object`   | Raw extracted values from documents     |
| `category_judgements`    | `object`   | Per-category verification judgements    |
| `document_validations`   | `object`   | Document validity results               |
| `recommended_next_steps` | `string[]` | AI-recommended follow-up actions        |

***

## `extractionStatus` — Field Extraction Status

Status map indicating whether each top-level output schema field was successfully extracted.

| Value         | Meaning                                              |
| ------------- | ---------------------------------------------------- |
| `"extracted"` | Field was successfully extracted/generated           |
| `"missing"`   | Field extraction failed (no document or information) |

***

## `rawActionResults` — Raw Action Results

Raw result data returned by each AI action. Keys are `actionName`.

| Field                | Type     | Description                                               |
| -------------------- | -------- | --------------------------------------------------------- |
| `answer`             | `string` | Action result text (RAG response or LLM output)           |
| `workId`             | `number` | Work sequence number                                      |
| `citationsCount`     | `number` | Number of citation chunks used                            |
| `verificationStatus` | `string` | Verification result: `passed` / `needs_review` / `failed` |

***

## `agentAuditLog[]` — Agent Audit Log

Detailed execution log of every step the AI agent performed. More granular than `rawActionResults`, includes MCP tool call details.

| Field                | Type        | Description                                                                                                                                                                                                                                   |                                                                                                                                                                                       |
| -------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `workId`             | `number`    | Work sequence number                                                                                                                                                                                                                          |                                                                                                                                                                                       |
| `actionName`         | `string`    | Action name                                                                                                                                                                                                                                   |                                                                                                                                                                                       |
| `category`           | `string`    | Action category. Examples include `Document Classification`, `Data Extraction`, `Format Validation`, `Status Validation`, `Data Consistency`, `Document Processing`, and `mcp` (external tools). Actual values depend on the workflow policy. |                                                                                                                                                                                       |
| `query`              | `string`    | Query or instruction sent by the agent                                                                                                                                                                                                        |                                                                                                                                                                                       |
| `reasoning`          | `string`    | Agent's reasoning (may be empty)                                                                                                                                                                                                              |                                                                                                                                                                                       |
| `success`            | `boolean`   | Whether execution succeeded                                                                                                                                                                                                                   |                                                                                                                                                                                       |
| `iteration`          | `number`    | Iteration number                                                                                                                                                                                                                              |                                                                                                                                                                                       |
| `durationMs`         | `number`    | Execution duration in milliseconds                                                                                                                                                                                                            |                                                                                                                                                                                       |
| `executedAt`         | `string`    | Execution time (ISO 8601)                                                                                                                                                                                                                     |                                                                                                                                                                                       |
| `verificationStatus` | \`string    | null\`                                                                                                                                                                                                                                        | Per-step verification outcome when applicable (e.g., `passed` / `needs_review` / `failed`). May be omitted for steps that do not produce a pass/fail (such as some MCP-only actions). |
| `targetItemIds`      | `string[]`  | Item IDs referenced by this action                                                                                                                                                                                                            |                                                                                                                                                                                       |
| `ragResponse`        | \`object    | null\`                                                                                                                                                                                                                                        | RAG query result (if applicable)                                                                                                                                                      |
| `mcpToolCalls`       | \`object\[] | null\`                                                                                                                                                                                                                                        | MCP tool call details (if applicable)                                                                                                                                                 |

### `agentAuditLog[].ragResponse`

Present only for actions that performed RAG queries.

| Field              | Type       | Description                          |
| ------------------ | ---------- | ------------------------------------ |
| `answer`           | `string`   | RAG-generated response text          |
| `citations`        | `object[]` | Citation chunks used in the response |
| `chunksSearched`   | `number`   | Number of chunks searched            |
| `processingTimeMs` | `number`   | RAG processing time in milliseconds  |

### `agentAuditLog[].mcpToolCalls[]`

Present only for actions that called MCP external tools (e.g., AML screening).

| Field             | Type      | Description                                              |
| ----------------- | --------- | -------------------------------------------------------- |
| `toolName`        | `string`  | MCP tool name (e.g., `search_individual`)                |
| `engineCode`      | `string`  | Engine identifier for this tool (e.g., `aml-search`)     |
| `engineName`      | `string`  | Display name of the engine (e.g., `AML Search - Person`) |
| `params`          | `object`  | Tool call parameters                                     |
| `success`         | `boolean` | Whether the call succeeded                               |
| `startedAt`       | `string`  | Call start time (ISO 8601)                               |
| `executionTimeMs` | `number`  | Tool call duration in milliseconds                       |
| `rawContent`      | `object`  | Raw response data from the tool                          |
| `fallbackToRag`   | `boolean` | Whether RAG fallback was triggered on failure            |
| `selectionReason` | `string`  | Agent's reason for selecting this tool                   |

***

## `findings[]` — Verification Findings

Sorted summary of each action's result. Designed for UI display.

| Field       | Type     | Description                             |
| ----------- | -------- | --------------------------------------- |
| `id`        | `string` | Finding ID (`af_` prefix)               |
| `category`  | `string` | Category (same as action name)          |
| `result`    | `string` | Result: `passed` / `warning` / `failed` |
| `details`   | `string` | Result details (may be truncated)       |
| `sortOrder` | `number` | Display order                           |

***

## `recommendations[]` — Recommendations

System-generated follow-up action recommendations.

| Field       | Type     | Description                        |
| ----------- | -------- | ---------------------------------- |
| `id`        | `string` | Recommendation ID (`ar_` prefix)   |
| `content`   | `string` | Recommendation content             |
| `priority`  | `number` | Priority (lower = higher priority) |
| `sortOrder` | `number` | Display order                      |

***

## `targetItems[]` — Target Items

Items referenced in this analysis.

| Field       | Type     | Description                         |                       |
| ----------- | -------- | ----------------------------------- | --------------------- |
| `itemId`    | `string` | Item ID (`item_` prefix)            |                       |
| `name`      | `string` | Item name                           |                       |
| `type`      | `string` | Item type: `file` / `text` / `json` |                       |
| `sourceRef` | \`string | null\`                              | Source reference info |

***

## Status Enums

<Tabs>
  <Tab title="Analysis Status">
    | Value        | Description          |
    | ------------ | -------------------- |
    | `pending`    | Awaiting analysis    |
    | `processing` | Analysis in progress |
    | `completed`  | Analysis complete    |
    | `failed`     | Analysis failed      |
  </Tab>

  <Tab title="Verification Status">
    | Value            | Description            |
    | ---------------- | ---------------------- |
    | `pending_review` | Manual review required |
    | `approved`       | Approved               |
    | `rejected`       | Rejected               |
  </Tab>

  <Tab title="Risk Level">
    | Value    | Description |
    | -------- | ----------- |
    | `low`    | Low risk    |
    | `medium` | Medium risk |
    | `high`   | High risk   |
  </Tab>

  <Tab title="Finding Result">
    | Value     | Description             |
    | --------- | ----------------------- |
    | `passed`  | Passed                  |
    | `warning` | Warning (review needed) |
    | `failed`  | Failed                  |
  </Tab>

  <Tab title="Check Result">
    | Value          | Description                      |
    | -------------- | -------------------------------- |
    | `pass`         | Match confirmed                  |
    | `fail`         | Mismatch                         |
    | `unverifiable` | Cannot verify (document missing) |
    | `needs_review` | Further review needed            |
  </Tab>
</Tabs>
