Skip to main content

How to list scans

Manage the scans by listing them using pagination. You can list scans at two different levels:

  • By account - List scans of all the targets in your account.
  • By target - List scans of a specific target.

Step 1: List the scans (first page)

Start by listing the first page of scans.

In this request, no path parameters are needed since it is for the whole account.

Request
curl https://api.probely.com/scans/ \
-X GET \
-H 'Authorization: JWT <YOUR_API_TOKEN>' \
-H "Content-Type: application/json"

The response returns the information on:

  • The total number of scans (”count”: 784).
  • The total number of pages (”page_total”: 79).
  • The current page (”page”: 1).
  • The page size (”length”: 10).
  • The list of scans on the page (”results”: [...]).
Response
{
"count": 784,
"page_total": 79,
"page": 1,
"length": 10,
"results": [
{
"id": "4dPZ1tRAg1vr",
"target": {
"id": "3n51GK9X1on9",
"name": "",
"site": {
"id": "29uiNA1Th5uP",
"name": "My API target",
"desc": "",
"url": "http://api.example.com/",
"host": "api.example.com",
...
}
...
},
"status": "canceled",
"started": "2024-09-11T15:51:56.221238Z",
"completed": "2024-09-11T15:52:23.161521Z",
"scan_profile": "api_normal",
"lows": 0,
"mediums": 0,
"highs": 0,
"created": "2024-09-11T15:51:51.385561Z",
...
}
{
"id": "NrcdAkeRok3V",
"target": {
"id": "44VJ7XFUgnSx",
"name": "",
"site": {
"id": "3Vm6PFiywcif",
"name": "My Web App target",
"desc": "",
"url": "https://app.example.com/",
"host": "app.example.com",
...
}
...
},
"status": "completed",
"started": "2024-09-07T11:13:35.315624Z",
"completed": "2024-09-07T15:54:44.088946Z",
"scan_profile": "normal",
"lows": 19,
"mediums": 2,
"highs": 2,
"created": "2024-09-07T11:13:28.059029Z",
...
}
...
]
}

Step 2: List the scans (second page)

Since there are more scans, list the scans on the second page by adding the page=2 query parameter.

Request
curl https://api.probely.com/scans/?page=2 \
-X GET \
-H 'Authorization: JWT <YOUR_API_TOKEN>' \
-H "Content-Type: application/json"

The response returns the second page (”page”: 2) with the second set of scans (”results”: [...]).

Response
{
{
"count": 784,
"page_total": 79,
"page": 2,
"length": 10,
"results": [
{
"id": "3yptz5Xqd3cC",
"target": {
"id": "KLj1KcyGAE6v",
"name": "",
"site": {
"id": "38zqVR1Jtd5N",
"name": "My Web App II target",
"desc": "",
"url": "http://example2.com/",
"host": "example2.com",
...
}
...
},
"status": "completed",
"started": "2024-08-24T04:00:27.414415Z",
"completed": "2024-08-24T04:38:58.903206Z",
"scan_profile": "safe",
"lows": 12,
"mediums": 4,
"highs": 10,
"created": "2024-08-24T04:00:10.377318Z",
...
}
{
"id": "2GuVT1s5U3ua",
"target": {
"id": "3jWDPrNpAhSK",
"name": "",
"site": {
"id": "44r1jaiKbqHP",
"name": "My API II target",
"desc": "",
"url": "http://api.example2.com/",
"host": "api.example2.com",
...
}
...
},
"status": "completed",
"started": "2024-08-16T04:00:31.905272Z",
"completed": "2024-08-16T18:27:50.110955Z",
"scan_profile": "api_normal",
"lows": 2,
"mediums": 7,
"highs": 20,
"created": "2024-08-16T04:00:13.228359Z",
...
}
...
]
}

Change the page number to move on to the scans on the other pages.

You can use other query parameters to adjust the pagination or to filter scans according to your needs. Check the API reference documentation on the List Account's Scans and List Target's Scans endpoints for more details.