A section of an audit
curl --request GET \
--url https://app.blockgence.com/v1/audit/{audit_id}/{section} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.blockgence.com/v1/audit/{audit_id}/{section}"
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://app.blockgence.com/v1/audit/{audit_id}/{section}', 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://app.blockgence.com/v1/audit/{audit_id}/{section}",
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://app.blockgence.com/v1/audit/{audit_id}/{section}"
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://app.blockgence.com/v1/audit/{audit_id}/{section}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/audit/{audit_id}/{section}")
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{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}Audit
A section of an audit
Returns a section of an audit. The response is {demo, audit_id, section, data}, and the shape of data
depends on the section:
hallazgos:findings[], each withid,title,severity,grade(validation grade, G1 to G4),class,location,state(open,fixed,acknowledgedornot_fixed),description,impact,recommendationand the proof (proof_id, in G1 and G2) or the cited evidence (evidence, in G3 and G4).pistas:hypotheses[], unproven hypotheses with their location, preconditions, attack path, impact, proof plan and state. Leads carry no severity:possible_severityis only an estimate.pruebas:proofs[], each with its test (test_fileandcommand), itsresultand the declared assumptions.resumen:covered[],not_covered[],next_steps[]anddisclaimers[].mapa,amenazas,invariantes,corridaandrevisiones: contracts and entry points; assets, actors and threats; invariants with their state; execution stages; executions by commit.deploy: deployed addresses, each with its verification (verification.result:match,match_except_metadata,mismatchorpending), and the control report (control_report).sello:state(none,live,code_changed,control_changedorexpired) and the published report.notas:annotations[](your organization’s current notes) andlog[](notes added and removed).
In a review that has not run yet, the sections are empty: this does not mean “no findings”.
Errors. With body {"error": …, "detail": …}:
400 bad_idor400 audit_id_mismatch, as inGET /v1/audit/{audit_id}.404 not_found: the audit does not exist or belongs to another organization.404 unknown_section: the section is not in the list.503 audit_source_unavailable: the data could not be read.
Cost: free.
GET
/
v1
/
audit
/
{audit_id}
/
{section}
A section of an audit
curl --request GET \
--url https://app.blockgence.com/v1/audit/{audit_id}/{section} \
--header 'X-API-Key: <api-key>'import requests
url = "https://app.blockgence.com/v1/audit/{audit_id}/{section}"
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://app.blockgence.com/v1/audit/{audit_id}/{section}', 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://app.blockgence.com/v1/audit/{audit_id}/{section}",
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://app.blockgence.com/v1/audit/{audit_id}/{section}"
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://app.blockgence.com/v1/audit/{audit_id}/{section}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/audit/{audit_id}/{section}")
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{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}Authorizations
APIKeyHeaderBearerAuth
Headers
Path Parameters
Response
Successful response.