Assets
Get Asset Stats
Returns active assets under test (in scope for a listing) and total active assets for the supplied organization and listings.
GET
/
v2
/
asset-stats
cURL
curl --request GET \
--url https://client.synack.com/api/asset/v2/asset-stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://client.synack.com/api/asset/v2/asset-stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://client.synack.com/api/asset/v2/asset-stats', 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://client.synack.com/api/asset/v2/asset-stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://client.synack.com/api/asset/v2/asset-stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://client.synack.com/api/asset/v2/asset-stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client.synack.com/api/asset/v2/asset-stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"activeAssets": [
{
"underTest": 123,
"underManagement": 123
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 305,
"detail": "<string>",
"instance": "<string>",
"failedValidation": [
{
"message": "<string>",
"property": "<string>",
"value": "<string>"
}
],
"failedValidations": [
{
"index": 123,
"failedValidation": [
{
"message": "<string>",
"property": "<string>",
"value": "<string>"
}
]
}
],
"maxBatchSize": 123,
"batchSize": 123
}{
"type": "<string>",
"title": "<string>",
"status": 305,
"detail": "<string>",
"instance": "<string>",
"failedValidation": [
{
"message": "<string>",
"property": "<string>",
"value": "<string>"
}
],
"failedValidations": [
{
"index": 123,
"failedValidation": [
{
"message": "<string>",
"property": "<string>",
"value": "<string>"
}
]
}
],
"maxBatchSize": 123,
"batchSize": 123
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Query Parameters
Unique identifier for an organization.
Pattern:
^[-_0-9a-z]{1,50}Unique identifier for an listing. If not supplied the request will apply to all listings the user is authorized to access.
Unique identifier for an listing.
Pattern:
^[-_0-9a-z]{1,50}Response
Response containing a single asset stat.
Stats for assets within a single organization.
Totals for active assets.
Show child attributes
Show child attributes
⌘I
cURL
curl --request GET \
--url https://client.synack.com/api/asset/v2/asset-stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://client.synack.com/api/asset/v2/asset-stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://client.synack.com/api/asset/v2/asset-stats', 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://client.synack.com/api/asset/v2/asset-stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://client.synack.com/api/asset/v2/asset-stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://client.synack.com/api/asset/v2/asset-stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://client.synack.com/api/asset/v2/asset-stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"activeAssets": [
{
"underTest": 123,
"underManagement": 123
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 305,
"detail": "<string>",
"instance": "<string>",
"failedValidation": [
{
"message": "<string>",
"property": "<string>",
"value": "<string>"
}
],
"failedValidations": [
{
"index": 123,
"failedValidation": [
{
"message": "<string>",
"property": "<string>",
"value": "<string>"
}
]
}
],
"maxBatchSize": 123,
"batchSize": 123
}{
"type": "<string>",
"title": "<string>",
"status": 305,
"detail": "<string>",
"instance": "<string>",
"failedValidation": [
{
"message": "<string>",
"property": "<string>",
"value": "<string>"
}
],
"failedValidations": [
{
"index": 123,
"failedValidation": [
{
"message": "<string>",
"property": "<string>",
"value": "<string>"
}
]
}
],
"maxBatchSize": 123,
"batchSize": 123
}