> For the complete documentation index, see [llms.txt](https://detected.gitbook.io/detected-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://detected.gitbook.io/detected-api-docs/api-reference/profiles/risk-analysis.md).

# Risk Analysis

The results from the risk engine, including every risk rule, which rules triggered a score, and the related thresholds. The risk engine can run several times over the lifecycle of a profile, so a profile can have multiple sets of analysis.

## List profile risk analyses

> Returns all the risk analyses that have been performed on the profile. Each analysis contains the rules, results, scores and thresholds. The most recent risk analysis is returned first. Returns \`404\` if no risk analysis has been run for the profile.

```json
{"openapi":"3.0.0","info":{"title":"Detected API","version":"v2"},"tags":[{"name":"Profile Risk Analysis","description":"The results from the risk engine, including every risk rule, which rules triggered a score, and the related thresholds. The risk engine can run several times over the lifecycle of a profile, so a profile can have multiple sets of analysis."}],"servers":[{"url":"https://api.detected.app/api/v2/public","description":"Production"}],"security":[{"AccessToken":[]}],"components":{"securitySchemes":{"AccessToken":{"type":"http","description":"The API uses OAuth 2.0. Request an access token with **Create an access token** (`POST /oauth/token`), sending the client ID and client secret of your integration client, and your account slug. Send the access token in the `Authorization` header of every request, in the format `Authorization: Bearer <access_token>`. The access token carries the scopes set on your integration client in the dashboard. Access tokens expire. When one expires, request a new one.","bearerFormat":"OAuth 2.0 access token","scheme":"bearer"}},"parameters":{"profileUuid":{"name":"uuid","in":"path","description":"UUID of the profile.","required":true,"schema":{"type":"string","format":"uuid","nullable":false}}},"headers":{"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the rate limit window.","schema":{"type":"number","nullable":false}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window.","schema":{"type":"number","nullable":false}},"Retry-After":{"description":"Number of seconds to wait before making another request. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}},"X-RateLimit-Reset":{"description":"Unix timestamp (in seconds) at which the rate limit resets. Returned when the rate limit has been reached.","schema":{"type":"number","nullable":false}}},"schemas":{"AnalysisResource":{"title":"Profile Analysis Response","properties":{"id":{"description":"Analysis UUID.","type":"string","nullable":false},"status":{"description":"Status of the analysis.","type":"string","enum":["failed","completed","pending","missing_data"],"nullable":false},"score":{"description":"Overall score of the analysis.","type":"integer","nullable":false},"workflow":{"properties":{"id":{"description":"Analysis workflow (profile) UUID.","type":"string","nullable":false},"name":{"description":"Analysis workflow (profile) name.","type":"string","nullable":false}},"type":"object","description":"Workflow used to produce the analysis."},"risk":{"description":"Name of the risk level for the score.","type":"string","nullable":false},"report":{"description":"Detailed report, grouped by rule group.","type":"array","items":{"properties":{"name":{"description":"Name of the rule group.","type":"string","nullable":false},"total_rules":{"description":"Number of rules in the group.","type":"integer","nullable":false},"total_completed_rules":{"description":"Number of rules in the group that have completed.","type":"integer","nullable":false},"result":{"description":"Results of the rules in the group.","type":"array","items":{"properties":{"id":{"description":"Analysis report UUID.","type":"string","nullable":false},"analysis_id":{"description":"Analysis UUID.","type":"string","nullable":false},"score":{"description":"Analysis report score.","type":"integer","nullable":false},"state":{"description":"State of the rule: `skipped`, `analysed` or `failed`.","type":"string","enum":["skipped","analysed","failed"],"nullable":false},"label":{"description":"Name of the rule.","type":"string","nullable":false},"description":{"description":"What the rule checks.","type":"string","nullable":true},"result":{"description":"Outcome of the rule, for example `Passed`.","type":"string","nullable":false}},"type":"object"}}},"type":"object"}},"created_at":{"description":"Date and time the analysis was created, in the format `DD-MM-YYYY HH:MM:SS` with no timezone, for example `03-11-2025 11:26:34` (3 November 2025).","type":"string","nullable":false}},"type":"object"}},"responses":{"401":{"description":"Unauthorized. The access token is missing, invalid or has expired.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}},"404":{"description":"Not Found. The requested resource does not exist, or is not available to your account.","content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"},"error":{"description":"Machine-readable details of the error.","type":"object","properties":{"key":{"description":"Error code, for example `error.generic`.","type":"string"},"params":{"description":"Values used in the error message, if any.","type":"array","items":{}}}}},"type":"object"}}}},"429":{"description":"Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the `Retry-After` header before trying again.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"}},"content":{"application/json":{"schema":{"properties":{"message":{"description":"A human-readable description of the error.","type":"string"}},"type":"object"}}}}}},"paths":{"/profiles/{uuid}/analysis":{"get":{"tags":["Profile Risk Analysis"],"summary":"List profile risk analyses","description":"Returns all the risk analyses that have been performed on the profile. Each analysis contains the rules, results, scores and thresholds. The most recent risk analysis is returned first. Returns `404` if no risk analysis has been run for the profile.","operationId":"profiles-analysis-list","parameters":[{"$ref":"#/components/parameters/profileUuid"}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"properties":{"data":{"description":"The risk analyses for the profile, most recent first.","type":"array","items":{"$ref":"#/components/schemas/AnalysisResource"}}},"type":"object"}}}},"401":{"$ref":"#/components/responses/401"},"404":{"$ref":"#/components/responses/404"},"429":{"$ref":"#/components/responses/429"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://detected.gitbook.io/detected-api-docs/api-reference/profiles/risk-analysis.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
