Agregar una nota del equipo
curl --request POST \
--url https://app.blockgence.com/v1/audit/{audit_id}/notes \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"text": "<string>",
"target": {
"kind": "audit",
"id": "<string>"
}
}
'import requests
url = "https://app.blockgence.com/v1/audit/{audit_id}/notes"
payload = {
"text": "<string>",
"target": {
"kind": "audit",
"id": "<string>"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', target: {kind: 'audit', id: '<string>'}})
};
fetch('https://app.blockgence.com/v1/audit/{audit_id}/notes', 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}/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'target' => [
'kind' => 'audit',
'id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.blockgence.com/v1/audit/{audit_id}/notes"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"target\": {\n \"kind\": \"audit\",\n \"id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.blockgence.com/v1/audit/{audit_id}/notes")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"target\": {\n \"kind\": \"audit\",\n \"id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/audit/{audit_id}/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"target\": {\n \"kind\": \"audit\",\n \"id\": \"<string>\"\n }\n}"
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>"
}Auditoría
Agregar una nota del equipo
Agrega una nota de su organización sobre un hallazgo, una pista o la auditoría en general.
Cuerpo del pedido (JSON).
target:{kind, id}.kindesfinding(un hallazgo),lead(una pista) oaudit(la auditoría en general, sinid; es el valor por defecto).iddebe ser un hallazgo o una pista de esta misma auditoría.text(obligatorio): el texto de la nota, hasta 4,000 caracteres.
Respuesta. 201 con {audit_id, note, data}; data es la sección notas actualizada.
Alcance. La nota es de su organización: la ven solo sus miembros, también en una auditoría de ejemplo. Una nota no es un hallazgo y no cambia su grado de validación ni su severidad.
Errores. Con cuerpo {"error": …, "detail": …}:
400 bad_target(el objetivo no es un hallazgo ni una pista de esta auditoría) o400 bad_text(texto vacío o de más de 4,000 caracteres).403 org_requiredo403 read_only: la clave de API no tiene organización o el rol es de solo lectura.404 not_found: la auditoría no existe o es de otra organización.409 too_many_notes: la auditoría ya tiene 500 notas vigentes de su organización.
Costo: sin cargo.
POST
/
v1
/
audit
/
{audit_id}
/
notes
Agregar una nota del equipo
curl --request POST \
--url https://app.blockgence.com/v1/audit/{audit_id}/notes \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"text": "<string>",
"target": {
"kind": "audit",
"id": "<string>"
}
}
'import requests
url = "https://app.blockgence.com/v1/audit/{audit_id}/notes"
payload = {
"text": "<string>",
"target": {
"kind": "audit",
"id": "<string>"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: '<string>', target: {kind: 'audit', id: '<string>'}})
};
fetch('https://app.blockgence.com/v1/audit/{audit_id}/notes', 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}/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => '<string>',
'target' => [
'kind' => 'audit',
'id' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.blockgence.com/v1/audit/{audit_id}/notes"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"target\": {\n \"kind\": \"audit\",\n \"id\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.blockgence.com/v1/audit/{audit_id}/notes")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"target\": {\n \"kind\": \"audit\",\n \"id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/audit/{audit_id}/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"target\": {\n \"kind\": \"audit\",\n \"id\": \"<string>\"\n }\n}"
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>"
}Autorizaciones
APIKeyHeaderBearerAuth
Encabezados
Parámetros de ruta
Cuerpo
application/json
Respuesta
Nota agregada. data es la sección notas actualizada.