Get project security state
curl --request GET \
--url https://api.trustblock.run/v1/project/security \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trustblock.run/v1/project/security"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trustblock.run/v1/project/security', 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.trustblock.run/v1/project/security",
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://api.trustblock.run/v1/project/security"
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://api.trustblock.run/v1/project/security")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trustblock.run/v1/project/security")
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{
"extra": {
"requestId": "<string>"
},
"name": "<string>",
"domain": "<string>",
"audits": [
{
"date": 123,
"url": "<string>",
"auditor": {
"name": "<string>",
"url": "<string>"
}
}
],
"url": "<string>",
"isDeemedDangerous": false,
"activeIssues": [
{
"name": "<string>",
"description": "<string>",
"status": "<string>",
"severity": "<string>"
}
],
"activeRekts": [
{
"name": "<string>",
"description": "<string>",
"rektAt": 123
}
]
}Guides
Security Data API
A single route, infinite possibilities.
GET
/
v1
/
project
/
security
Get project security state
curl --request GET \
--url https://api.trustblock.run/v1/project/security \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trustblock.run/v1/project/security"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trustblock.run/v1/project/security', 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.trustblock.run/v1/project/security",
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://api.trustblock.run/v1/project/security"
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://api.trustblock.run/v1/project/security")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trustblock.run/v1/project/security")
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{
"extra": {
"requestId": "<string>"
},
"name": "<string>",
"domain": "<string>",
"audits": [
{
"date": 123,
"url": "<string>",
"auditor": {
"name": "<string>",
"url": "<string>"
}
}
],
"url": "<string>",
"isDeemedDangerous": false,
"activeIssues": [
{
"name": "<string>",
"description": "<string>",
"status": "<string>",
"severity": "<string>"
}
],
"activeRekts": [
{
"name": "<string>",
"description": "<string>",
"rektAt": 123
}
]
}At Trustblock, we firmly believe in making things easy for everyone, thus our motivation to create one single route where you could access as much valuable data as possible for your own integrations.
1
Access your API key
Head to app.trustblock.run to sign in.


2
Copy your API key
Then click on the top right corner on your username, scroll down and click the copy button to get your API key.


Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
- By Domain
- By Slug
- By Contract
Show child attributes
Show child attributes