cURL
curl --request POST \
--url http://localhost/api/api/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active_timestamp": "2023-11-07T05:31:56Z",
"alert_date": "<string>",
"created_on": "<string>",
"last_updated_at": "<string>",
"case_status_order": 2,
"created_by": 123,
"modified_by": 123
}
'import requests
url = "http://localhost/api/api/cases"
payload = {
"active_timestamp": "2023-11-07T05:31:56Z",
"alert_date": "<string>",
"created_on": "<string>",
"last_updated_at": "<string>",
"case_status_order": 2,
"created_by": 123,
"modified_by": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
active_timestamp: '2023-11-07T05:31:56Z',
alert_date: '<string>',
created_on: '<string>',
last_updated_at: '<string>',
case_status_order: 2,
created_by: 123,
modified_by: 123
})
};
fetch('http://localhost/api/api/cases', 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",
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([
'active_timestamp' => '2023-11-07T05:31:56Z',
'alert_date' => '<string>',
'created_on' => '<string>',
'last_updated_at' => '<string>',
'case_status_order' => 2,
'created_by' => 123,
'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"
payload := strings.NewReader("{\n \"active_timestamp\": \"2023-11-07T05:31:56Z\",\n \"alert_date\": \"<string>\",\n \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\n \"modified_by\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost/api/api/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"active_timestamp\": \"2023-11-07T05:31:56Z\",\n \"alert_date\": \"<string>\",\n \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\n \"modified_by\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/api/cases")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.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 \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\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
}cases
Post apicases
POST
/
api
/
cases
cURL
curl --request POST \
--url http://localhost/api/api/cases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"active_timestamp": "2023-11-07T05:31:56Z",
"alert_date": "<string>",
"created_on": "<string>",
"last_updated_at": "<string>",
"case_status_order": 2,
"created_by": 123,
"modified_by": 123
}
'import requests
url = "http://localhost/api/api/cases"
payload = {
"active_timestamp": "2023-11-07T05:31:56Z",
"alert_date": "<string>",
"created_on": "<string>",
"last_updated_at": "<string>",
"case_status_order": 2,
"created_by": 123,
"modified_by": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
active_timestamp: '2023-11-07T05:31:56Z',
alert_date: '<string>',
created_on: '<string>',
last_updated_at: '<string>',
case_status_order: 2,
created_by: 123,
modified_by: 123
})
};
fetch('http://localhost/api/api/cases', 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",
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([
'active_timestamp' => '2023-11-07T05:31:56Z',
'alert_date' => '<string>',
'created_on' => '<string>',
'last_updated_at' => '<string>',
'case_status_order' => 2,
'created_by' => 123,
'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"
payload := strings.NewReader("{\n \"active_timestamp\": \"2023-11-07T05:31:56Z\",\n \"alert_date\": \"<string>\",\n \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\n \"modified_by\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("http://localhost/api/api/cases")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"active_timestamp\": \"2023-11-07T05:31:56Z\",\n \"alert_date\": \"<string>\",\n \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\n \"modified_by\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost/api/api/cases")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.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 \"created_on\": \"<string>\",\n \"last_updated_at\": \"<string>\",\n \"case_status_order\": 2,\n \"created_by\": 123,\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
CustomAuthenticationcookieAuth
JWT token obtained from AWS Cognito or custom authentication service
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
201 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
