> For the complete documentation index, see [llms.txt](https://docs.adsecure.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.adsecure.com/api/graphql/analysis.md).

# Analysis

```
version   : 0.0.0
stability : stable
```

## Objects

### Analysis

Fields

| Name                | Type                                                       | Description                                                  |
| ------------------- | ---------------------------------------------------------- | ------------------------------------------------------------ |
| organization        | [Organization!](/api/graphql/organization.md#organization) | The organization of the analysis.                            |
| account             | [Account!](/api/graphql/account.md#account)                | The account of the Analysis.                                 |
| owner               | [User!](/api/graphql/viewer.md#user)                       | The user of the analysis.                                    |
| project             | [Project](/api/graphql/project.md#project)                 | The project of the analysis.                                 |
| id                  | [ID!](/api/graphql/scalars.md#id)                          | The ID of the analysis.                                      |
| name                | [String](/api/graphql/scalars.md#string)                   | The name of the analysis.                                    |
| content             | [String](/api/graphql/scalars.md#string)                   | The URL/HTML snippet of the analysis.                        |
| source              | [AnalysisSource!](/api/graphql/enums.md#analysissource)    | The source of the analysis.                                  |
| status              | [Status!](/api/graphql/enums.md#status)                    | The status of the analysis.                                  |
| initialTime         | [DateTime!](/api/graphql/scalars.md#datetime)              | The time of creation of the Analysis                         |
| doneTime            | [DateTime](/api/graphql/scalars.md#datetime)               | The time of the last update of the analysis.                 |
| device              | [Device](/api/graphql/device.md#device)                    | The device of the analysis.                                  |
| location            | [Location](/api/graphql/location.md#location)              | The location of the analysis.                                |
| violations          | [\[String\]](/api/graphql/scalars.md#string)               | The violations of the Analysis                               |
| violation           | [Boolean](/api/graphql/scalars.md#boolean)                 | Whether the analysis has any violation.                      |
| report              | Report                                                     | The report location of the analysis.                         |
| alertViolations     | [\[String\]](/api/graphql/scalars.md#string)               | The violations that will generate an alert for the analysis. |
| alert               | [Boolean](/api/graphql/scalars.md#boolean)                 | Whether the analysis has any alert.                          |
| notifications       | [\[AnalysisNotification\]](#analysisnotification)          | The notifications of the analysis.                           |
| preset              | [PresetList!](/api/graphql/enums.md#presetlist)            | The preset of the Analysis.                                  |
| whitelistViolations | [\[String\]](/api/graphql/scalars.md#string)               | The violations that will be whitelisted for the analysis.    |
| screenshots         | [\[String\]](/api/graphql/scalars.md#string)               | The screenshots of the analysis                              |

### Report

Fields

| Name | Type                                      | Description          |
| ---- | ----------------------------------------- | -------------------- |
| url  | [String!](/api/graphql/scalars.md#string) | The report full URL. |
| base | [String!](/api/graphql/scalars.md#string) | The report base.     |
| path | [String!](/api/graphql/scalars.md#string) | The report path.     |

### AnalysisNotification

Fields

| Name    | Type                                      | Description                                          |
| ------- | ----------------------------------------- | ---------------------------------------------------- |
| trigger | [String!](/api/graphql/scalars.md#string) | The trigger for the analysis's notification.         |
| uri     | [String!](/api/graphql/scalars.md#string) | The URI to be fired for the analysis's notification. |

### AnalysisEdge

Fields

| Name   | Type                                          | Description |
| ------ | --------------------------------------------- | ----------- |
| cursor | [ID!](/api/graphql/scalars.md#id)             | -           |
| node   | [Analysis](/api/graphql/analysis.md#analysis) | -           |

### PageInfo

Information about type pagination in a connection. Fields

| Name            | Type                                        | Description                                        |
| --------------- | ------------------------------------------- | -------------------------------------------------- |
| startCursor     | [ID](/api/graphql/scalars.md#id)            | When paginating backwards, the cursor to continue. |
| endCursor       | [ID](/api/graphql/scalars.md#id)            | When paginating forwards, the cursor to continue.  |
| hasNextPage     | [Boolean!](/api/graphql/scalars.md#boolean) | When paginating forwards, are there more items?    |
| hasPreviousPage | [Boolean!](/api/graphql/scalars.md#boolean) | When paginating backwards, are there more items?   |

### AnalysisConnection

Fields

| Name     | Type                                                       | Description |
| -------- | ---------------------------------------------------------- | ----------- |
| edges    | [\[AnalysisEdge\]!](/api/graphql/analysis.md#analysisedge) | -           |
| nodes    | [\[Analysis\]!](/api/graphql/analysis.md#analysis)         | -           |
| pageInfo | [PageInfo!](/api/graphql/violation.md#pageinfo)            | -           |

## Queries

### `analysis`

Returns: [Analysis](/api/graphql/analysis.md#analysis)

Arguments

| Name | Type                                      | Description |
| ---- | ----------------------------------------- | ----------- |
| id   | [String!](/api/graphql/scalars.md#string) | -           |

### `analyses`

Returns: [AnalysisConnection](/api/graphql/analysis.md#analysisconnection)

Arguments

| Name         | Type                                               | Description                                                               |
| ------------ | -------------------------------------------------- | ------------------------------------------------------------------------- |
| first        | [Int!](/api/graphql/scalars.md#int)                | Returns the first n elements from the list.                               |
| after        | [String](/api/graphql/scalars.md#string)           | Returns the elements in the list that come after the specified global ID. |
| devices      | [\[String\]](/api/graphql/scalars.md#string)       | A devices to filter analysis by.                                          |
| term         | [String](/api/graphql/scalars.md#string)           | A term to search for.                                                     |
| locations    | [\[String\]](/api/graphql/scalars.md#string)       | List of locations to filter analysis by.                                  |
| locationType | [LocationType](/api/graphql/enums.md#locationtype) | A location type to filter analysis by.                                    |
| source       | [String](/api/graphql/scalars.md#string)           | Source to filter analysis by.                                             |
| status       | [String](/api/graphql/scalars.md#string)           | Status to filter analysis by.                                             |
| project      | [String](/api/graphql/scalars.md#string)           | Project to filter analysis by.                                            |
| alert        | [Boolean](/api/graphql/scalars.md#boolean)         | Get only analysis with alerts.                                            |
| violation    | [Boolean](/api/graphql/scalars.md#boolean)         | Get only analysis with violations.                                        |
| violations   | [\[String\]](/api/graphql/scalars.md#string)       | Get only analysis with particular violations.                             |
| order        | [Order](/api/graphql/enums.md#order)               | Sort of the analysis.                                                     |
| initDate     | [DateTime](/api/graphql/scalars.md#datetime)       | Initial date to filter analysis by.                                       |
| endDate      | [DateTime](/api/graphql/scalars.md#datetime)       | End date to filter analysis by.                                           |

## Mutations

### `createAnalysis`

Returns: [Analysis](/api/graphql/analysis.md#analysis)

Arguments

| Name  | Type                                                                                 | Description |
| ----- | ------------------------------------------------------------------------------------ | ----------- |
| input | [CreateAnalysisMutationInput!](/api/graphql/analysis.md#createanalysismutationinput) | -           |

## Inputs

### `CreateAnalysisMutationInput`

Fields

| Name          | Type                                                         | Description                                                                                | Default                    |
| ------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -------------------------- |
| name          | [ConstraintString](/api/graphql/scalars.md#constraintstring) | The name of the analysis, allowed characters are alphanumeric, whitespace as well as -\_() | .,/:+# (max 64 characters) |
| content       | [ConstraintString](/api/graphql/scalars.md#constraintstring) | The URL/HTML snippet to analyze                                                            | -                          |
| device        | [ConstraintString](/api/graphql/scalars.md#constraintstring) | The Device of the Analysis                                                                 | -                          |
| location      | [LocationInput](#LocationInput)                              | The Location of the Analysis                                                               | -                          |
| notifications | [\[String\]](/api/graphql/scalars.md#string)                 | The Notifications of the Analysis                                                          | -                          |
| alertRule     | [ConstraintString](/api/graphql/scalars.md#constraintstring) | The alert rule for the Analysis                                                            | -                          |
| preset        | [PresetList](/api/graphql/enums.md#presetlist)               | The preset of the Analysis.                                                                | -                          |


---

# 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://docs.adsecure.com/api/graphql/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.
