Save a case
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
Save a case
Saves or updates a case.
The body is {name?, notes?, data?, outcome?, analyst_minutes?, removed_base?}. A field that is not sent is not changed.
data: the investigation snapshot. What the server writes (annotations, the origin of an imported case file, the incident playbook, the post-mortem and the Guard alert) is kept even if it is not sent. Annotations and an import origin sent by the client are discarded.outcome: the result declared by the person working the case:goal_reached(the goal was reached),out_of_coverage(it fell out of coverage) or""to clear it. Any other value returns400. blockgence does not infer it.analyst_minutes: the analyst’s working minutes, an integer from 0 to 525,600, ornullto clear them. Out of range returns422.removed_base: the nodes removed from the view that the client knew were saved. The change todata.removedNodesis computed against this base, so an outdated screen does not undo what another one removed or restored. It is not saved.
Removing a node from the view does not delete evidence: the graph is saved in full, and the evidence and the off-ramps declare what was removed.
The response is {"ok": true, "token":...}. Edit permission is required (owner or shared for editing). A case
shared for viewing, or a read-only role or API key, receives 403 with error: "case_read_only". A case the
caller cannot view returns 404. Each change is recorded in the case change log.
Cost: free.
PUT
/
v1
/
cases
/
{token}
Save a case
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>"
}Authorizations
APIKeyHeaderBearerAuth
Headers
Path Parameters
Body
application/json
Response
Successful response.