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

# Retrieve List Of Scans

Get a list of scans.

<Note>
  External Documentation

  To learn more, visit the [Checkmarx One documentation](https://checkmarx.stoplight.io/docs/checkmarx-one-api-reference-guide/v2u57n2kkov6s-retrieve-list-of-scans).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter        | Description                                                                                                                                                                                                     |
  | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Branches         | A comma-separated list of branch names to filter results by.                                                                                                                                                    |
  | Groups           | A list of group IDs to filter results by, separated by the `OR` operator.<br /><br />**Note:** Use an exact match.                                                                                              |
  | Initiators       | A comma-separated list of user identifiers that initiated the scans to filter results by.                                                                                                                       |
  | Project IDs      | A list of project IDs to filter results by, separated by the `OR` operator.                                                                                                                                     |
  | Return All Pages | Automatically fetch all resources, page by page.                                                                                                                                                                |
  | Scan IDs         | A list of scan IDs to filter results by, separated by the `OR` operator.<br /><br />**Note:** Use an exact match.                                                                                               |
  | Sort             | The field to sort the results by.<br /><br />\* Use `+` for ascending order and `-` for descending order. <br />\* The maximum number of fields to sort by is **3**.<br />\* Default: `+created_at`, `+status`. |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter      | Description                                                                                                                       |
  | -------------- | --------------------------------------------------------------------------------------------------------------------------------- |
  | Correlation ID | A unique identifier used to track a single request across multiple services.                                                      |
  | From Date      | Specify the start date and time from which to retrieve the results.                                                               |
  | Limit          | The maximum number of items to return per page.                                                                                   |
  | Offset         | The offset of the item at which to begin the response.                                                                            |
  | Project Names  | A comma-separated list of project names to filter results by.                                                                     |
  | Search         | A partial-match string that is a substring of any scan parameter.                                                                 |
  | Source Origins | The original triggering source of the scan to filter results by.                                                                  |
  | Source Types   | The code submission type to filter results by.                                                                                    |
  | Statuses       | A list of scan statuses to filter results by.                                                                                     |
  | Tags Keys      | A list of tag keys to filter results by, based on the assigned keys in `key:value` pairs, separated by the `OR` operator.         |
  | Tags Values    | A list of tag values to filter results by, based on the assigned values in the `key:value` pairs, separated by the `OR` operator. |
  | To Date        | Specify the end date and time until which to retrieve the results.                                                                |
</div>

## Example Output

```json theme={"dark"}
{
	"totalCount": 2887,
	"filteredTotalCount": 2887,
	"scans": [
		{
			"id": "67cde54a-09c6-472f-87f4-1efd4a9f5dc4",
			"status": "Failed",
			"branch": "master",
			"createdAt": "2021-08-25T07:43:38.431606Z",
			"updatedAt": "2021-08-25T07:43:39.169448Z",
			"projectId": "3c8ea135-fc30-4fe7-b888-0e8a67d8c678",
			"projectName": "prod_test",
			"userAgent": "ASTCLI/2.0.0-rc.21",
			"initiator": "pedro",
			"tags": {},
			"metadata": {
				"id": "67cde54a-09c6-472f-87f4-1efd4a9f5dc4",
				"type": "git",
				"Handler": {
					"GitHandler": {
						"branch": "master",
						"repo_url": "https://github.com/pedrompflopes/ast-github-tester",
						"credentials": {
							"value": "*****",
							"username": "*****"
						}
					}
				},
				"configs": [
					{
						"type": "sast",
						"value": {
							"presetName": "Checkmarx Default",
							"incremental": "false"
						}
					},
					{
						"type": "kics"
					},
					{
						"type": "sca"
					}
				],
				"project": {
					"id": "3c8ea135-fc30-4fe7-b888-0e8a67d8c678"
				},
				"created_at": {
					"nanos": 381404397,
					"seconds": 1629877418
				}
			},
			"engines": null,
			"sourceType": "",
			"sourceOrigin": ""
		},
		{
			"id": "0d4293da-f407-4a25-8a24-d06ada1144b2",
			"status": "Completed",
			"branch": "main",
			"createdAt": "2021-08-25T07:44:21.491533Z",
			"updatedAt": "2021-08-25T07:44:57.283567Z",
			"projectId": "3c8ea135-fc30-4fe7-b888-0e8a67d8c678",
			"projectName": "prod_test",
			"userAgent": "ASTCLI/2.0.0-rc.21",
			"initiator": "pedro",
			"tags": {},
			"metadata": {
				"id": "0d4293da-f407-4a25-8a24-d06ada1144b2",
				"type": "git",
				"Handler": {
					"GitHandler": {
						"branch": "main",
						"repo_url": "https://github.com/pedrompflopes/ast-github-tester",
						"credentials": {
							"value": "*****",
							"username": "*****"
						}
					}
				},
				"configs": [
					{
						"type": "sast",
						"value": {
							"presetName": "Checkmarx Default",
							"incremental": "false"
						}
					},
					{
						"type": "kics"
					},
					{
						"type": "sca"
					}
				],
				"project": {
					"id": "3c8ea135-fc30-4fe7-b888-0e8a67d8c678"
				},
				"created_at": {
					"nanos": 448221189,
					"seconds": 1629877461
				}
			},
			"engines": null,
			"sourceType": "",
			"sourceOrigin": ""
		},
		{
			"id": "b4c5fdd3-a629-457a-8af0-95d7357ae35d",
			"status": "Completed",
			"branch": "main",
			"createdAt": "2021-08-25T07:49:56.94374Z",
			"updatedAt": "2021-08-25T07:50:34.580679Z",
			"projectId": "3c8ea135-fc30-4fe7-b888-0e8a67d8c678",
			"projectName": "prod_test",
			"userAgent": "ASTCLI/2.0.0-rc.21",
			"initiator": "pedro",
			"tags": {},
			"metadata": {
				"id": "b4c5fdd3-a629-457a-8af0-95d7357ae35d",
				"type": "git",
				"Handler": {
					"GitHandler": {
						"branch": "main",
						"repo_url": "https://github.com/pedrompflopes/ast-github-tester",
						"credentials": {
							"value": "*****",
							"username": "*****"
						}
					}
				},
				"configs": [
					{
						"type": "sast",
						"value": {
							"presetName": "Checkmarx Default",
							"incremental": "false"
						}
					},
					{
						"type": "kics"
					},
					{
						"type": "sca"
					}
				],
				"project": {
					"id": "3c8ea135-fc30-4fe7-b888-0e8a67d8c678"
				},
				"created_at": {
					"nanos": 883997904,
					"seconds": 1629877796
				}
			},
			"engines": null,
			"sourceType": "",
			"sourceOrigin": ""
		}
	]
}
```

## Workflow Library Example

[Retrieve List of Scans with Checkmarx One and Send Results Via Email](https://library.blinkops.com/workflows/retrieve-list-of-scans-with-checkmarx-one-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/retrieve-list-of-scans-with-checkmarx-one-and-send-results-via-email/canvas" />
</div>
