Skip to main content
PATCH
/
api
/
cases
/
{id}
/
findings
Add findings to a case
curl --request PATCH \
  --url http://localhost/api/api/cases/{id}/findings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "finding_content": "<string>"
}
'
import requests

url = "http://localhost/api/api/cases/{id}/findings"

payload = { "finding_content": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({finding_content: '<string>'})
};

fetch('http://localhost/api/api/cases/{id}/findings', 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 => "http://localhost/api/api/cases/{id}/findings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'finding_content' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$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 := "http://localhost/api/api/cases/{id}/findings"

payload := strings.NewReader("{\n \"finding_content\": \"<string>\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
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.patch("http://localhost/api/api/cases/{id}/findings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"finding_content\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("http://localhost/api/api/cases/{id}/findings")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"finding_content\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "case_status": "<string>",
  "ageing": 123,
  "priority": 123,
  "case_status_order": 123,
  "alert_date": "<string>",
  "assignee": {
    "id": 123,
    "name": "<string>"
  },
  "bucket": {
    "id": 123,
    "name": "<string>"
  },
  "case_action": "<string>",
  "case_subjects": {
    "subject_1": {
      "id": 123,
      "name": "<string>",
      "client_subject_id": "<string>"
    },
    "subject_2": {
      "id": 123,
      "name": "<string>",
      "client_subject_id": "<string>"
    }
  },
  "created_on": "<string>",
  "rule": 123,
  "active_timestamp": "2023-11-07T05:31:56Z"
}
{
"detail": "<string>"
}
{
"detail": "<string>"
}
{
"detail": "<string>"
}

Authorizations

Authorization
string
header
required

JWT token obtained from AWS Cognito or custom authentication service

Path Parameters

id
integer
required

A unique integer value identifying this case.

Body

application/json
finding_content
string
required

Finding content.

Response

Findings added successfully.

Case object with all details

id
integer
required

Case ID

case_status
string
required

Current case status

ageing
integer

Days since case creation

priority
integer

Case priority level

case_status_order
integer

Internal case status order

alert_date
string

Alert date timestamp

alert_risk_rating
enum<string>

Risk rating

Available options:
HIGH,
MEDIUM,
LOW,
Unrated
assignee
object

Case assignee information

bucket
object

Bucket information

case_action
string

Last action taken on case

case_subjects
object

Case subjects information

created_on
string

Case creation date

rule
integer

Rule number ID that triggered the case

active_timestamp
string<date-time>

When case became active