Skip to main content
PATCH
/
api
/
cases
/
{id}
Update a specific case
curl --request PATCH \
  --url http://localhost/api/api/cases/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "active_timestamp": "2023-11-07T05:31:56Z",
  "alert_date": "<string>",
  "case_status_order": 2,
  "created_by": 123,
  "created_on": "<string>",
  "last_updated_at": "<string>",
  "modified_by": 123
}
'
import requests

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

payload = {
"active_timestamp": "2023-11-07T05:31:56Z",
"alert_date": "<string>",
"case_status_order": 2,
"created_by": 123,
"created_on": "<string>",
"last_updated_at": "<string>",
"modified_by": 123
}
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({
active_timestamp: '2023-11-07T05:31:56Z',
alert_date: '<string>',
case_status_order: 2,
created_by: 123,
created_on: '<string>',
last_updated_at: '<string>',
modified_by: 123
})
};

fetch('http://localhost/api/api/cases/{id}', 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}",
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([
'active_timestamp' => '2023-11-07T05:31:56Z',
'alert_date' => '<string>',
'case_status_order' => 2,
'created_by' => 123,
'created_on' => '<string>',
'last_updated_at' => '<string>',
'modified_by' => 123
]),
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}"

payload := strings.NewReader("{\n \"active_timestamp\": \"2023-11-07T05:31:56Z\",\n \"alert_date\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\n \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"modified_by\": 123\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}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"active_timestamp\": \"2023-11-07T05:31:56Z\",\n \"alert_date\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\n \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"modified_by\": 123\n}")
.asString();
require 'uri'
require 'net/http'

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

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 \"active_timestamp\": \"2023-11-07T05:31:56Z\",\n \"alert_date\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\n \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"modified_by\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "active_timestamp": "2023-11-07T05:31:56Z",
  "ageing": 123,
  "alert_date": "<string>",
  "alert_risk_rating": "<string>",
  "approvals": [
    "<unknown>"
  ],
  "assignee": {},
  "available_actions": [
    "<unknown>"
  ],
  "bucket": {},
  "case_action": "<string>",
  "case_checkers": [
    "<unknown>"
  ],
  "case_maker": {},
  "case_owner": {},
  "case_status": "<string>",
  "case_subjects": {},
  "created_on": "<string>",
  "documents": [
    "<unknown>"
  ],
  "findings": [
    "<unknown>"
  ],
  "histories": [
    "<unknown>"
  ],
  "id": 123,
  "last_updated_at": "<string>",
  "last_updated_by": {},
  "priority": 1,
  "reports_code": [
    "<unknown>"
  ],
  "reports_indicator": [
    "<unknown>"
  ],
  "rule": {},
  "rule_parameter": {},
  "case_status_order": 2,
  "created_by": 123,
  "modified_by": 123
}

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

active_timestamp
string<date-time>
alert_date
string
Minimum string length: 1
case_status_order
integer
default:2
created_by
integer | null
created_on
string
Minimum string length: 1
last_updated_at
string
Minimum string length: 1
modified_by
integer | null

Response

200 - application/json
active_timestamp
string<date-time>
required
ageing
integer
required
read-only
alert_date
string
required
alert_risk_rating
string
required
read-only
approvals
any[]
required
read-only
assignee
object
required
read-only
available_actions
any[]
required
read-only
bucket
object
required
read-only
case_action
string
required
read-only
case_checkers
any[]
required
read-only
case_maker
object
required
read-only
case_owner
object
required
read-only
case_status
string
required
read-only
case_subjects
object
required
read-only
created_on
string
required
documents
any[]
required
read-only
findings
any[]
required
read-only
histories
any[]
required
read-only
id
integer
required
read-only
last_updated_at
string
required
last_updated_by
object
required
read-only
priority
integer
default:1
required
read-only
reports_code
any[]
required
read-only
reports_indicator
any[]
required
read-only
rule
object
required
read-only
rule_parameter
object
required
read-only
case_status_order
integer
default:2
created_by
integer | null
modified_by
integer | null