Guardar/actualizar un caso (auto-guardado)
curl --request PUT \
--url https://app.blockgence.com/v1/cases/{token} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"notes": "<string>",
"data": {},
"removed_base": [
"<unknown>"
],
"outcome": "<string>",
"analyst_minutes": 262800
}
'import requests
url = "https://app.blockgence.com/v1/cases/{token}"
payload = {
"name": "<string>",
"notes": "<string>",
"data": {},
"removed_base": ["<unknown>"],
"outcome": "<string>",
"analyst_minutes": 262800
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
notes: '<string>',
data: {},
removed_base: ['<unknown>'],
outcome: '<string>',
analyst_minutes: 262800
})
};
fetch('https://app.blockgence.com/v1/cases/{token}', 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/cases/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'notes' => '<string>',
'data' => [
],
'removed_base' => [
'<unknown>'
],
'outcome' => '<string>',
'analyst_minutes' => 262800
]),
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/cases/{token}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"data\": {},\n \"removed_base\": [\n \"<unknown>\"\n ],\n \"outcome\": \"<string>\",\n \"analyst_minutes\": 262800\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.blockgence.com/v1/cases/{token}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"data\": {},\n \"removed_base\": [\n \"<unknown>\"\n ],\n \"outcome\": \"<string>\",\n \"analyst_minutes\": 262800\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/cases/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"data\": {},\n \"removed_base\": [\n \"<unknown>\"\n ],\n \"outcome\": \"<string>\",\n \"analyst_minutes\": 262800\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>"
}Cases
Guardar/actualizar un caso (auto-guardado)
Guarda o actualiza un caso (el autoguardado de la app usa esta ruta).
Body {name?, notes?, data?, outcome?, analyst_minutes?, removed_base?}. Un campo que no mandás no se toca.
data: tu snapshot de la investigación. Lo que escribe el servidor (las anotaciones, el origen de un expediente importado, el playbook de incidente, el post-mortem y la alerta de Guard) se conserva aunque no lo mandes; las anotaciones y el origen de un importado que mande el cliente se descartan.outcome:goal_reached,out_of_coverageo""para sacarlo. Otro valor es400.analyst_minutes: un entero de 0 a 525600, onullpara sacarlos. Fuera de rango es422.removed_base: los nodos quitados que el cliente sabía guardados; el cambio dedata.removedNodesse mide contra esa base. No se guarda.
Responde {"ok": true, "token":...}. Pide poder editar (dueño o compartido para editar): compartido para ver es
403 con error: "case_read_only", y un caso que no ves es 404. Cada cambio queda en el registro del caso.
Costo: 0 créditos.
PUT
/
v1
/
cases
/
{token}
Guardar/actualizar un caso (auto-guardado)
curl --request PUT \
--url https://app.blockgence.com/v1/cases/{token} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"notes": "<string>",
"data": {},
"removed_base": [
"<unknown>"
],
"outcome": "<string>",
"analyst_minutes": 262800
}
'import requests
url = "https://app.blockgence.com/v1/cases/{token}"
payload = {
"name": "<string>",
"notes": "<string>",
"data": {},
"removed_base": ["<unknown>"],
"outcome": "<string>",
"analyst_minutes": 262800
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
notes: '<string>',
data: {},
removed_base: ['<unknown>'],
outcome: '<string>',
analyst_minutes: 262800
})
};
fetch('https://app.blockgence.com/v1/cases/{token}', 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/cases/{token}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'notes' => '<string>',
'data' => [
],
'removed_base' => [
'<unknown>'
],
'outcome' => '<string>',
'analyst_minutes' => 262800
]),
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/cases/{token}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"data\": {},\n \"removed_base\": [\n \"<unknown>\"\n ],\n \"outcome\": \"<string>\",\n \"analyst_minutes\": 262800\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.blockgence.com/v1/cases/{token}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"data\": {},\n \"removed_base\": [\n \"<unknown>\"\n ],\n \"outcome\": \"<string>\",\n \"analyst_minutes\": 262800\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/cases/{token}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"notes\": \"<string>\",\n \"data\": {},\n \"removed_base\": [\n \"<unknown>\"\n ],\n \"outcome\": \"<string>\",\n \"analyst_minutes\": 262800\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
Caso activo (opcional): el token de un caso que podés ver. La consulta queda en el registro de actividad de ese caso y resuelve también sus labels propias. Un caso que no existe, se borró o ya no está compartido con vos da 400 case_unavailable y la consulta no se hace (sin cobro).
Parámetros de ruta
Cuerpo
application/json
Respuesta
Successful Response