Get Scan History
curl --request GET \
--url https://api.projectdiscovery.io/v1/scans/{scanId}/history \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.projectdiscovery.io/v1/scans/{scanId}/history"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.projectdiscovery.io/v1/scans/{scanId}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectdiscovery.io/v1/scans/{scanId}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.projectdiscovery.io/v1/scans/{scanId}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.projectdiscovery.io/v1/scans/{scanId}/history")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.projectdiscovery.io/v1/scans/{scanId}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"current_page": 123,
"result_count": 123,
"total_results": 123,
"total_pages": 123,
"data": [
{
"completed_request": 123,
"name": "<string>",
"scan_id": "<string>",
"scan_time": "<string>",
"severity": {},
"status": "<string>",
"time": "<string>",
"total_request": 123,
"total_result": 123,
"total_target": 123,
"total_templates": 123,
"error_details": "<string>"
}
],
"total_completed_request": 123,
"total_scan_run": 123,
"total_unique_scan_run": 123
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}Scans
Get Scan History
Get scan history detial by scanId
GET
/
v1
/
scans
/
{scanId}
/
history
Get Scan History
curl --request GET \
--url https://api.projectdiscovery.io/v1/scans/{scanId}/history \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.projectdiscovery.io/v1/scans/{scanId}/history"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.projectdiscovery.io/v1/scans/{scanId}/history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectdiscovery.io/v1/scans/{scanId}/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.projectdiscovery.io/v1/scans/{scanId}/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.projectdiscovery.io/v1/scans/{scanId}/history")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.projectdiscovery.io/v1/scans/{scanId}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"current_page": 123,
"result_count": 123,
"total_results": 123,
"total_pages": 123,
"data": [
{
"completed_request": 123,
"name": "<string>",
"scan_id": "<string>",
"scan_time": "<string>",
"severity": {},
"status": "<string>",
"time": "<string>",
"total_request": 123,
"total_result": 123,
"total_target": 123,
"total_templates": 123,
"error_details": "<string>"
}
],
"total_completed_request": 123,
"total_scan_run": 123,
"total_unique_scan_run": 123
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}{
"message": "<string>",
"kind": "<string>",
"code": "<string>",
"error": "<string>",
"error_id": "<string>",
"param": "<string>",
"status": 123
}Authorizations
Headers
Retrieve the Team ID from: https://cloud.projectdiscovery.io/settings/team
Path Parameters
Query Parameters
number of rows to skip
number of rows to get
start date from which you want to get history
end date till which you want to get history
time range to get history
Available options:
current_month, last_month, last_3_months, last_6_months, last_12_months, all_time Response
Example response
Was this page helpful?
⌘I