Pentests
2min read
Get All Pentests
This endpoint retrieves a list of all pentests that belong to the organization specified in the X-Org-Token header.
HTTP Request
GET https://api.us.cobalt.io/pentests
URL Parameters
| Parameter | Default | Description |
|---|---|---|
asset | N/A | If specified, returns pentests scoped to this asset id. Example: \nhttps://api.us.cobalt.io/pentests?asset=as_rvZRC5Y |
cursor | N/A | Used for pagination. Example: \nhttps://api.us.cobalt.io/pentests?cursor=a1b2c3d4 |
limit | 1000 | If specified, returns only a specified amount of pentests. Example: \nhttps://api.us.cobalt.io/pentests?limit=5 |
Response Fields
| Field | Description |
|---|---|
id | A unique ID representing the pentest. Starts with pt_ |
title | The title of the returned pentest. |
objectives | The objectives of the pentest, for example, “Coverage of OWASP Top 10” |
asset_id | ID of the asset that the returned pentest belongs to |
platform_tags | Tech stack of the target, for example, Java, Kotlin, Ruby, or AWS. |
methodology | Pentest methodology. Web, API, Web+API, Mobile, External Network and so on. |
targets | Targetted IP addresses, domains, services, and so on. |
start_date | The starting date of the pentest. Format: Dec 11 2019 |
end_date | The ending date of the pentest. Format: Dec 11 2019 |
state | new, in_review, planned, cancelled, live, remediation, or closed |
links.ui.url | A link to redirect an authorized user to this pentest in the Cobalt web application |
curl -X GET "https://api.us.cobalt.io/pentests" \
-H "Accept: application/vnd.cobalt.v1+json" \
-H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
-H "X-Org-Token: YOUR-V1-ORGANIZATION-TOKEN"
The above command returns JSON structured like this:
{
"data": [
{
"resource": {
"id": "pt_rVShby8",
"title": "HR System Security Test 2022-Q4",
"objectives": "Coverage of OWASP top 10, ASVS and application logic.",
"state": "new",
"tag": "#PT5940",
"asset_id": "as_0EY8V1C",
"platform_tags": [
"rails",
"ruby",
"aws"
],
"methodology": "web",
"targets": [
"https://example.com",
"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"
}
}
:::info
Remember - you can only request pentests scoped to the organization specified in the X-Org-Token header.
:::
