> For the complete documentation index, see [llms.txt](https://detected.gitbook.io/detected-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-docs/analysis.md).

# Analysis

Analysis results for a profile.

## Retrieve profile analysis

> Returns the analysis for a profile. It includes the overall score and risk level and a detailed report grouped by rule group.

```json
{"openapi":"3.0.0","info":{"title":"Detected API","version":"v2"},"tags":[{"name":"Analysis","description":"Analysis results for a profile."}],"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 from `POST /oauth/token` with 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":{"uuid":{"name":"uuid","in":"path","description":"UUID of the item named in the path, for example the profile in `/profiles/{uuid}` or the representative in `/representatives/{uuid}`.","required":true,"schema":{"type":"string","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":{"description":"Workflow used to produce the analysis.","type":"array","items":{"properties":{"id":{"description":"Analysis workflow (profile) UUID.","type":"string","nullable":false},"name":{"description":"Analysis workflow (profile) name.","type":"string","nullable":false}},"type":"object"}},"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":false},"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.","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"}},"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":["Analysis"],"summary":"Retrieve profile analysis","description":"Returns the analysis for a profile. It includes the overall score and risk level and a detailed report grouped by rule group.","operationId":"profiles-analysis-list","parameters":[{"$ref":"#/components/parameters/uuid"}],"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":{"$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-docs/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.
