post
/public_api/v1/case/search
This endpoint retrieves a list of cases that match the specified filter criteria. It supports filtering by case_id, case_domain, status_progress, severity, and creation_time, along with sorting and pagination.
Request Body:
request_data: Object containing filter criteriafilters: Array of filter objectsfield: String (enum: 'case_id', 'case_domain', 'severity', 'creation_time', 'status_progress')operator: String (enum: 'in', 'gte', 'lte')value: Array of integers/strings or single integer
search_from: Integer (default: 0) - Starting index for paginationsearch_to: Integer (default: 100) - Ending index for paginationsort: Object for sorting resultsfield: String (enum: 'creation_time', 'severity', 'case_id')keyword: String (enum: 'asc', 'desc') - Sort order
CLIENT REQUEST
curl -X 'POST'
-H
'Accept: application/json'
-H
'Content-Type: application/json'
'https://api-yourfqdn/public_api/v1/case/search'
-d
''
import http.client
conn = http.client.HTTPSConnection("api-")
payload = "{\"request_data\":{\"filters\":[{\"field\":\"case_id\",\"operator\":\"in\",\"value\":[0]}],\"search_from\":0,\"search_to\":100,\"sort\":{\"field\":\"case_id\",\"keyword\":\"asc\"}}}"
headers = { 'content-type': "application/json" }
conn.request("POST", "%7B%7Bfqdn%7D%7D/public_api/v1/case/search", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/case/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"request_data\":{\"filters\":[{\"field\":\"case_id\",\"operator\":\"in\",\"value\":[0]}],\"search_from\":0,\"search_to\":100,\"sort\":{\"field\":\"case_id\",\"keyword\":\"asc\"}}}"
response = http.request(request)
puts response.read_bodyconst data = JSON.stringify({
"request_data": {
"filters": [
{
"field": "case_id",
"operator": "in",
"value": [
0
]
}
],
"search_from": 0,
"search_to": 100,
"sort": {
"field": "case_id",
"keyword": "asc"
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/case/search");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);HttpResponse<String> response = Unirest.post("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/case/search")
.header("content-type", "application/json")
.body("{\"request_data\":{\"filters\":[{\"field\":\"case_id\",\"operator\":\"in\",\"value\":[0]}],\"search_from\":0,\"search_to\":100,\"sort\":{\"field\":\"case_id\",\"keyword\":\"asc\"}}}")
.asString();import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["request_data": [
"filters": [
[
"field": "case_id",
"operator": "in",
"value": [0]
]
],
"search_from": 0,
"search_to": 100,
"sort": [
"field": "case_id",
"keyword": "asc"
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/case/search")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/case/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"request_data\":{\"filters\":[{\"field\":\"case_id\",\"operator\":\"in\",\"value\":[0]}],\"search_from\":0,\"search_to\":100,\"sort\":{\"field\":\"case_id\",\"keyword\":\"asc\"}}}",
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/case/search");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\"request_data\":{\"filters\":[{\"field\":\"case_id\",\"operator\":\"in\",\"value\":[0]}],\"search_from\":0,\"search_to\":100,\"sort\":{\"field\":\"case_id\",\"keyword\":\"asc\"}}}");
CURLcode ret = curl_easy_perform(hnd);var client = new RestClient("https://api-/%7B%7Bfqdn%7D%7D/public_api/v1/case/search");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"request_data\":{\"filters\":[{\"field\":\"case_id\",\"operator\":\"in\",\"value\":[0]}],\"search_from\":0,\"search_to\":100,\"sort\":{\"field\":\"case_id\",\"keyword\":\"asc\"}}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);Body parameters
required
request_dataobject
filtersarray
search_frominteger
search_tointeger
sortobject
fieldstring (Enum)
keywordstring (Enum)
application/json
request_dataobject
filtersarray
[fieldstring (Enum)
operatorstring (Enum)
valueobject
integer
]
fieldstring (Enum)Specifies the field to filter cases by.
Specifies the field to filter cases by.
Allowed values:"case_id""case_domain""severity""creation_time""status_progress"
operatorstring (Enum)Comparison operator to use with the filter.
Comparison operator to use with the filter.
Allowed values:"in""gte""lte"
valueobjectValue(s) for filtering the cases.
Value(s) for filtering the cases.
Array
Array
integerValue(s) for filtering the cases.
Value(s) for filtering the cases.
search_fromintegerStarting index for pagination.
Starting index for pagination.
search_tointegerEnding index for pagination.
Ending index for pagination.
Default:
100sortobject
fieldstring (Enum)
Allowed values:"case_id""severity""creation_time"
keywordstring (Enum)Sort order (ascending or descending).
Sort order (ascending or descending).
Allowed values:"asc""desc"
REQUEST
{
"request_data": {
"filters": [
{
"field": "case_id",
"operator": "in",
"value": [
0
]
}
],
"search_from": 0,
"search_to": 0,
"sort": {
"field": "case_id",
"keyword": "asc"
}
}
}Responses