> ## 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.

# List Pentests

List and query pentests.

<Note>
  External Documentation

  To learn more, visit the [Cobalt documentation](https://cobalt-public-api.netlify.app/v2/#get-all-pentests).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter       | Description                                                                                          |
  | --------------- | ---------------------------------------------------------------------------------------------------- |
  | Organization ID | The ID of the organization the assets belong to. Can be obtained by the `List Organizations` action. |
  | State           | Returns pentests that match the chosen state.                                                        |
  | Testing Type    | Returns pentests that match the chosen Testing Type.                                                 |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter      | Description                                                                                              |
  | -------------- | -------------------------------------------------------------------------------------------------------- |
  | Asset ID       | Returns pentests scoped to this asset id. Can be obtained by the `List Assets` action.                   |
  | Cursor         | Specifies the pagination cursor for the next page.                                                       |
  | Ended after    | Returns pentests that ended after the given date.                                                        |
  | Ended before   | Returns pentests that ended before the given date.                                                       |
  | Limit          | Number of results per page, valid range is 1-100.                                                        |
  | Platform Tag   | Returns pentests with specified platform tags. Multiple tags can be specified by a comma separated list. |
  | Sort           | Returns pentests sorted by chosen property.                                                              |
  | Started after  | Returns pentests that started after the given date.                                                      |
  | Started before | Returns pentests that started before the given date.                                                     |
</div>

## Example Output

```json theme={"dark"}
{
	"data": [
		{
			"resource": {
				"id": "pt_JQJpAAMjyc8sVtXW2X2Aq5",
				"title": "HR System Security Test 2022-Q4",
				"objectives": "Coverage of OWASP top 10, ASVS and application logic.",
				"state": "new",
				"tag": "#PT5940",
				"asset_id": "as_4L4ZjKgfzP7VBwUmqCZmmL",
				"testing_type": "agile",
				"platform_tags": [
					"rails",
					"ruby",
					"aws"
				],
				"methodology": "web",
				"targets": [
					"https://cobalt.io",
					"192.168.1.1"
				],
				"start_date": "Dec 11 2019",
				"end_date": "Dec 25 2019"
			},
			"links": {
				"ui": {
					"url": "https://api.us.cobalt.io/links/eyJ0eXBlIjoic29tZXRoaW5nIiwib3JnU2x1ZyI6ImNvYmFsdCIsInBlbnRlc3RUYWciOiJz="
				}
			}
		}
	],
	"pagination": {
		"next_page": "/pentests?cursor=a1b2c3d4",
		"prev_page": "/pentests?cursor=4d3c2b1a"
	}
}
```

## Workflow Library Example

[List Pentests with Cobalt and Send Results Via Email](https://library.blinkops.com/workflows/list-pentests-with-cobalt-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/list-pentests-with-cobalt-and-send-results-via-email/canvas" />
</div>
