Amazon GuardDuty
POST
AcceptAdministratorInvitation
{{baseUrl}}/detector/:detectorId/administrator
QUERY PARAMS
detectorId
BODY json
{
"administratorId": "",
"invitationId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/administrator");
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, "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/administrator" {:content-type :json
:form-params {:administratorId ""
:invitationId ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/administrator"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/administrator"),
Content = new StringContent("{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/administrator");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/administrator"
payload := strings.NewReader("{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/administrator HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 49
{
"administratorId": "",
"invitationId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/administrator")
.setHeader("content-type", "application/json")
.setBody("{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/administrator"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/administrator")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/administrator")
.header("content-type", "application/json")
.body("{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}")
.asString();
const data = JSON.stringify({
administratorId: '',
invitationId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/administrator');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/administrator',
headers: {'content-type': 'application/json'},
data: {administratorId: '', invitationId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/administrator';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"administratorId":"","invitationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/administrator',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "administratorId": "",\n "invitationId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/administrator")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/administrator',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({administratorId: '', invitationId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/administrator',
headers: {'content-type': 'application/json'},
body: {administratorId: '', invitationId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/administrator');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
administratorId: '',
invitationId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/administrator',
headers: {'content-type': 'application/json'},
data: {administratorId: '', invitationId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/administrator';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"administratorId":"","invitationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"administratorId": @"",
@"invitationId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/administrator"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/administrator" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/administrator",
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([
'administratorId' => '',
'invitationId' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/administrator', [
'body' => '{
"administratorId": "",
"invitationId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/administrator');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'administratorId' => '',
'invitationId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'administratorId' => '',
'invitationId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/administrator');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/administrator' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"administratorId": "",
"invitationId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/administrator' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"administratorId": "",
"invitationId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/administrator", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/administrator"
payload = {
"administratorId": "",
"invitationId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/administrator"
payload <- "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/administrator")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/administrator') do |req|
req.body = "{\n \"administratorId\": \"\",\n \"invitationId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/administrator";
let payload = json!({
"administratorId": "",
"invitationId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/administrator \
--header 'content-type: application/json' \
--data '{
"administratorId": "",
"invitationId": ""
}'
echo '{
"administratorId": "",
"invitationId": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/administrator \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "administratorId": "",\n "invitationId": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/administrator
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"administratorId": "",
"invitationId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/administrator")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
AcceptInvitation
{{baseUrl}}/detector/:detectorId/master
QUERY PARAMS
detectorId
BODY json
{
"masterId": "",
"invitationId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/master");
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, "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/master" {:content-type :json
:form-params {:masterId ""
:invitationId ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/master"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/master"),
Content = new StringContent("{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/master");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/master"
payload := strings.NewReader("{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/master HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 42
{
"masterId": "",
"invitationId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/master")
.setHeader("content-type", "application/json")
.setBody("{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/master"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/master")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/master")
.header("content-type", "application/json")
.body("{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}")
.asString();
const data = JSON.stringify({
masterId: '',
invitationId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/master');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/master',
headers: {'content-type': 'application/json'},
data: {masterId: '', invitationId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/master';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"masterId":"","invitationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/master',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "masterId": "",\n "invitationId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/master")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/master',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({masterId: '', invitationId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/master',
headers: {'content-type': 'application/json'},
body: {masterId: '', invitationId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/master');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
masterId: '',
invitationId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/master',
headers: {'content-type': 'application/json'},
data: {masterId: '', invitationId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/master';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"masterId":"","invitationId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"masterId": @"",
@"invitationId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/master"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/master" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/master",
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([
'masterId' => '',
'invitationId' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/master', [
'body' => '{
"masterId": "",
"invitationId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/master');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'masterId' => '',
'invitationId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'masterId' => '',
'invitationId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/master');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/master' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"masterId": "",
"invitationId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/master' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"masterId": "",
"invitationId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/master", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/master"
payload = {
"masterId": "",
"invitationId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/master"
payload <- "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/master")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/master') do |req|
req.body = "{\n \"masterId\": \"\",\n \"invitationId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/master";
let payload = json!({
"masterId": "",
"invitationId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/master \
--header 'content-type: application/json' \
--data '{
"masterId": "",
"invitationId": ""
}'
echo '{
"masterId": "",
"invitationId": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/master \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "masterId": "",\n "invitationId": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/master
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"masterId": "",
"invitationId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/master")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
ArchiveFindings
{{baseUrl}}/detector/:detectorId/findings/archive
QUERY PARAMS
detectorId
BODY json
{
"findingIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/findings/archive");
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, "{\n \"findingIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/findings/archive" {:content-type :json
:form-params {:findingIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/findings/archive"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"findingIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/findings/archive"),
Content = new StringContent("{\n \"findingIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/findings/archive");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"findingIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/findings/archive"
payload := strings.NewReader("{\n \"findingIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/findings/archive HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"findingIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/findings/archive")
.setHeader("content-type", "application/json")
.setBody("{\n \"findingIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/findings/archive"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"findingIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"findingIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/archive")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/findings/archive")
.header("content-type", "application/json")
.body("{\n \"findingIds\": []\n}")
.asString();
const data = JSON.stringify({
findingIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/findings/archive');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/archive',
headers: {'content-type': 'application/json'},
data: {findingIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/findings/archive';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/findings/archive',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "findingIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"findingIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/archive")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/findings/archive',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({findingIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/archive',
headers: {'content-type': 'application/json'},
body: {findingIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/findings/archive');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
findingIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/archive',
headers: {'content-type': 'application/json'},
data: {findingIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/findings/archive';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"findingIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/findings/archive"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/findings/archive" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"findingIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/findings/archive",
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([
'findingIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/findings/archive', [
'body' => '{
"findingIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/findings/archive');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'findingIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'findingIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/findings/archive');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/findings/archive' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/findings/archive' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"findingIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/findings/archive", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/findings/archive"
payload = { "findingIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/findings/archive"
payload <- "{\n \"findingIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/findings/archive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"findingIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/findings/archive') do |req|
req.body = "{\n \"findingIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/findings/archive";
let payload = json!({"findingIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/findings/archive \
--header 'content-type: application/json' \
--data '{
"findingIds": []
}'
echo '{
"findingIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/findings/archive \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "findingIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/findings/archive
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["findingIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/findings/archive")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateDetector
{{baseUrl}}/detector
BODY json
{
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"tags": {},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector");
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, "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector" {:content-type :json
:form-params {:enable false
:clientToken ""
:findingPublishingFrequency ""
:dataSources {:S3Logs ""
:Kubernetes ""
:MalwareProtection ""}
:tags {}
:features [{:Name ""
:Status ""
:AdditionalConfiguration ""}]}})
require "http/client"
url = "{{baseUrl}}/detector"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector"),
Content = new StringContent("{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector"
payload := strings.NewReader("{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 291
{
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"tags": {},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector")
.setHeader("content-type", "application/json")
.setBody("{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector")
.header("content-type", "application/json")
.body("{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
enable: false,
clientToken: '',
findingPublishingFrequency: '',
dataSources: {
S3Logs: '',
Kubernetes: '',
MalwareProtection: ''
},
tags: {},
features: [
{
Name: '',
Status: '',
AdditionalConfiguration: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector',
headers: {'content-type': 'application/json'},
data: {
enable: false,
clientToken: '',
findingPublishingFrequency: '',
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
tags: {},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"enable":false,"clientToken":"","findingPublishingFrequency":"","dataSources":{"S3Logs":"","Kubernetes":"","MalwareProtection":""},"tags":{},"features":[{"Name":"","Status":"","AdditionalConfiguration":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "enable": false,\n "clientToken": "",\n "findingPublishingFrequency": "",\n "dataSources": {\n "S3Logs": "",\n "Kubernetes": "",\n "MalwareProtection": ""\n },\n "tags": {},\n "features": [\n {\n "Name": "",\n "Status": "",\n "AdditionalConfiguration": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
enable: false,
clientToken: '',
findingPublishingFrequency: '',
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
tags: {},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector',
headers: {'content-type': 'application/json'},
body: {
enable: false,
clientToken: '',
findingPublishingFrequency: '',
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
tags: {},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
enable: false,
clientToken: '',
findingPublishingFrequency: '',
dataSources: {
S3Logs: '',
Kubernetes: '',
MalwareProtection: ''
},
tags: {},
features: [
{
Name: '',
Status: '',
AdditionalConfiguration: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector',
headers: {'content-type': 'application/json'},
data: {
enable: false,
clientToken: '',
findingPublishingFrequency: '',
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
tags: {},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"enable":false,"clientToken":"","findingPublishingFrequency":"","dataSources":{"S3Logs":"","Kubernetes":"","MalwareProtection":""},"tags":{},"features":[{"Name":"","Status":"","AdditionalConfiguration":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"enable": @NO,
@"clientToken": @"",
@"findingPublishingFrequency": @"",
@"dataSources": @{ @"S3Logs": @"", @"Kubernetes": @"", @"MalwareProtection": @"" },
@"tags": @{ },
@"features": @[ @{ @"Name": @"", @"Status": @"", @"AdditionalConfiguration": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector",
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([
'enable' => null,
'clientToken' => '',
'findingPublishingFrequency' => '',
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'tags' => [
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]),
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;
}
request('POST', '{{baseUrl}}/detector', [
'body' => '{
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"tags": {},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'enable' => null,
'clientToken' => '',
'findingPublishingFrequency' => '',
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'tags' => [
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'enable' => null,
'clientToken' => '',
'findingPublishingFrequency' => '',
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'tags' => [
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/detector');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"tags": {},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"tags": {},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector"
payload = {
"enable": False,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"tags": {},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector"
payload <- "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector') do |req|
req.body = "{\n \"enable\": false,\n \"clientToken\": \"\",\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"tags\": {},\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector";
let payload = json!({
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": json!({
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
}),
"tags": json!({}),
"features": (
json!({
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector \
--header 'content-type: application/json' \
--data '{
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"tags": {},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
echo '{
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"tags": {},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}' | \
http POST {{baseUrl}}/detector \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "enable": false,\n "clientToken": "",\n "findingPublishingFrequency": "",\n "dataSources": {\n "S3Logs": "",\n "Kubernetes": "",\n "MalwareProtection": ""\n },\n "tags": {},\n "features": [\n {\n "Name": "",\n "Status": "",\n "AdditionalConfiguration": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/detector
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"enable": false,
"clientToken": "",
"findingPublishingFrequency": "",
"dataSources": [
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
],
"tags": [],
"features": [
[
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateFilter
{{baseUrl}}/detector/:detectorId/filter
QUERY PARAMS
detectorId
BODY json
{
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
},
"clientToken": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/filter");
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, "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/filter" {:content-type :json
:form-params {:name ""
:description ""
:action ""
:rank 0
:findingCriteria {:Criterion ""}
:clientToken ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/filter"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/filter"),
Content = new StringContent("{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/filter");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/filter"
payload := strings.NewReader("{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/filter HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 149
{
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
},
"clientToken": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/filter")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/filter"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/filter")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
name: '',
description: '',
action: '',
rank: 0,
findingCriteria: {
Criterion: ''
},
clientToken: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/filter');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/filter',
headers: {'content-type': 'application/json'},
data: {
name: '',
description: '',
action: '',
rank: 0,
findingCriteria: {Criterion: ''},
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/filter';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","action":"","rank":0,"findingCriteria":{"Criterion":""},"clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/filter',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "description": "",\n "action": "",\n "rank": 0,\n "findingCriteria": {\n "Criterion": ""\n },\n "clientToken": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/filter',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
name: '',
description: '',
action: '',
rank: 0,
findingCriteria: {Criterion: ''},
clientToken: '',
tags: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/filter',
headers: {'content-type': 'application/json'},
body: {
name: '',
description: '',
action: '',
rank: 0,
findingCriteria: {Criterion: ''},
clientToken: '',
tags: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/filter');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
description: '',
action: '',
rank: 0,
findingCriteria: {
Criterion: ''
},
clientToken: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/filter',
headers: {'content-type': 'application/json'},
data: {
name: '',
description: '',
action: '',
rank: 0,
findingCriteria: {Criterion: ''},
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/filter';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","action":"","rank":0,"findingCriteria":{"Criterion":""},"clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"description": @"",
@"action": @"",
@"rank": @0,
@"findingCriteria": @{ @"Criterion": @"" },
@"clientToken": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/filter"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/filter" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/filter",
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([
'name' => '',
'description' => '',
'action' => '',
'rank' => 0,
'findingCriteria' => [
'Criterion' => ''
],
'clientToken' => '',
'tags' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/filter', [
'body' => '{
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
},
"clientToken": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/filter');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'description' => '',
'action' => '',
'rank' => 0,
'findingCriteria' => [
'Criterion' => ''
],
'clientToken' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'description' => '',
'action' => '',
'rank' => 0,
'findingCriteria' => [
'Criterion' => ''
],
'clientToken' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/filter');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/filter' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
},
"clientToken": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/filter' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
},
"clientToken": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/filter", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/filter"
payload = {
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": { "Criterion": "" },
"clientToken": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/filter"
payload <- "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/filter') do |req|
req.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"clientToken\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/filter";
let payload = json!({
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": json!({"Criterion": ""}),
"clientToken": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/filter \
--header 'content-type: application/json' \
--data '{
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
},
"clientToken": "",
"tags": {}
}'
echo '{
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
},
"clientToken": "",
"tags": {}
}' | \
http POST {{baseUrl}}/detector/:detectorId/filter \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "description": "",\n "action": "",\n "rank": 0,\n "findingCriteria": {\n "Criterion": ""\n },\n "clientToken": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/filter
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"description": "",
"action": "",
"rank": 0,
"findingCriteria": ["Criterion": ""],
"clientToken": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/filter")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateIPSet
{{baseUrl}}/detector/:detectorId/ipset
QUERY PARAMS
detectorId
BODY json
{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/ipset");
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, "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/ipset" {:content-type :json
:form-params {:name ""
:format ""
:location ""
:activate false
:clientToken ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/ipset"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/ipset"),
Content = new StringContent("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/ipset");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/ipset"
payload := strings.NewReader("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/ipset HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 106
{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/ipset")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/ipset"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/ipset")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
name: '',
format: '',
location: '',
activate: false,
clientToken: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/ipset');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/ipset',
headers: {'content-type': 'application/json'},
data: {name: '', format: '', location: '', activate: false, clientToken: '', tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/ipset';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","format":"","location":"","activate":false,"clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/ipset',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "format": "",\n "location": "",\n "activate": false,\n "clientToken": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/ipset',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({name: '', format: '', location: '', activate: false, clientToken: '', tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/ipset',
headers: {'content-type': 'application/json'},
body: {name: '', format: '', location: '', activate: false, clientToken: '', tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/ipset');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
format: '',
location: '',
activate: false,
clientToken: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/ipset',
headers: {'content-type': 'application/json'},
data: {name: '', format: '', location: '', activate: false, clientToken: '', tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/ipset';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","format":"","location":"","activate":false,"clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"format": @"",
@"location": @"",
@"activate": @NO,
@"clientToken": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/ipset"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/ipset" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/ipset",
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([
'name' => '',
'format' => '',
'location' => '',
'activate' => null,
'clientToken' => '',
'tags' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/ipset', [
'body' => '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/ipset');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'format' => '',
'location' => '',
'activate' => null,
'clientToken' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'format' => '',
'location' => '',
'activate' => null,
'clientToken' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/ipset');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/ipset' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/ipset' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/ipset", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/ipset"
payload = {
"name": "",
"format": "",
"location": "",
"activate": False,
"clientToken": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/ipset"
payload <- "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/ipset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/ipset') do |req|
req.body = "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/ipset";
let payload = json!({
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/ipset \
--header 'content-type: application/json' \
--data '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}'
echo '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}' | \
http POST {{baseUrl}}/detector/:detectorId/ipset \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "format": "",\n "location": "",\n "activate": false,\n "clientToken": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/ipset
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/ipset")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateMembers
{{baseUrl}}/detector/:detectorId/member
QUERY PARAMS
detectorId
BODY json
{
"accountDetails": [
{
"AccountId": "",
"Email": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member");
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, "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member" {:content-type :json
:form-params {:accountDetails [{:AccountId ""
:Email ""}]}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member"),
Content = new StringContent("{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member"
payload := strings.NewReader("{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"accountDetails": [
{
"AccountId": "",
"Email": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member")
.header("content-type", "application/json")
.body("{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
accountDetails: [
{
AccountId: '',
Email: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member',
headers: {'content-type': 'application/json'},
data: {accountDetails: [{AccountId: '', Email: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountDetails":[{"AccountId":"","Email":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountDetails": [\n {\n "AccountId": "",\n "Email": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountDetails: [{AccountId: '', Email: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member',
headers: {'content-type': 'application/json'},
body: {accountDetails: [{AccountId: '', Email: ''}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountDetails: [
{
AccountId: '',
Email: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member',
headers: {'content-type': 'application/json'},
data: {accountDetails: [{AccountId: '', Email: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountDetails":[{"AccountId":"","Email":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountDetails": @[ @{ @"AccountId": @"", @"Email": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member",
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([
'accountDetails' => [
[
'AccountId' => '',
'Email' => ''
]
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member', [
'body' => '{
"accountDetails": [
{
"AccountId": "",
"Email": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountDetails' => [
[
'AccountId' => '',
'Email' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountDetails' => [
[
'AccountId' => '',
'Email' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountDetails": [
{
"AccountId": "",
"Email": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountDetails": [
{
"AccountId": "",
"Email": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member"
payload = { "accountDetails": [
{
"AccountId": "",
"Email": ""
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member"
payload <- "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member') do |req|
req.body = "{\n \"accountDetails\": [\n {\n \"AccountId\": \"\",\n \"Email\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member";
let payload = json!({"accountDetails": (
json!({
"AccountId": "",
"Email": ""
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member \
--header 'content-type: application/json' \
--data '{
"accountDetails": [
{
"AccountId": "",
"Email": ""
}
]
}'
echo '{
"accountDetails": [
{
"AccountId": "",
"Email": ""
}
]
}' | \
http POST {{baseUrl}}/detector/:detectorId/member \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountDetails": [\n {\n "AccountId": "",\n "Email": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountDetails": [
[
"AccountId": "",
"Email": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreatePublishingDestination
{{baseUrl}}/detector/:detectorId/publishingDestination
QUERY PARAMS
detectorId
BODY json
{
"destinationType": "",
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
},
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/publishingDestination");
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, "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/publishingDestination" {:content-type :json
:form-params {:destinationType ""
:destinationProperties {:DestinationArn ""
:KmsKeyArn ""}
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/publishingDestination"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/publishingDestination"),
Content = new StringContent("{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/publishingDestination");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/publishingDestination"
payload := strings.NewReader("{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/publishingDestination HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 128
{
"destinationType": "",
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
},
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/publishingDestination")
.setHeader("content-type", "application/json")
.setBody("{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/publishingDestination"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/publishingDestination")
.header("content-type", "application/json")
.body("{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
destinationType: '',
destinationProperties: {
DestinationArn: '',
KmsKeyArn: ''
},
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/publishingDestination');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination',
headers: {'content-type': 'application/json'},
data: {
destinationType: '',
destinationProperties: {DestinationArn: '', KmsKeyArn: ''},
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"destinationType":"","destinationProperties":{"DestinationArn":"","KmsKeyArn":""},"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/publishingDestination',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "destinationType": "",\n "destinationProperties": {\n "DestinationArn": "",\n "KmsKeyArn": ""\n },\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/publishingDestination',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
destinationType: '',
destinationProperties: {DestinationArn: '', KmsKeyArn: ''},
clientToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination',
headers: {'content-type': 'application/json'},
body: {
destinationType: '',
destinationProperties: {DestinationArn: '', KmsKeyArn: ''},
clientToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/publishingDestination');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
destinationType: '',
destinationProperties: {
DestinationArn: '',
KmsKeyArn: ''
},
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination',
headers: {'content-type': 'application/json'},
data: {
destinationType: '',
destinationProperties: {DestinationArn: '', KmsKeyArn: ''},
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"destinationType":"","destinationProperties":{"DestinationArn":"","KmsKeyArn":""},"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"destinationType": @"",
@"destinationProperties": @{ @"DestinationArn": @"", @"KmsKeyArn": @"" },
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/publishingDestination"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/publishingDestination" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/publishingDestination",
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([
'destinationType' => '',
'destinationProperties' => [
'DestinationArn' => '',
'KmsKeyArn' => ''
],
'clientToken' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/publishingDestination', [
'body' => '{
"destinationType": "",
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
},
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/publishingDestination');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'destinationType' => '',
'destinationProperties' => [
'DestinationArn' => '',
'KmsKeyArn' => ''
],
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'destinationType' => '',
'destinationProperties' => [
'DestinationArn' => '',
'KmsKeyArn' => ''
],
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/publishingDestination');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"destinationType": "",
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
},
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"destinationType": "",
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
},
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/publishingDestination", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/publishingDestination"
payload = {
"destinationType": "",
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
},
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/publishingDestination"
payload <- "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/publishingDestination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/publishingDestination') do |req|
req.body = "{\n \"destinationType\": \"\",\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n },\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/publishingDestination";
let payload = json!({
"destinationType": "",
"destinationProperties": json!({
"DestinationArn": "",
"KmsKeyArn": ""
}),
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/publishingDestination \
--header 'content-type: application/json' \
--data '{
"destinationType": "",
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
},
"clientToken": ""
}'
echo '{
"destinationType": "",
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
},
"clientToken": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/publishingDestination \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "destinationType": "",\n "destinationProperties": {\n "DestinationArn": "",\n "KmsKeyArn": ""\n },\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/publishingDestination
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"destinationType": "",
"destinationProperties": [
"DestinationArn": "",
"KmsKeyArn": ""
],
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/publishingDestination")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateSampleFindings
{{baseUrl}}/detector/:detectorId/findings/create
QUERY PARAMS
detectorId
BODY json
{
"findingTypes": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/findings/create");
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, "{\n \"findingTypes\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/findings/create" {:content-type :json
:form-params {:findingTypes []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/findings/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"findingTypes\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/findings/create"),
Content = new StringContent("{\n \"findingTypes\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/findings/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"findingTypes\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/findings/create"
payload := strings.NewReader("{\n \"findingTypes\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/findings/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"findingTypes": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/findings/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"findingTypes\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/findings/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"findingTypes\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"findingTypes\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/findings/create")
.header("content-type", "application/json")
.body("{\n \"findingTypes\": []\n}")
.asString();
const data = JSON.stringify({
findingTypes: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/findings/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/create',
headers: {'content-type': 'application/json'},
data: {findingTypes: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/findings/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingTypes":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/findings/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "findingTypes": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"findingTypes\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/findings/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({findingTypes: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/create',
headers: {'content-type': 'application/json'},
body: {findingTypes: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/findings/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
findingTypes: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/create',
headers: {'content-type': 'application/json'},
data: {findingTypes: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/findings/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingTypes":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"findingTypes": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/findings/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/findings/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"findingTypes\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/findings/create",
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([
'findingTypes' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/findings/create', [
'body' => '{
"findingTypes": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/findings/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'findingTypes' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'findingTypes' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/findings/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/findings/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingTypes": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/findings/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingTypes": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"findingTypes\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/findings/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/findings/create"
payload = { "findingTypes": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/findings/create"
payload <- "{\n \"findingTypes\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/findings/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"findingTypes\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/findings/create') do |req|
req.body = "{\n \"findingTypes\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/findings/create";
let payload = json!({"findingTypes": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/findings/create \
--header 'content-type: application/json' \
--data '{
"findingTypes": []
}'
echo '{
"findingTypes": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/findings/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "findingTypes": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/findings/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["findingTypes": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/findings/create")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateThreatIntelSet
{{baseUrl}}/detector/:detectorId/threatintelset
QUERY PARAMS
detectorId
BODY json
{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/threatintelset");
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, "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/threatintelset" {:content-type :json
:form-params {:name ""
:format ""
:location ""
:activate false
:clientToken ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/threatintelset"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/threatintelset"),
Content = new StringContent("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/threatintelset");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/threatintelset"
payload := strings.NewReader("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/threatintelset HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 106
{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/threatintelset")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/threatintelset"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/threatintelset")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
name: '',
format: '',
location: '',
activate: false,
clientToken: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/threatintelset');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/threatintelset',
headers: {'content-type': 'application/json'},
data: {name: '', format: '', location: '', activate: false, clientToken: '', tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/threatintelset';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","format":"","location":"","activate":false,"clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/threatintelset',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "format": "",\n "location": "",\n "activate": false,\n "clientToken": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/threatintelset',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({name: '', format: '', location: '', activate: false, clientToken: '', tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/threatintelset',
headers: {'content-type': 'application/json'},
body: {name: '', format: '', location: '', activate: false, clientToken: '', tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/threatintelset');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
format: '',
location: '',
activate: false,
clientToken: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/threatintelset',
headers: {'content-type': 'application/json'},
data: {name: '', format: '', location: '', activate: false, clientToken: '', tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/threatintelset';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","format":"","location":"","activate":false,"clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"format": @"",
@"location": @"",
@"activate": @NO,
@"clientToken": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/threatintelset"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/threatintelset" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/threatintelset",
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([
'name' => '',
'format' => '',
'location' => '',
'activate' => null,
'clientToken' => '',
'tags' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/threatintelset', [
'body' => '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/threatintelset');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'format' => '',
'location' => '',
'activate' => null,
'clientToken' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'format' => '',
'location' => '',
'activate' => null,
'clientToken' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/threatintelset');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/threatintelset' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/threatintelset' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/threatintelset", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/threatintelset"
payload = {
"name": "",
"format": "",
"location": "",
"activate": False,
"clientToken": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/threatintelset"
payload <- "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/threatintelset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/threatintelset') do |req|
req.body = "{\n \"name\": \"\",\n \"format\": \"\",\n \"location\": \"\",\n \"activate\": false,\n \"clientToken\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/threatintelset";
let payload = json!({
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/threatintelset \
--header 'content-type: application/json' \
--data '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}'
echo '{
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": {}
}' | \
http POST {{baseUrl}}/detector/:detectorId/threatintelset \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "format": "",\n "location": "",\n "activate": false,\n "clientToken": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/threatintelset
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"format": "",
"location": "",
"activate": false,
"clientToken": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/threatintelset")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DeclineInvitations
{{baseUrl}}/invitation/decline
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/invitation/decline");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/invitation/decline" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/invitation/decline"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/invitation/decline"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/invitation/decline");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/invitation/decline"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/invitation/decline HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/invitation/decline")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/invitation/decline"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/invitation/decline")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/invitation/decline")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/invitation/decline');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/invitation/decline',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/invitation/decline';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/invitation/decline',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/invitation/decline")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/invitation/decline',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/invitation/decline',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/invitation/decline');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/invitation/decline',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/invitation/decline';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/invitation/decline"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/invitation/decline" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/invitation/decline",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/invitation/decline', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/invitation/decline');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/invitation/decline');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/invitation/decline' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/invitation/decline' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/invitation/decline", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/invitation/decline"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/invitation/decline"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/invitation/decline")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/invitation/decline') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/invitation/decline";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/invitation/decline \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/invitation/decline \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/invitation/decline
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/invitation/decline")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteDetector
{{baseUrl}}/detector/:detectorId
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/detector/:detectorId")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/detector/:detectorId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/detector/:detectorId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/detector/:detectorId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/detector/:detectorId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/detector/:detectorId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/detector/:detectorId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/detector/:detectorId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/detector/:detectorId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/detector/:detectorId');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/detector/:detectorId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/detector/:detectorId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/detector/:detectorId
http DELETE {{baseUrl}}/detector/:detectorId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/detector/:detectorId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteFilter
{{baseUrl}}/detector/:detectorId/filter/:filterName
QUERY PARAMS
detectorId
filterName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/filter/:filterName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/detector/:detectorId/filter/:filterName")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/filter/:filterName"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/filter/:filterName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/filter/:filterName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/filter/:filterName"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/detector/:detectorId/filter/:filterName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/detector/:detectorId/filter/:filterName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/filter/:filterName"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/detector/:detectorId/filter/:filterName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/filter/:filterName';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/filter/:filterName',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/detector/:detectorId/filter/:filterName');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/filter/:filterName';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/filter/:filterName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/filter/:filterName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/filter/:filterName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/detector/:detectorId/filter/:filterName');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/filter/:filterName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/filter/:filterName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/filter/:filterName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/filter/:filterName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/detector/:detectorId/filter/:filterName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/filter/:filterName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/filter/:filterName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/filter/:filterName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/detector/:detectorId/filter/:filterName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/filter/:filterName";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/detector/:detectorId/filter/:filterName
http DELETE {{baseUrl}}/detector/:detectorId/filter/:filterName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/detector/:detectorId/filter/:filterName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/filter/:filterName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteIPSet
{{baseUrl}}/detector/:detectorId/ipset/:ipSetId
QUERY PARAMS
detectorId
ipSetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/detector/:detectorId/ipset/:ipSetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/ipset/:ipSetId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/ipset/:ipSetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/detector/:detectorId/ipset/:ipSetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/detector/:detectorId/ipset/:ipSetId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/detector/:detectorId/ipset/:ipSetId
http DELETE {{baseUrl}}/detector/:detectorId/ipset/:ipSetId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/detector/:detectorId/ipset/:ipSetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DeleteInvitations
{{baseUrl}}/invitation/delete
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/invitation/delete");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/invitation/delete" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/invitation/delete"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/invitation/delete"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/invitation/delete");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/invitation/delete"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/invitation/delete HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/invitation/delete")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/invitation/delete"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/invitation/delete")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/invitation/delete")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/invitation/delete');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/invitation/delete',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/invitation/delete';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/invitation/delete',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/invitation/delete")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/invitation/delete',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/invitation/delete',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/invitation/delete');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/invitation/delete',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/invitation/delete';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/invitation/delete"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/invitation/delete" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/invitation/delete",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/invitation/delete', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/invitation/delete');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/invitation/delete');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/invitation/delete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/invitation/delete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/invitation/delete", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/invitation/delete"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/invitation/delete"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/invitation/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/invitation/delete') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/invitation/delete";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/invitation/delete \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/invitation/delete \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/invitation/delete
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/invitation/delete")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DeleteMembers
{{baseUrl}}/detector/:detectorId/member/delete
QUERY PARAMS
detectorId
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member/delete");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member/delete" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member/delete"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member/delete"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member/delete");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member/delete"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member/delete HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member/delete")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member/delete"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/delete")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member/delete")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member/delete');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/delete',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member/delete';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member/delete',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/delete")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member/delete',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/delete',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member/delete');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/delete',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member/delete';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member/delete"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member/delete" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member/delete",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member/delete', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member/delete');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member/delete');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member/delete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member/delete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member/delete", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member/delete"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member/delete"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member/delete")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member/delete') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member/delete";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member/delete \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/member/delete \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member/delete
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member/delete")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeletePublishingDestination
{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
QUERY PARAMS
detectorId
destinationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/detector/:detectorId/publishingDestination/:destinationId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/publishingDestination/:destinationId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/detector/:detectorId/publishingDestination/:destinationId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/detector/:detectorId/publishingDestination/:destinationId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
http DELETE {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteThreatIntelSet
{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
QUERY PARAMS
detectorId
threatIntelSetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
http DELETE {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DescribeMalwareScans
{{baseUrl}}/detector/:detectorId/malware-scans
QUERY PARAMS
detectorId
BODY json
{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/malware-scans");
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, "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/malware-scans" {:content-type :json
:form-params {:nextToken ""
:maxResults 0
:filterCriteria {:FilterCriterion ""}
:sortCriteria {:AttributeName ""
:OrderBy ""}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/malware-scans"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/malware-scans"),
Content = new StringContent("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/malware-scans");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/malware-scans"
payload := strings.NewReader("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/malware-scans HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 161
{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/malware-scans")
.setHeader("content-type", "application/json")
.setBody("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/malware-scans"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/malware-scans")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/malware-scans")
.header("content-type", "application/json")
.body("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
nextToken: '',
maxResults: 0,
filterCriteria: {
FilterCriterion: ''
},
sortCriteria: {
AttributeName: '',
OrderBy: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/malware-scans');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/malware-scans',
headers: {'content-type': 'application/json'},
data: {
nextToken: '',
maxResults: 0,
filterCriteria: {FilterCriterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/malware-scans';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"nextToken":"","maxResults":0,"filterCriteria":{"FilterCriterion":""},"sortCriteria":{"AttributeName":"","OrderBy":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/malware-scans',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "nextToken": "",\n "maxResults": 0,\n "filterCriteria": {\n "FilterCriterion": ""\n },\n "sortCriteria": {\n "AttributeName": "",\n "OrderBy": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/malware-scans")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/malware-scans',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
nextToken: '',
maxResults: 0,
filterCriteria: {FilterCriterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/malware-scans',
headers: {'content-type': 'application/json'},
body: {
nextToken: '',
maxResults: 0,
filterCriteria: {FilterCriterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/malware-scans');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
nextToken: '',
maxResults: 0,
filterCriteria: {
FilterCriterion: ''
},
sortCriteria: {
AttributeName: '',
OrderBy: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/malware-scans',
headers: {'content-type': 'application/json'},
data: {
nextToken: '',
maxResults: 0,
filterCriteria: {FilterCriterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/malware-scans';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"nextToken":"","maxResults":0,"filterCriteria":{"FilterCriterion":""},"sortCriteria":{"AttributeName":"","OrderBy":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"nextToken": @"",
@"maxResults": @0,
@"filterCriteria": @{ @"FilterCriterion": @"" },
@"sortCriteria": @{ @"AttributeName": @"", @"OrderBy": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/malware-scans"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/malware-scans" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/malware-scans",
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([
'nextToken' => '',
'maxResults' => 0,
'filterCriteria' => [
'FilterCriterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/malware-scans', [
'body' => '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/malware-scans');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'nextToken' => '',
'maxResults' => 0,
'filterCriteria' => [
'FilterCriterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'nextToken' => '',
'maxResults' => 0,
'filterCriteria' => [
'FilterCriterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/malware-scans');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/malware-scans' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/malware-scans' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/malware-scans", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/malware-scans"
payload = {
"nextToken": "",
"maxResults": 0,
"filterCriteria": { "FilterCriterion": "" },
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/malware-scans"
payload <- "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/malware-scans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/malware-scans') do |req|
req.body = "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/malware-scans";
let payload = json!({
"nextToken": "",
"maxResults": 0,
"filterCriteria": json!({"FilterCriterion": ""}),
"sortCriteria": json!({
"AttributeName": "",
"OrderBy": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/malware-scans \
--header 'content-type: application/json' \
--data '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
echo '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}' | \
http POST {{baseUrl}}/detector/:detectorId/malware-scans \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "nextToken": "",\n "maxResults": 0,\n "filterCriteria": {\n "FilterCriterion": ""\n },\n "sortCriteria": {\n "AttributeName": "",\n "OrderBy": ""\n }\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/malware-scans
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"nextToken": "",
"maxResults": 0,
"filterCriteria": ["FilterCriterion": ""],
"sortCriteria": [
"AttributeName": "",
"OrderBy": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/malware-scans")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeOrganizationConfiguration
{{baseUrl}}/detector/:detectorId/admin
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/admin");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/admin")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/admin"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/admin"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/admin");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/admin"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/admin HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/admin")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/admin"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/admin")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/admin")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/admin');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/admin'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/admin';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/admin',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/admin")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/admin',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/admin'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/admin');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/admin'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/admin';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/admin"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/admin" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/admin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/admin');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/admin');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/admin');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/admin' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/admin' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/admin")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/admin"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/admin"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/admin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/admin') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/admin";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/admin
http GET {{baseUrl}}/detector/:detectorId/admin
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/admin
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/admin")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribePublishingDestination
{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
QUERY PARAMS
detectorId
destinationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/publishingDestination/:destinationId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/publishingDestination/:destinationId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/publishingDestination/:destinationId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/publishingDestination/:destinationId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
http GET {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DisableOrganizationAdminAccount
{{baseUrl}}/admin/disable
BODY json
{
"adminAccountId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/admin/disable");
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, "{\n \"adminAccountId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/admin/disable" {:content-type :json
:form-params {:adminAccountId ""}})
require "http/client"
url = "{{baseUrl}}/admin/disable"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"adminAccountId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/admin/disable"),
Content = new StringContent("{\n \"adminAccountId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/admin/disable");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"adminAccountId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/admin/disable"
payload := strings.NewReader("{\n \"adminAccountId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/admin/disable HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"adminAccountId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/admin/disable")
.setHeader("content-type", "application/json")
.setBody("{\n \"adminAccountId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/admin/disable"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"adminAccountId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"adminAccountId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/admin/disable")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/admin/disable")
.header("content-type", "application/json")
.body("{\n \"adminAccountId\": \"\"\n}")
.asString();
const data = JSON.stringify({
adminAccountId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/admin/disable');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/admin/disable',
headers: {'content-type': 'application/json'},
data: {adminAccountId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/admin/disable';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"adminAccountId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/admin/disable',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "adminAccountId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"adminAccountId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/admin/disable")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/admin/disable',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({adminAccountId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/admin/disable',
headers: {'content-type': 'application/json'},
body: {adminAccountId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/admin/disable');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
adminAccountId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/admin/disable',
headers: {'content-type': 'application/json'},
data: {adminAccountId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/admin/disable';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"adminAccountId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"adminAccountId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/admin/disable"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/admin/disable" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"adminAccountId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/admin/disable",
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([
'adminAccountId' => ''
]),
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;
}
request('POST', '{{baseUrl}}/admin/disable', [
'body' => '{
"adminAccountId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/admin/disable');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'adminAccountId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'adminAccountId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/admin/disable');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/admin/disable' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"adminAccountId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/admin/disable' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"adminAccountId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"adminAccountId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/admin/disable", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/admin/disable"
payload = { "adminAccountId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/admin/disable"
payload <- "{\n \"adminAccountId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/admin/disable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"adminAccountId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/admin/disable') do |req|
req.body = "{\n \"adminAccountId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/admin/disable";
let payload = json!({"adminAccountId": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/admin/disable \
--header 'content-type: application/json' \
--data '{
"adminAccountId": ""
}'
echo '{
"adminAccountId": ""
}' | \
http POST {{baseUrl}}/admin/disable \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "adminAccountId": ""\n}' \
--output-document \
- {{baseUrl}}/admin/disable
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["adminAccountId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/admin/disable")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DisassociateFromAdministratorAccount
{{baseUrl}}/detector/:detectorId/administrator/disassociate
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/administrator/disassociate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/administrator/disassociate")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/administrator/disassociate"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/administrator/disassociate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/administrator/disassociate");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/administrator/disassociate"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/administrator/disassociate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/administrator/disassociate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/administrator/disassociate"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/administrator/disassociate")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/administrator/disassociate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/administrator/disassociate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/administrator/disassociate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/administrator/disassociate';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/administrator/disassociate',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/administrator/disassociate")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/administrator/disassociate',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/administrator/disassociate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/administrator/disassociate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/administrator/disassociate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/administrator/disassociate';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/administrator/disassociate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/administrator/disassociate" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/administrator/disassociate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/detector/:detectorId/administrator/disassociate');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/administrator/disassociate');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/administrator/disassociate');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/administrator/disassociate' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/administrator/disassociate' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/detector/:detectorId/administrator/disassociate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/administrator/disassociate"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/administrator/disassociate"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/administrator/disassociate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/detector/:detectorId/administrator/disassociate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/administrator/disassociate";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/administrator/disassociate
http POST {{baseUrl}}/detector/:detectorId/administrator/disassociate
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/detector/:detectorId/administrator/disassociate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/administrator/disassociate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DisassociateFromMasterAccount
{{baseUrl}}/detector/:detectorId/master/disassociate
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/master/disassociate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/master/disassociate")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/master/disassociate"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/master/disassociate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/master/disassociate");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/master/disassociate"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/master/disassociate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/master/disassociate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/master/disassociate"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/master/disassociate")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/master/disassociate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/master/disassociate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/master/disassociate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/master/disassociate';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/master/disassociate',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/master/disassociate")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/master/disassociate',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/master/disassociate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/master/disassociate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/master/disassociate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/master/disassociate';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/master/disassociate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/master/disassociate" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/master/disassociate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/detector/:detectorId/master/disassociate');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/master/disassociate');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/master/disassociate');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/master/disassociate' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/master/disassociate' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/detector/:detectorId/master/disassociate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/master/disassociate"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/master/disassociate"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/master/disassociate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/detector/:detectorId/master/disassociate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/master/disassociate";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/master/disassociate
http POST {{baseUrl}}/detector/:detectorId/master/disassociate
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/detector/:detectorId/master/disassociate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/master/disassociate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DisassociateMembers
{{baseUrl}}/detector/:detectorId/member/disassociate
QUERY PARAMS
detectorId
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member/disassociate");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member/disassociate" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member/disassociate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member/disassociate"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member/disassociate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member/disassociate"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member/disassociate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member/disassociate")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member/disassociate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/disassociate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member/disassociate")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member/disassociate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/disassociate',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member/disassociate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member/disassociate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/disassociate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member/disassociate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/disassociate',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member/disassociate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/disassociate',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member/disassociate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member/disassociate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member/disassociate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member/disassociate",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member/disassociate', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member/disassociate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member/disassociate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member/disassociate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member/disassociate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member/disassociate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member/disassociate"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member/disassociate"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member/disassociate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member/disassociate') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member/disassociate";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member/disassociate \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/member/disassociate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member/disassociate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member/disassociate")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
EnableOrganizationAdminAccount
{{baseUrl}}/admin/enable
BODY json
{
"adminAccountId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/admin/enable");
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, "{\n \"adminAccountId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/admin/enable" {:content-type :json
:form-params {:adminAccountId ""}})
require "http/client"
url = "{{baseUrl}}/admin/enable"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"adminAccountId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/admin/enable"),
Content = new StringContent("{\n \"adminAccountId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/admin/enable");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"adminAccountId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/admin/enable"
payload := strings.NewReader("{\n \"adminAccountId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/admin/enable HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"adminAccountId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/admin/enable")
.setHeader("content-type", "application/json")
.setBody("{\n \"adminAccountId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/admin/enable"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"adminAccountId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"adminAccountId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/admin/enable")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/admin/enable")
.header("content-type", "application/json")
.body("{\n \"adminAccountId\": \"\"\n}")
.asString();
const data = JSON.stringify({
adminAccountId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/admin/enable');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/admin/enable',
headers: {'content-type': 'application/json'},
data: {adminAccountId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/admin/enable';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"adminAccountId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/admin/enable',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "adminAccountId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"adminAccountId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/admin/enable")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/admin/enable',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({adminAccountId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/admin/enable',
headers: {'content-type': 'application/json'},
body: {adminAccountId: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/admin/enable');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
adminAccountId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/admin/enable',
headers: {'content-type': 'application/json'},
data: {adminAccountId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/admin/enable';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"adminAccountId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"adminAccountId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/admin/enable"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/admin/enable" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"adminAccountId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/admin/enable",
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([
'adminAccountId' => ''
]),
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;
}
request('POST', '{{baseUrl}}/admin/enable', [
'body' => '{
"adminAccountId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/admin/enable');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'adminAccountId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'adminAccountId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/admin/enable');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/admin/enable' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"adminAccountId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/admin/enable' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"adminAccountId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"adminAccountId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/admin/enable", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/admin/enable"
payload = { "adminAccountId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/admin/enable"
payload <- "{\n \"adminAccountId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/admin/enable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"adminAccountId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/admin/enable') do |req|
req.body = "{\n \"adminAccountId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/admin/enable";
let payload = json!({"adminAccountId": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/admin/enable \
--header 'content-type: application/json' \
--data '{
"adminAccountId": ""
}'
echo '{
"adminAccountId": ""
}' | \
http POST {{baseUrl}}/admin/enable \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "adminAccountId": ""\n}' \
--output-document \
- {{baseUrl}}/admin/enable
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["adminAccountId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/admin/enable")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetAdministratorAccount
{{baseUrl}}/detector/:detectorId/administrator
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/administrator");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/administrator")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/administrator"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/administrator"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/administrator");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/administrator"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/administrator HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/administrator")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/administrator"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/administrator")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/administrator")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/administrator');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/administrator'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/administrator';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/administrator',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/administrator")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/administrator',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/administrator'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/administrator');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/administrator'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/administrator';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/administrator"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/administrator" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/administrator",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/administrator');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/administrator');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/administrator');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/administrator' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/administrator' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/administrator")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/administrator"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/administrator"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/administrator")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/administrator') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/administrator";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/administrator
http GET {{baseUrl}}/detector/:detectorId/administrator
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/administrator
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/administrator")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
GetCoverageStatistics
{{baseUrl}}/detector/:detectorId/coverage/statistics
QUERY PARAMS
detectorId
BODY json
{
"filterCriteria": {
"FilterCriterion": ""
},
"statisticsType": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/coverage/statistics");
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, "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/coverage/statistics" {:content-type :json
:form-params {:filterCriteria {:FilterCriterion ""}
:statisticsType []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/coverage/statistics"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/coverage/statistics"),
Content = new StringContent("{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/coverage/statistics");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/coverage/statistics"
payload := strings.NewReader("{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/coverage/statistics HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 79
{
"filterCriteria": {
"FilterCriterion": ""
},
"statisticsType": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/coverage/statistics")
.setHeader("content-type", "application/json")
.setBody("{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/coverage/statistics"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/coverage/statistics")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/coverage/statistics")
.header("content-type", "application/json")
.body("{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}")
.asString();
const data = JSON.stringify({
filterCriteria: {
FilterCriterion: ''
},
statisticsType: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/coverage/statistics');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/coverage/statistics',
headers: {'content-type': 'application/json'},
data: {filterCriteria: {FilterCriterion: ''}, statisticsType: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/coverage/statistics';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filterCriteria":{"FilterCriterion":""},"statisticsType":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/coverage/statistics',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "filterCriteria": {\n "FilterCriterion": ""\n },\n "statisticsType": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/coverage/statistics")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/coverage/statistics',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({filterCriteria: {FilterCriterion: ''}, statisticsType: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/coverage/statistics',
headers: {'content-type': 'application/json'},
body: {filterCriteria: {FilterCriterion: ''}, statisticsType: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/coverage/statistics');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
filterCriteria: {
FilterCriterion: ''
},
statisticsType: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/coverage/statistics',
headers: {'content-type': 'application/json'},
data: {filterCriteria: {FilterCriterion: ''}, statisticsType: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/coverage/statistics';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"filterCriteria":{"FilterCriterion":""},"statisticsType":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"filterCriteria": @{ @"FilterCriterion": @"" },
@"statisticsType": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/coverage/statistics"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/coverage/statistics" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/coverage/statistics",
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([
'filterCriteria' => [
'FilterCriterion' => ''
],
'statisticsType' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/coverage/statistics', [
'body' => '{
"filterCriteria": {
"FilterCriterion": ""
},
"statisticsType": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/coverage/statistics');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'filterCriteria' => [
'FilterCriterion' => ''
],
'statisticsType' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'filterCriteria' => [
'FilterCriterion' => ''
],
'statisticsType' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/coverage/statistics');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/coverage/statistics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filterCriteria": {
"FilterCriterion": ""
},
"statisticsType": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/coverage/statistics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"filterCriteria": {
"FilterCriterion": ""
},
"statisticsType": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/coverage/statistics", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/coverage/statistics"
payload = {
"filterCriteria": { "FilterCriterion": "" },
"statisticsType": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/coverage/statistics"
payload <- "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/coverage/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/coverage/statistics') do |req|
req.body = "{\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"statisticsType\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/coverage/statistics";
let payload = json!({
"filterCriteria": json!({"FilterCriterion": ""}),
"statisticsType": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/coverage/statistics \
--header 'content-type: application/json' \
--data '{
"filterCriteria": {
"FilterCriterion": ""
},
"statisticsType": []
}'
echo '{
"filterCriteria": {
"FilterCriterion": ""
},
"statisticsType": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/coverage/statistics \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "filterCriteria": {\n "FilterCriterion": ""\n },\n "statisticsType": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/coverage/statistics
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"filterCriteria": ["FilterCriterion": ""],
"statisticsType": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/coverage/statistics")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetDetector
{{baseUrl}}/detector/:detectorId
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId
http GET {{baseUrl}}/detector/:detectorId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetFilter
{{baseUrl}}/detector/:detectorId/filter/:filterName
QUERY PARAMS
detectorId
filterName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/filter/:filterName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/filter/:filterName")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/filter/:filterName"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/filter/:filterName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/filter/:filterName");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/filter/:filterName"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/filter/:filterName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/filter/:filterName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/filter/:filterName"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/filter/:filterName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/filter/:filterName';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/filter/:filterName',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/filter/:filterName');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/filter/:filterName';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/filter/:filterName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/filter/:filterName" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/filter/:filterName",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/filter/:filterName');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/filter/:filterName');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/filter/:filterName');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/filter/:filterName' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/filter/:filterName' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/filter/:filterName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/filter/:filterName"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/filter/:filterName"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/filter/:filterName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/filter/:filterName') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/filter/:filterName";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/filter/:filterName
http GET {{baseUrl}}/detector/:detectorId/filter/:filterName
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/filter/:filterName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/filter/:filterName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
GetFindings
{{baseUrl}}/detector/:detectorId/findings/get
QUERY PARAMS
detectorId
BODY json
{
"findingIds": [],
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/findings/get");
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, "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/findings/get" {:content-type :json
:form-params {:findingIds []
:sortCriteria {:AttributeName ""
:OrderBy ""}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/findings/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/findings/get"),
Content = new StringContent("{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/findings/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/findings/get"
payload := strings.NewReader("{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/findings/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 90
{
"findingIds": [],
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/findings/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/findings/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/findings/get")
.header("content-type", "application/json")
.body("{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
findingIds: [],
sortCriteria: {
AttributeName: '',
OrderBy: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/findings/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/get',
headers: {'content-type': 'application/json'},
data: {findingIds: [], sortCriteria: {AttributeName: '', OrderBy: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/findings/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingIds":[],"sortCriteria":{"AttributeName":"","OrderBy":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/findings/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "findingIds": [],\n "sortCriteria": {\n "AttributeName": "",\n "OrderBy": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/findings/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({findingIds: [], sortCriteria: {AttributeName: '', OrderBy: ''}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/get',
headers: {'content-type': 'application/json'},
body: {findingIds: [], sortCriteria: {AttributeName: '', OrderBy: ''}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/findings/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
findingIds: [],
sortCriteria: {
AttributeName: '',
OrderBy: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/get',
headers: {'content-type': 'application/json'},
data: {findingIds: [], sortCriteria: {AttributeName: '', OrderBy: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/findings/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingIds":[],"sortCriteria":{"AttributeName":"","OrderBy":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"findingIds": @[ ],
@"sortCriteria": @{ @"AttributeName": @"", @"OrderBy": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/findings/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/findings/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/findings/get",
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([
'findingIds' => [
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/findings/get', [
'body' => '{
"findingIds": [],
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/findings/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'findingIds' => [
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'findingIds' => [
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/findings/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/findings/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingIds": [],
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/findings/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingIds": [],
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/findings/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/findings/get"
payload = {
"findingIds": [],
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/findings/get"
payload <- "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/findings/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/findings/get') do |req|
req.body = "{\n \"findingIds\": [],\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/findings/get";
let payload = json!({
"findingIds": (),
"sortCriteria": json!({
"AttributeName": "",
"OrderBy": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/findings/get \
--header 'content-type: application/json' \
--data '{
"findingIds": [],
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
echo '{
"findingIds": [],
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}' | \
http POST {{baseUrl}}/detector/:detectorId/findings/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "findingIds": [],\n "sortCriteria": {\n "AttributeName": "",\n "OrderBy": ""\n }\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/findings/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"findingIds": [],
"sortCriteria": [
"AttributeName": "",
"OrderBy": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/findings/get")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
GetFindingsStatistics
{{baseUrl}}/detector/:detectorId/findings/statistics
QUERY PARAMS
detectorId
BODY json
{
"findingStatisticTypes": [],
"findingCriteria": {
"Criterion": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/findings/statistics");
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, "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/findings/statistics" {:content-type :json
:form-params {:findingStatisticTypes []
:findingCriteria {:Criterion ""}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/findings/statistics"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/findings/statistics"),
Content = new StringContent("{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/findings/statistics");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/findings/statistics"
payload := strings.NewReader("{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/findings/statistics HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 81
{
"findingStatisticTypes": [],
"findingCriteria": {
"Criterion": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/findings/statistics")
.setHeader("content-type", "application/json")
.setBody("{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/findings/statistics"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/statistics")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/findings/statistics")
.header("content-type", "application/json")
.body("{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
findingStatisticTypes: [],
findingCriteria: {
Criterion: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/findings/statistics');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/statistics',
headers: {'content-type': 'application/json'},
data: {findingStatisticTypes: [], findingCriteria: {Criterion: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/findings/statistics';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingStatisticTypes":[],"findingCriteria":{"Criterion":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/findings/statistics',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "findingStatisticTypes": [],\n "findingCriteria": {\n "Criterion": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/statistics")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/findings/statistics',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({findingStatisticTypes: [], findingCriteria: {Criterion: ''}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/statistics',
headers: {'content-type': 'application/json'},
body: {findingStatisticTypes: [], findingCriteria: {Criterion: ''}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/findings/statistics');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
findingStatisticTypes: [],
findingCriteria: {
Criterion: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/statistics',
headers: {'content-type': 'application/json'},
data: {findingStatisticTypes: [], findingCriteria: {Criterion: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/findings/statistics';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingStatisticTypes":[],"findingCriteria":{"Criterion":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"findingStatisticTypes": @[ ],
@"findingCriteria": @{ @"Criterion": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/findings/statistics"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/findings/statistics" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/findings/statistics",
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([
'findingStatisticTypes' => [
],
'findingCriteria' => [
'Criterion' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/findings/statistics', [
'body' => '{
"findingStatisticTypes": [],
"findingCriteria": {
"Criterion": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/findings/statistics');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'findingStatisticTypes' => [
],
'findingCriteria' => [
'Criterion' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'findingStatisticTypes' => [
],
'findingCriteria' => [
'Criterion' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/findings/statistics');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/findings/statistics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingStatisticTypes": [],
"findingCriteria": {
"Criterion": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/findings/statistics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingStatisticTypes": [],
"findingCriteria": {
"Criterion": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/findings/statistics", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/findings/statistics"
payload = {
"findingStatisticTypes": [],
"findingCriteria": { "Criterion": "" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/findings/statistics"
payload <- "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/findings/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/findings/statistics') do |req|
req.body = "{\n \"findingStatisticTypes\": [],\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/findings/statistics";
let payload = json!({
"findingStatisticTypes": (),
"findingCriteria": json!({"Criterion": ""})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/findings/statistics \
--header 'content-type: application/json' \
--data '{
"findingStatisticTypes": [],
"findingCriteria": {
"Criterion": ""
}
}'
echo '{
"findingStatisticTypes": [],
"findingCriteria": {
"Criterion": ""
}
}' | \
http POST {{baseUrl}}/detector/:detectorId/findings/statistics \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "findingStatisticTypes": [],\n "findingCriteria": {\n "Criterion": ""\n }\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/findings/statistics
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"findingStatisticTypes": [],
"findingCriteria": ["Criterion": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/findings/statistics")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetIPSet
{{baseUrl}}/detector/:detectorId/ipset/:ipSetId
QUERY PARAMS
detectorId
ipSetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/ipset/:ipSetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/ipset/:ipSetId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/ipset/:ipSetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/ipset/:ipSetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/ipset/:ipSetId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/ipset/:ipSetId
http GET {{baseUrl}}/detector/:detectorId/ipset/:ipSetId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/ipset/:ipSetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetInvitationsCount
{{baseUrl}}/invitation/count
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/invitation/count");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/invitation/count")
require "http/client"
url = "{{baseUrl}}/invitation/count"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/invitation/count"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/invitation/count");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/invitation/count"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/invitation/count HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/invitation/count")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/invitation/count"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/invitation/count")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/invitation/count")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/invitation/count');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/invitation/count'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/invitation/count';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/invitation/count',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/invitation/count")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/invitation/count',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/invitation/count'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/invitation/count');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/invitation/count'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/invitation/count';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/invitation/count"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/invitation/count" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/invitation/count",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/invitation/count');
echo $response->getBody();
setUrl('{{baseUrl}}/invitation/count');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/invitation/count');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/invitation/count' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/invitation/count' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/invitation/count")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/invitation/count"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/invitation/count"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/invitation/count")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/invitation/count') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/invitation/count";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/invitation/count
http GET {{baseUrl}}/invitation/count
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/invitation/count
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/invitation/count")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetMalwareScanSettings
{{baseUrl}}/detector/:detectorId/malware-scan-settings
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/malware-scan-settings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/malware-scan-settings")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/malware-scan-settings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/malware-scan-settings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/malware-scan-settings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/malware-scan-settings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/malware-scan-settings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/malware-scan-settings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/malware-scan-settings"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/malware-scan-settings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/malware-scan-settings")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/malware-scan-settings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/malware-scan-settings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/malware-scan-settings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/malware-scan-settings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/malware-scan-settings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/malware-scan-settings',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/malware-scan-settings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/malware-scan-settings');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/malware-scan-settings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/malware-scan-settings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/malware-scan-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/malware-scan-settings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/malware-scan-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/malware-scan-settings');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/malware-scan-settings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/malware-scan-settings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/malware-scan-settings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/malware-scan-settings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/malware-scan-settings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/malware-scan-settings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/malware-scan-settings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/malware-scan-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/malware-scan-settings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/malware-scan-settings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/malware-scan-settings
http GET {{baseUrl}}/detector/:detectorId/malware-scan-settings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/malware-scan-settings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/malware-scan-settings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetMasterAccount
{{baseUrl}}/detector/:detectorId/master
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/master");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/master")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/master"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/master"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/master");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/master"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/master HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/master")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/master"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/master")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/master")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/master');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/master'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/master';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/master',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/master")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/master',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/master'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/master');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/master'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/master';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/master"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/master" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/master",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/master');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/master');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/master');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/master' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/master' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/master")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/master"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/master"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/master")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/master') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/master";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/master
http GET {{baseUrl}}/detector/:detectorId/master
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/master
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/master")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
GetMemberDetectors
{{baseUrl}}/detector/:detectorId/member/detector/get
QUERY PARAMS
detectorId
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member/detector/get");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member/detector/get" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member/detector/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member/detector/get"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member/detector/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member/detector/get"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member/detector/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member/detector/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member/detector/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/detector/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member/detector/get")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member/detector/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/detector/get',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member/detector/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member/detector/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/detector/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member/detector/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/detector/get',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member/detector/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/detector/get',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member/detector/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member/detector/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member/detector/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member/detector/get",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member/detector/get', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member/detector/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member/detector/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member/detector/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member/detector/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member/detector/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member/detector/get"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member/detector/get"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member/detector/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member/detector/get') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member/detector/get";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member/detector/get \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/member/detector/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member/detector/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member/detector/get")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
GetMembers
{{baseUrl}}/detector/:detectorId/member/get
QUERY PARAMS
detectorId
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member/get");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member/get" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member/get"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member/get"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member/get")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/get',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/get',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/get',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member/get",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member/get', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member/get"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member/get"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member/get') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member/get";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member/get \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/member/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member/get")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
GetRemainingFreeTrialDays
{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining
QUERY PARAMS
detectorId
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/freeTrial/daysRemaining HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/freeTrial/daysRemaining',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/freeTrial/daysRemaining", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/freeTrial/daysRemaining') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/freeTrial/daysRemaining")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetThreatIntelSet
{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
QUERY PARAMS
detectorId
threatIntelSetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
http GET {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
GetUsageStatistics
{{baseUrl}}/detector/:detectorId/usage/statistics
QUERY PARAMS
detectorId
BODY json
{
"usageStatisticsType": "",
"usageCriteria": {
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
},
"unit": "",
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/usage/statistics");
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, "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/usage/statistics" {:content-type :json
:form-params {:usageStatisticsType ""
:usageCriteria {:AccountIds ""
:DataSources ""
:Resources ""
:Features ""}
:unit ""
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/usage/statistics"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/usage/statistics"),
Content = new StringContent("{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/usage/statistics");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/usage/statistics"
payload := strings.NewReader("{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/usage/statistics HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 194
{
"usageStatisticsType": "",
"usageCriteria": {
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
},
"unit": "",
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/usage/statistics")
.setHeader("content-type", "application/json")
.setBody("{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/usage/statistics"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/usage/statistics")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/usage/statistics")
.header("content-type", "application/json")
.body("{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
usageStatisticsType: '',
usageCriteria: {
AccountIds: '',
DataSources: '',
Resources: '',
Features: ''
},
unit: '',
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/usage/statistics');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/usage/statistics',
headers: {'content-type': 'application/json'},
data: {
usageStatisticsType: '',
usageCriteria: {AccountIds: '', DataSources: '', Resources: '', Features: ''},
unit: '',
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/usage/statistics';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"usageStatisticsType":"","usageCriteria":{"AccountIds":"","DataSources":"","Resources":"","Features":""},"unit":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/usage/statistics',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "usageStatisticsType": "",\n "usageCriteria": {\n "AccountIds": "",\n "DataSources": "",\n "Resources": "",\n "Features": ""\n },\n "unit": "",\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/usage/statistics")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/usage/statistics',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
usageStatisticsType: '',
usageCriteria: {AccountIds: '', DataSources: '', Resources: '', Features: ''},
unit: '',
maxResults: 0,
nextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/usage/statistics',
headers: {'content-type': 'application/json'},
body: {
usageStatisticsType: '',
usageCriteria: {AccountIds: '', DataSources: '', Resources: '', Features: ''},
unit: '',
maxResults: 0,
nextToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/usage/statistics');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
usageStatisticsType: '',
usageCriteria: {
AccountIds: '',
DataSources: '',
Resources: '',
Features: ''
},
unit: '',
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/usage/statistics',
headers: {'content-type': 'application/json'},
data: {
usageStatisticsType: '',
usageCriteria: {AccountIds: '', DataSources: '', Resources: '', Features: ''},
unit: '',
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/usage/statistics';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"usageStatisticsType":"","usageCriteria":{"AccountIds":"","DataSources":"","Resources":"","Features":""},"unit":"","maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"usageStatisticsType": @"",
@"usageCriteria": @{ @"AccountIds": @"", @"DataSources": @"", @"Resources": @"", @"Features": @"" },
@"unit": @"",
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/usage/statistics"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/usage/statistics" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/usage/statistics",
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([
'usageStatisticsType' => '',
'usageCriteria' => [
'AccountIds' => '',
'DataSources' => '',
'Resources' => '',
'Features' => ''
],
'unit' => '',
'maxResults' => 0,
'nextToken' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/usage/statistics', [
'body' => '{
"usageStatisticsType": "",
"usageCriteria": {
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
},
"unit": "",
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/usage/statistics');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'usageStatisticsType' => '',
'usageCriteria' => [
'AccountIds' => '',
'DataSources' => '',
'Resources' => '',
'Features' => ''
],
'unit' => '',
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'usageStatisticsType' => '',
'usageCriteria' => [
'AccountIds' => '',
'DataSources' => '',
'Resources' => '',
'Features' => ''
],
'unit' => '',
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/usage/statistics');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/usage/statistics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"usageStatisticsType": "",
"usageCriteria": {
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
},
"unit": "",
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/usage/statistics' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"usageStatisticsType": "",
"usageCriteria": {
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
},
"unit": "",
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/usage/statistics", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/usage/statistics"
payload = {
"usageStatisticsType": "",
"usageCriteria": {
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
},
"unit": "",
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/usage/statistics"
payload <- "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/usage/statistics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/usage/statistics') do |req|
req.body = "{\n \"usageStatisticsType\": \"\",\n \"usageCriteria\": {\n \"AccountIds\": \"\",\n \"DataSources\": \"\",\n \"Resources\": \"\",\n \"Features\": \"\"\n },\n \"unit\": \"\",\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/usage/statistics";
let payload = json!({
"usageStatisticsType": "",
"usageCriteria": json!({
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
}),
"unit": "",
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/usage/statistics \
--header 'content-type: application/json' \
--data '{
"usageStatisticsType": "",
"usageCriteria": {
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
},
"unit": "",
"maxResults": 0,
"nextToken": ""
}'
echo '{
"usageStatisticsType": "",
"usageCriteria": {
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
},
"unit": "",
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/usage/statistics \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "usageStatisticsType": "",\n "usageCriteria": {\n "AccountIds": "",\n "DataSources": "",\n "Resources": "",\n "Features": ""\n },\n "unit": "",\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/usage/statistics
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"usageStatisticsType": "",
"usageCriteria": [
"AccountIds": "",
"DataSources": "",
"Resources": "",
"Features": ""
],
"unit": "",
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/usage/statistics")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
InviteMembers
{{baseUrl}}/detector/:detectorId/member/invite
QUERY PARAMS
detectorId
BODY json
{
"accountIds": [],
"disableEmailNotification": false,
"message": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member/invite");
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, "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member/invite" {:content-type :json
:form-params {:accountIds []
:disableEmailNotification false
:message ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member/invite"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member/invite"),
Content = new StringContent("{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member/invite");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member/invite"
payload := strings.NewReader("{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member/invite HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"accountIds": [],
"disableEmailNotification": false,
"message": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member/invite")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member/invite"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/invite")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member/invite")
.header("content-type", "application/json")
.body("{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountIds: [],
disableEmailNotification: false,
message: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member/invite');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/invite',
headers: {'content-type': 'application/json'},
data: {accountIds: [], disableEmailNotification: false, message: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member/invite';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[],"disableEmailNotification":false,"message":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member/invite',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": [],\n "disableEmailNotification": false,\n "message": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/invite")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member/invite',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: [], disableEmailNotification: false, message: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/invite',
headers: {'content-type': 'application/json'},
body: {accountIds: [], disableEmailNotification: false, message: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member/invite');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: [],
disableEmailNotification: false,
message: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/invite',
headers: {'content-type': 'application/json'},
data: {accountIds: [], disableEmailNotification: false, message: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member/invite';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[],"disableEmailNotification":false,"message":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ],
@"disableEmailNotification": @NO,
@"message": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member/invite"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member/invite" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member/invite",
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([
'accountIds' => [
],
'disableEmailNotification' => null,
'message' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member/invite', [
'body' => '{
"accountIds": [],
"disableEmailNotification": false,
"message": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member/invite');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
],
'disableEmailNotification' => null,
'message' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
],
'disableEmailNotification' => null,
'message' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member/invite');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member/invite' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": [],
"disableEmailNotification": false,
"message": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member/invite' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": [],
"disableEmailNotification": false,
"message": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member/invite", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member/invite"
payload = {
"accountIds": [],
"disableEmailNotification": False,
"message": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member/invite"
payload <- "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member/invite")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member/invite') do |req|
req.body = "{\n \"accountIds\": [],\n \"disableEmailNotification\": false,\n \"message\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member/invite";
let payload = json!({
"accountIds": (),
"disableEmailNotification": false,
"message": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member/invite \
--header 'content-type: application/json' \
--data '{
"accountIds": [],
"disableEmailNotification": false,
"message": ""
}'
echo '{
"accountIds": [],
"disableEmailNotification": false,
"message": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/member/invite \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": [],\n "disableEmailNotification": false,\n "message": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member/invite
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountIds": [],
"disableEmailNotification": false,
"message": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member/invite")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
ListCoverage
{{baseUrl}}/detector/:detectorId/coverage
QUERY PARAMS
detectorId
BODY json
{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/coverage");
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, "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/coverage" {:content-type :json
:form-params {:nextToken ""
:maxResults 0
:filterCriteria {:FilterCriterion ""}
:sortCriteria {:AttributeName ""
:OrderBy ""}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/coverage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/coverage"),
Content = new StringContent("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/coverage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/coverage"
payload := strings.NewReader("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/coverage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 161
{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/coverage")
.setHeader("content-type", "application/json")
.setBody("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/coverage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/coverage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/coverage")
.header("content-type", "application/json")
.body("{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
nextToken: '',
maxResults: 0,
filterCriteria: {
FilterCriterion: ''
},
sortCriteria: {
AttributeName: '',
OrderBy: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/coverage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/coverage',
headers: {'content-type': 'application/json'},
data: {
nextToken: '',
maxResults: 0,
filterCriteria: {FilterCriterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/coverage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"nextToken":"","maxResults":0,"filterCriteria":{"FilterCriterion":""},"sortCriteria":{"AttributeName":"","OrderBy":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/coverage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "nextToken": "",\n "maxResults": 0,\n "filterCriteria": {\n "FilterCriterion": ""\n },\n "sortCriteria": {\n "AttributeName": "",\n "OrderBy": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/coverage")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/coverage',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
nextToken: '',
maxResults: 0,
filterCriteria: {FilterCriterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/coverage',
headers: {'content-type': 'application/json'},
body: {
nextToken: '',
maxResults: 0,
filterCriteria: {FilterCriterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/coverage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
nextToken: '',
maxResults: 0,
filterCriteria: {
FilterCriterion: ''
},
sortCriteria: {
AttributeName: '',
OrderBy: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/coverage',
headers: {'content-type': 'application/json'},
data: {
nextToken: '',
maxResults: 0,
filterCriteria: {FilterCriterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/coverage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"nextToken":"","maxResults":0,"filterCriteria":{"FilterCriterion":""},"sortCriteria":{"AttributeName":"","OrderBy":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"nextToken": @"",
@"maxResults": @0,
@"filterCriteria": @{ @"FilterCriterion": @"" },
@"sortCriteria": @{ @"AttributeName": @"", @"OrderBy": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/coverage"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/coverage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/coverage",
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([
'nextToken' => '',
'maxResults' => 0,
'filterCriteria' => [
'FilterCriterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/coverage', [
'body' => '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/coverage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'nextToken' => '',
'maxResults' => 0,
'filterCriteria' => [
'FilterCriterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'nextToken' => '',
'maxResults' => 0,
'filterCriteria' => [
'FilterCriterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/coverage');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/coverage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/coverage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/coverage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/coverage"
payload = {
"nextToken": "",
"maxResults": 0,
"filterCriteria": { "FilterCriterion": "" },
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/coverage"
payload <- "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/coverage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/coverage') do |req|
req.body = "{\n \"nextToken\": \"\",\n \"maxResults\": 0,\n \"filterCriteria\": {\n \"FilterCriterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/coverage";
let payload = json!({
"nextToken": "",
"maxResults": 0,
"filterCriteria": json!({"FilterCriterion": ""}),
"sortCriteria": json!({
"AttributeName": "",
"OrderBy": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/coverage \
--header 'content-type: application/json' \
--data '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}'
echo '{
"nextToken": "",
"maxResults": 0,
"filterCriteria": {
"FilterCriterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
}
}' | \
http POST {{baseUrl}}/detector/:detectorId/coverage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "nextToken": "",\n "maxResults": 0,\n "filterCriteria": {\n "FilterCriterion": ""\n },\n "sortCriteria": {\n "AttributeName": "",\n "OrderBy": ""\n }\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/coverage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"nextToken": "",
"maxResults": 0,
"filterCriteria": ["FilterCriterion": ""],
"sortCriteria": [
"AttributeName": "",
"OrderBy": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/coverage")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListDetectors
{{baseUrl}}/detector
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector")
require "http/client"
url = "{{baseUrl}}/detector"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/detector'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/detector'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/detector'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector');
echo $response->getBody();
setUrl('{{baseUrl}}/detector');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector
http GET {{baseUrl}}/detector
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListFilters
{{baseUrl}}/detector/:detectorId/filter
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/filter");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/filter")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/filter"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/filter"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/filter");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/filter"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/filter HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/filter")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/filter"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/filter")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/filter');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/filter'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/filter';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/filter',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/filter',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/filter'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/filter');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/filter'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/filter';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/filter"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/filter" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/filter",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/filter');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/filter');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/filter');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/filter' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/filter' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/filter")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/filter"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/filter"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/filter') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/filter";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/filter
http GET {{baseUrl}}/detector/:detectorId/filter
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/filter
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/filter")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
ListFindings
{{baseUrl}}/detector/:detectorId/findings
QUERY PARAMS
detectorId
BODY json
{
"findingCriteria": {
"Criterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
},
"maxResults": 0,
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/findings");
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, "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/findings" {:content-type :json
:form-params {:findingCriteria {:Criterion ""}
:sortCriteria {:AttributeName ""
:OrderBy ""}
:maxResults 0
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/findings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/findings"),
Content = new StringContent("{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/findings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/findings"
payload := strings.NewReader("{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/findings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 156
{
"findingCriteria": {
"Criterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
},
"maxResults": 0,
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/findings")
.setHeader("content-type", "application/json")
.setBody("{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/findings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/findings")
.header("content-type", "application/json")
.body("{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
findingCriteria: {
Criterion: ''
},
sortCriteria: {
AttributeName: '',
OrderBy: ''
},
maxResults: 0,
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/findings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings',
headers: {'content-type': 'application/json'},
data: {
findingCriteria: {Criterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''},
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/findings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingCriteria":{"Criterion":""},"sortCriteria":{"AttributeName":"","OrderBy":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/findings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "findingCriteria": {\n "Criterion": ""\n },\n "sortCriteria": {\n "AttributeName": "",\n "OrderBy": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/findings',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
findingCriteria: {Criterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''},
maxResults: 0,
nextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings',
headers: {'content-type': 'application/json'},
body: {
findingCriteria: {Criterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''},
maxResults: 0,
nextToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/findings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
findingCriteria: {
Criterion: ''
},
sortCriteria: {
AttributeName: '',
OrderBy: ''
},
maxResults: 0,
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings',
headers: {'content-type': 'application/json'},
data: {
findingCriteria: {Criterion: ''},
sortCriteria: {AttributeName: '', OrderBy: ''},
maxResults: 0,
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/findings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingCriteria":{"Criterion":""},"sortCriteria":{"AttributeName":"","OrderBy":""},"maxResults":0,"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"findingCriteria": @{ @"Criterion": @"" },
@"sortCriteria": @{ @"AttributeName": @"", @"OrderBy": @"" },
@"maxResults": @0,
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/findings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/findings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/findings",
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([
'findingCriteria' => [
'Criterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
],
'maxResults' => 0,
'nextToken' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/findings', [
'body' => '{
"findingCriteria": {
"Criterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
},
"maxResults": 0,
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/findings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'findingCriteria' => [
'Criterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'findingCriteria' => [
'Criterion' => ''
],
'sortCriteria' => [
'AttributeName' => '',
'OrderBy' => ''
],
'maxResults' => 0,
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/findings');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/findings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingCriteria": {
"Criterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
},
"maxResults": 0,
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/findings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingCriteria": {
"Criterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
},
"maxResults": 0,
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/findings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/findings"
payload = {
"findingCriteria": { "Criterion": "" },
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
},
"maxResults": 0,
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/findings"
payload <- "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/findings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/findings') do |req|
req.body = "{\n \"findingCriteria\": {\n \"Criterion\": \"\"\n },\n \"sortCriteria\": {\n \"AttributeName\": \"\",\n \"OrderBy\": \"\"\n },\n \"maxResults\": 0,\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/findings";
let payload = json!({
"findingCriteria": json!({"Criterion": ""}),
"sortCriteria": json!({
"AttributeName": "",
"OrderBy": ""
}),
"maxResults": 0,
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/findings \
--header 'content-type: application/json' \
--data '{
"findingCriteria": {
"Criterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
},
"maxResults": 0,
"nextToken": ""
}'
echo '{
"findingCriteria": {
"Criterion": ""
},
"sortCriteria": {
"AttributeName": "",
"OrderBy": ""
},
"maxResults": 0,
"nextToken": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/findings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "findingCriteria": {\n "Criterion": ""\n },\n "sortCriteria": {\n "AttributeName": "",\n "OrderBy": ""\n },\n "maxResults": 0,\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/findings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"findingCriteria": ["Criterion": ""],
"sortCriteria": [
"AttributeName": "",
"OrderBy": ""
],
"maxResults": 0,
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/findings")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListIPSets
{{baseUrl}}/detector/:detectorId/ipset
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/ipset");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/ipset")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/ipset"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/ipset"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/ipset");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/ipset"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/ipset HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/ipset")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/ipset"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/ipset")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/ipset');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/ipset'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/ipset';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/ipset',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/ipset',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/ipset'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/ipset');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/ipset'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/ipset';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/ipset"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/ipset" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/ipset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/ipset');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/ipset');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/ipset');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/ipset' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/ipset' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/ipset")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/ipset"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/ipset"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/ipset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/ipset') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/ipset";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/ipset
http GET {{baseUrl}}/detector/:detectorId/ipset
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/ipset
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/ipset")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListInvitations
{{baseUrl}}/invitation
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/invitation");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/invitation")
require "http/client"
url = "{{baseUrl}}/invitation"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/invitation"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/invitation");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/invitation"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/invitation HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/invitation")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/invitation"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/invitation")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/invitation")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/invitation');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/invitation'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/invitation';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/invitation',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/invitation")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/invitation',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/invitation'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/invitation');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/invitation'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/invitation';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/invitation"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/invitation" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/invitation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/invitation');
echo $response->getBody();
setUrl('{{baseUrl}}/invitation');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/invitation');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/invitation' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/invitation' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/invitation")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/invitation"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/invitation"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/invitation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/invitation') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/invitation";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/invitation
http GET {{baseUrl}}/invitation
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/invitation
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/invitation")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListMembers
{{baseUrl}}/detector/:detectorId/member
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/member")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/member HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/member")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/member")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/member');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/member'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/member'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/member');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/detector/:detectorId/member'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/member');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/member');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/member")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/member') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/member
http GET {{baseUrl}}/detector/:detectorId/member
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/member
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListOrganizationAdminAccounts
{{baseUrl}}/admin
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/admin");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/admin")
require "http/client"
url = "{{baseUrl}}/admin"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/admin"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/admin");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/admin"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/admin HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/admin")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/admin"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/admin")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/admin")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/admin');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/admin'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/admin';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/admin',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/admin")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/admin',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/admin'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/admin');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/admin'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/admin';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/admin"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/admin" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/admin",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/admin');
echo $response->getBody();
setUrl('{{baseUrl}}/admin');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/admin');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/admin' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/admin' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/admin")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/admin"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/admin"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/admin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/admin') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/admin";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/admin
http GET {{baseUrl}}/admin
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/admin
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/admin")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListPublishingDestinations
{{baseUrl}}/detector/:detectorId/publishingDestination
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/publishingDestination");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/publishingDestination")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/publishingDestination"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/publishingDestination"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/publishingDestination");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/publishingDestination"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/publishingDestination HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/publishingDestination")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/publishingDestination"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/publishingDestination")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/publishingDestination');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/publishingDestination',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/publishingDestination',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/publishingDestination');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/publishingDestination"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/publishingDestination" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/publishingDestination",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/publishingDestination');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/publishingDestination');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/publishingDestination');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/publishingDestination")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/publishingDestination"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/publishingDestination"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/publishingDestination")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/publishingDestination') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/publishingDestination";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/publishingDestination
http GET {{baseUrl}}/detector/:detectorId/publishingDestination
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/publishingDestination
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/publishingDestination")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListTagsForResource
{{baseUrl}}/tags/:resourceArn
QUERY PARAMS
resourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:resourceArn");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tags/:resourceArn")
require "http/client"
url = "{{baseUrl}}/tags/:resourceArn"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tags/:resourceArn"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:resourceArn");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:resourceArn"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tags/:resourceArn HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tags/:resourceArn")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:resourceArn"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tags/:resourceArn")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/tags/:resourceArn');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/tags/:resourceArn'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:resourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags/:resourceArn',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:resourceArn',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/tags/:resourceArn'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tags/:resourceArn');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/tags/:resourceArn'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:resourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:resourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags/:resourceArn" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:resourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tags/:resourceArn');
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:resourceArn');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tags/:resourceArn');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:resourceArn' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:resourceArn' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tags/:resourceArn")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:resourceArn"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:resourceArn"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:resourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tags/:resourceArn') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:resourceArn";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/tags/:resourceArn
http GET {{baseUrl}}/tags/:resourceArn
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/tags/:resourceArn
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:resourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListThreatIntelSets
{{baseUrl}}/detector/:detectorId/threatintelset
QUERY PARAMS
detectorId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/threatintelset");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/detector/:detectorId/threatintelset")
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/threatintelset"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/threatintelset"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/threatintelset");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/threatintelset"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/detector/:detectorId/threatintelset HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/detector/:detectorId/threatintelset")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/threatintelset"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/detector/:detectorId/threatintelset")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/detector/:detectorId/threatintelset');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/threatintelset'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/threatintelset';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/threatintelset',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/threatintelset',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/threatintelset'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/detector/:detectorId/threatintelset');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/detector/:detectorId/threatintelset'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/threatintelset';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/threatintelset"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/threatintelset" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/threatintelset",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/detector/:detectorId/threatintelset');
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/threatintelset');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/detector/:detectorId/threatintelset');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/threatintelset' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/threatintelset' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/detector/:detectorId/threatintelset")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/threatintelset"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/threatintelset"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/threatintelset")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/detector/:detectorId/threatintelset') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/threatintelset";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/detector/:detectorId/threatintelset
http GET {{baseUrl}}/detector/:detectorId/threatintelset
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/detector/:detectorId/threatintelset
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/threatintelset")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
StartMonitoringMembers
{{baseUrl}}/detector/:detectorId/member/start
QUERY PARAMS
detectorId
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member/start");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member/start" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member/start"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member/start"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member/start");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member/start"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member/start HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member/start")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member/start"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/start")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member/start")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member/start');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/start',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member/start';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member/start',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/start")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member/start',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/start',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member/start');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/start',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member/start';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member/start"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member/start" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member/start",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member/start', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member/start');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member/start');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member/start' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member/start' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member/start", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member/start"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member/start"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member/start') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member/start";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member/start \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/member/start \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member/start
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member/start")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
StopMonitoringMembers
{{baseUrl}}/detector/:detectorId/member/stop
QUERY PARAMS
detectorId
BODY json
{
"accountIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member/stop");
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, "{\n \"accountIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member/stop" {:content-type :json
:form-params {:accountIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member/stop"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member/stop"),
Content = new StringContent("{\n \"accountIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member/stop");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member/stop"
payload := strings.NewReader("{\n \"accountIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member/stop HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"accountIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member/stop")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member/stop"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/stop")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member/stop")
.header("content-type", "application/json")
.body("{\n \"accountIds\": []\n}")
.asString();
const data = JSON.stringify({
accountIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member/stop');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/stop',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member/stop';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member/stop',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/stop")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member/stop',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accountIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/stop',
headers: {'content-type': 'application/json'},
body: {accountIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member/stop');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/stop',
headers: {'content-type': 'application/json'},
data: {accountIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member/stop';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member/stop"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member/stop" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member/stop",
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([
'accountIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member/stop', [
'body' => '{
"accountIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member/stop');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member/stop');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member/stop' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member/stop' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member/stop", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member/stop"
payload = { "accountIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member/stop"
payload <- "{\n \"accountIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member/stop') do |req|
req.body = "{\n \"accountIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member/stop";
let payload = json!({"accountIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member/stop \
--header 'content-type: application/json' \
--data '{
"accountIds": []
}'
echo '{
"accountIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/member/stop \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member/stop
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member/stop")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
TagResource
{{baseUrl}}/tags/:resourceArn
QUERY PARAMS
resourceArn
BODY json
{
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:resourceArn");
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, "{\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tags/:resourceArn" {:content-type :json
:form-params {:tags {}}})
require "http/client"
url = "{{baseUrl}}/tags/:resourceArn"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/tags/:resourceArn"),
Content = new StringContent("{\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:resourceArn");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:resourceArn"
payload := strings.NewReader("{\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/tags/:resourceArn HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tags/:resourceArn")
.setHeader("content-type", "application/json")
.setBody("{\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:resourceArn"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tags/:resourceArn")
.header("content-type", "application/json")
.body("{\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/tags/:resourceArn');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:resourceArn',
headers: {'content-type': 'application/json'},
data: {tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:resourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags/:resourceArn',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:resourceArn',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:resourceArn',
headers: {'content-type': 'application/json'},
body: {tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/tags/:resourceArn');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/tags/:resourceArn',
headers: {'content-type': 'application/json'},
data: {tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:resourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:resourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags/:resourceArn" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:resourceArn",
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([
'tags' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/tags/:resourceArn', [
'body' => '{
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:resourceArn');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/tags/:resourceArn');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:resourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:resourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/tags/:resourceArn", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:resourceArn"
payload = { "tags": {} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:resourceArn"
payload <- "{\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:resourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/tags/:resourceArn') do |req|
req.body = "{\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:resourceArn";
let payload = json!({"tags": json!({})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/tags/:resourceArn \
--header 'content-type: application/json' \
--data '{
"tags": {}
}'
echo '{
"tags": {}
}' | \
http POST {{baseUrl}}/tags/:resourceArn \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/tags/:resourceArn
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["tags": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:resourceArn")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UnarchiveFindings
{{baseUrl}}/detector/:detectorId/findings/unarchive
QUERY PARAMS
detectorId
BODY json
{
"findingIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/findings/unarchive");
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, "{\n \"findingIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/findings/unarchive" {:content-type :json
:form-params {:findingIds []}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/findings/unarchive"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"findingIds\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/findings/unarchive"),
Content = new StringContent("{\n \"findingIds\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/findings/unarchive");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"findingIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/findings/unarchive"
payload := strings.NewReader("{\n \"findingIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/findings/unarchive HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"findingIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/findings/unarchive")
.setHeader("content-type", "application/json")
.setBody("{\n \"findingIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/findings/unarchive"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"findingIds\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"findingIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/unarchive")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/findings/unarchive")
.header("content-type", "application/json")
.body("{\n \"findingIds\": []\n}")
.asString();
const data = JSON.stringify({
findingIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/findings/unarchive');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/unarchive',
headers: {'content-type': 'application/json'},
data: {findingIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/findings/unarchive';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/findings/unarchive',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "findingIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"findingIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/unarchive")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/findings/unarchive',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({findingIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/unarchive',
headers: {'content-type': 'application/json'},
body: {findingIds: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/findings/unarchive');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
findingIds: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/unarchive',
headers: {'content-type': 'application/json'},
data: {findingIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/findings/unarchive';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"findingIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/findings/unarchive"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/findings/unarchive" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"findingIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/findings/unarchive",
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([
'findingIds' => [
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/findings/unarchive', [
'body' => '{
"findingIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/findings/unarchive');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'findingIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'findingIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/findings/unarchive');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/findings/unarchive' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/findings/unarchive' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"findingIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/findings/unarchive", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/findings/unarchive"
payload = { "findingIds": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/findings/unarchive"
payload <- "{\n \"findingIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/findings/unarchive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"findingIds\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/findings/unarchive') do |req|
req.body = "{\n \"findingIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/findings/unarchive";
let payload = json!({"findingIds": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/findings/unarchive \
--header 'content-type: application/json' \
--data '{
"findingIds": []
}'
echo '{
"findingIds": []
}' | \
http POST {{baseUrl}}/detector/:detectorId/findings/unarchive \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "findingIds": []\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/findings/unarchive
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["findingIds": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/findings/unarchive")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
UntagResource
{{baseUrl}}/tags/:resourceArn#tagKeys
QUERY PARAMS
tagKeys
resourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/tags/:resourceArn#tagKeys" {:query-params {:tagKeys ""}})
require "http/client"
url = "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/tags/:resourceArn?tagKeys= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:resourceArn#tagKeys',
params: {tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags/:resourceArn?tagKeys=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:resourceArn#tagKeys',
qs: {tagKeys: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/tags/:resourceArn#tagKeys');
req.query({
tagKeys: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags/:resourceArn#tagKeys',
params: {tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys');
echo $response->getBody();
setUrl('{{baseUrl}}/tags/:resourceArn#tagKeys');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'tagKeys' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tags/:resourceArn#tagKeys');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'tagKeys' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/tags/:resourceArn?tagKeys=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags/:resourceArn#tagKeys"
querystring = {"tagKeys":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags/:resourceArn#tagKeys"
queryString <- list(tagKeys = "")
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/tags/:resourceArn') do |req|
req.params['tagKeys'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags/:resourceArn#tagKeys";
let querystring = [
("tagKeys", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys'
http DELETE '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys'
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags/:resourceArn?tagKeys=#tagKeys")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateDetector
{{baseUrl}}/detector/:detectorId
QUERY PARAMS
detectorId
BODY json
{
"enable": false,
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId");
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, "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId" {:content-type :json
:form-params {:enable false
:findingPublishingFrequency ""
:dataSources {:S3Logs ""
:Kubernetes ""
:MalwareProtection ""}
:features [{:Name ""
:Status ""
:AdditionalConfiguration ""}]}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId"),
Content = new StringContent("{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId"
payload := strings.NewReader("{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 256
{
"enable": false,
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId")
.setHeader("content-type", "application/json")
.setBody("{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId")
.header("content-type", "application/json")
.body("{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
enable: false,
findingPublishingFrequency: '',
dataSources: {
S3Logs: '',
Kubernetes: '',
MalwareProtection: ''
},
features: [
{
Name: '',
Status: '',
AdditionalConfiguration: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId',
headers: {'content-type': 'application/json'},
data: {
enable: false,
findingPublishingFrequency: '',
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"enable":false,"findingPublishingFrequency":"","dataSources":{"S3Logs":"","Kubernetes":"","MalwareProtection":""},"features":[{"Name":"","Status":"","AdditionalConfiguration":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "enable": false,\n "findingPublishingFrequency": "",\n "dataSources": {\n "S3Logs": "",\n "Kubernetes": "",\n "MalwareProtection": ""\n },\n "features": [\n {\n "Name": "",\n "Status": "",\n "AdditionalConfiguration": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
enable: false,
findingPublishingFrequency: '',
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId',
headers: {'content-type': 'application/json'},
body: {
enable: false,
findingPublishingFrequency: '',
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
enable: false,
findingPublishingFrequency: '',
dataSources: {
S3Logs: '',
Kubernetes: '',
MalwareProtection: ''
},
features: [
{
Name: '',
Status: '',
AdditionalConfiguration: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId',
headers: {'content-type': 'application/json'},
data: {
enable: false,
findingPublishingFrequency: '',
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"enable":false,"findingPublishingFrequency":"","dataSources":{"S3Logs":"","Kubernetes":"","MalwareProtection":""},"features":[{"Name":"","Status":"","AdditionalConfiguration":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"enable": @NO,
@"findingPublishingFrequency": @"",
@"dataSources": @{ @"S3Logs": @"", @"Kubernetes": @"", @"MalwareProtection": @"" },
@"features": @[ @{ @"Name": @"", @"Status": @"", @"AdditionalConfiguration": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId",
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([
'enable' => null,
'findingPublishingFrequency' => '',
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId', [
'body' => '{
"enable": false,
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'enable' => null,
'findingPublishingFrequency' => '',
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'enable' => null,
'findingPublishingFrequency' => '',
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"enable": false,
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"enable": false,
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId"
payload = {
"enable": False,
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId"
payload <- "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId') do |req|
req.body = "{\n \"enable\": false,\n \"findingPublishingFrequency\": \"\",\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId";
let payload = json!({
"enable": false,
"findingPublishingFrequency": "",
"dataSources": json!({
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
}),
"features": (
json!({
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId \
--header 'content-type: application/json' \
--data '{
"enable": false,
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
echo '{
"enable": false,
"findingPublishingFrequency": "",
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}' | \
http POST {{baseUrl}}/detector/:detectorId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "enable": false,\n "findingPublishingFrequency": "",\n "dataSources": {\n "S3Logs": "",\n "Kubernetes": "",\n "MalwareProtection": ""\n },\n "features": [\n {\n "Name": "",\n "Status": "",\n "AdditionalConfiguration": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"enable": false,
"findingPublishingFrequency": "",
"dataSources": [
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
],
"features": [
[
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateFilter
{{baseUrl}}/detector/:detectorId/filter/:filterName
QUERY PARAMS
detectorId
filterName
BODY json
{
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/filter/:filterName");
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, "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/filter/:filterName" {:content-type :json
:form-params {:description ""
:action ""
:rank 0
:findingCriteria {:Criterion ""}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/filter/:filterName"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/filter/:filterName"),
Content = new StringContent("{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/filter/:filterName");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/filter/:filterName"
payload := strings.NewReader("{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/filter/:filterName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 100
{
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/filter/:filterName")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/filter/:filterName"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
description: '',
action: '',
rank: 0,
findingCriteria: {
Criterion: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/filter/:filterName');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName',
headers: {'content-type': 'application/json'},
data: {description: '', action: '', rank: 0, findingCriteria: {Criterion: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/filter/:filterName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","action":"","rank":0,"findingCriteria":{"Criterion":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "action": "",\n "rank": 0,\n "findingCriteria": {\n "Criterion": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/filter/:filterName")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/filter/:filterName',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', action: '', rank: 0, findingCriteria: {Criterion: ''}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName',
headers: {'content-type': 'application/json'},
body: {description: '', action: '', rank: 0, findingCriteria: {Criterion: ''}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/filter/:filterName');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
action: '',
rank: 0,
findingCriteria: {
Criterion: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/filter/:filterName',
headers: {'content-type': 'application/json'},
data: {description: '', action: '', rank: 0, findingCriteria: {Criterion: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/filter/:filterName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","action":"","rank":0,"findingCriteria":{"Criterion":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"action": @"",
@"rank": @0,
@"findingCriteria": @{ @"Criterion": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/filter/:filterName"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/filter/:filterName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/filter/:filterName",
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([
'description' => '',
'action' => '',
'rank' => 0,
'findingCriteria' => [
'Criterion' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/filter/:filterName', [
'body' => '{
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/filter/:filterName');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'action' => '',
'rank' => 0,
'findingCriteria' => [
'Criterion' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'action' => '',
'rank' => 0,
'findingCriteria' => [
'Criterion' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/filter/:filterName');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/filter/:filterName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/filter/:filterName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/filter/:filterName", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/filter/:filterName"
payload = {
"description": "",
"action": "",
"rank": 0,
"findingCriteria": { "Criterion": "" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/filter/:filterName"
payload <- "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/filter/:filterName")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/filter/:filterName') do |req|
req.body = "{\n \"description\": \"\",\n \"action\": \"\",\n \"rank\": 0,\n \"findingCriteria\": {\n \"Criterion\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/filter/:filterName";
let payload = json!({
"description": "",
"action": "",
"rank": 0,
"findingCriteria": json!({"Criterion": ""})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/filter/:filterName \
--header 'content-type: application/json' \
--data '{
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
}
}'
echo '{
"description": "",
"action": "",
"rank": 0,
"findingCriteria": {
"Criterion": ""
}
}' | \
http POST {{baseUrl}}/detector/:detectorId/filter/:filterName \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "action": "",\n "rank": 0,\n "findingCriteria": {\n "Criterion": ""\n }\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/filter/:filterName
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"action": "",
"rank": 0,
"findingCriteria": ["Criterion": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/filter/:filterName")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateFindingsFeedback
{{baseUrl}}/detector/:detectorId/findings/feedback
QUERY PARAMS
detectorId
BODY json
{
"findingIds": [],
"feedback": "",
"comments": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/findings/feedback");
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, "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/findings/feedback" {:content-type :json
:form-params {:findingIds []
:feedback ""
:comments ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/findings/feedback"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/findings/feedback"),
Content = new StringContent("{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/findings/feedback");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/findings/feedback"
payload := strings.NewReader("{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/findings/feedback HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"findingIds": [],
"feedback": "",
"comments": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/findings/feedback")
.setHeader("content-type", "application/json")
.setBody("{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/findings/feedback"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/feedback")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/findings/feedback")
.header("content-type", "application/json")
.body("{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}")
.asString();
const data = JSON.stringify({
findingIds: [],
feedback: '',
comments: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/findings/feedback');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/feedback',
headers: {'content-type': 'application/json'},
data: {findingIds: [], feedback: '', comments: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/findings/feedback';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingIds":[],"feedback":"","comments":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/findings/feedback',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "findingIds": [],\n "feedback": "",\n "comments": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/findings/feedback")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/findings/feedback',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({findingIds: [], feedback: '', comments: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/feedback',
headers: {'content-type': 'application/json'},
body: {findingIds: [], feedback: '', comments: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/findings/feedback');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
findingIds: [],
feedback: '',
comments: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/findings/feedback',
headers: {'content-type': 'application/json'},
data: {findingIds: [], feedback: '', comments: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/findings/feedback';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"findingIds":[],"feedback":"","comments":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"findingIds": @[ ],
@"feedback": @"",
@"comments": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/findings/feedback"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/findings/feedback" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/findings/feedback",
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([
'findingIds' => [
],
'feedback' => '',
'comments' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/findings/feedback', [
'body' => '{
"findingIds": [],
"feedback": "",
"comments": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/findings/feedback');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'findingIds' => [
],
'feedback' => '',
'comments' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'findingIds' => [
],
'feedback' => '',
'comments' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/findings/feedback');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/findings/feedback' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingIds": [],
"feedback": "",
"comments": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/findings/feedback' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"findingIds": [],
"feedback": "",
"comments": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/findings/feedback", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/findings/feedback"
payload = {
"findingIds": [],
"feedback": "",
"comments": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/findings/feedback"
payload <- "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/findings/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/findings/feedback') do |req|
req.body = "{\n \"findingIds\": [],\n \"feedback\": \"\",\n \"comments\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/findings/feedback";
let payload = json!({
"findingIds": (),
"feedback": "",
"comments": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/findings/feedback \
--header 'content-type: application/json' \
--data '{
"findingIds": [],
"feedback": "",
"comments": ""
}'
echo '{
"findingIds": [],
"feedback": "",
"comments": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/findings/feedback \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "findingIds": [],\n "feedback": "",\n "comments": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/findings/feedback
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"findingIds": [],
"feedback": "",
"comments": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/findings/feedback")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateIPSet
{{baseUrl}}/detector/:detectorId/ipset/:ipSetId
QUERY PARAMS
detectorId
ipSetId
BODY json
{
"name": "",
"location": "",
"activate": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId");
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, "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId" {:content-type :json
:form-params {:name ""
:location ""
:activate false}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"),
Content = new StringContent("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
payload := strings.NewReader("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/ipset/:ipSetId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 55
{
"name": "",
"location": "",
"activate": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
.asString();
const data = JSON.stringify({
name: '',
location: '',
activate: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId',
headers: {'content-type': 'application/json'},
data: {name: '', location: '', activate: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","location":"","activate":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "location": "",\n "activate": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/ipset/:ipSetId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({name: '', location: '', activate: false}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId',
headers: {'content-type': 'application/json'},
body: {name: '', location: '', activate: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
location: '',
activate: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId',
headers: {'content-type': 'application/json'},
data: {name: '', location: '', activate: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","location":"","activate":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"location": @"",
@"activate": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/ipset/:ipSetId",
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([
'name' => '',
'location' => '',
'activate' => null
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId', [
'body' => '{
"name": "",
"location": "",
"activate": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'location' => '',
'activate' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'location' => '',
'activate' => null
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/ipset/:ipSetId');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"location": "",
"activate": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/ipset/:ipSetId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"location": "",
"activate": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/ipset/:ipSetId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
payload = {
"name": "",
"location": "",
"activate": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId"
payload <- "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/ipset/:ipSetId') do |req|
req.body = "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId";
let payload = json!({
"name": "",
"location": "",
"activate": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/ipset/:ipSetId \
--header 'content-type: application/json' \
--data '{
"name": "",
"location": "",
"activate": false
}'
echo '{
"name": "",
"location": "",
"activate": false
}' | \
http POST {{baseUrl}}/detector/:detectorId/ipset/:ipSetId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "location": "",\n "activate": false\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/ipset/:ipSetId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"location": "",
"activate": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/ipset/:ipSetId")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateMalwareScanSettings
{{baseUrl}}/detector/:detectorId/malware-scan-settings
QUERY PARAMS
detectorId
BODY json
{
"scanResourceCriteria": {
"Include": "",
"Exclude": ""
},
"ebsSnapshotPreservation": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/malware-scan-settings");
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, "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/malware-scan-settings" {:content-type :json
:form-params {:scanResourceCriteria {:Include ""
:Exclude ""}
:ebsSnapshotPreservation ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/malware-scan-settings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/malware-scan-settings"),
Content = new StringContent("{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/malware-scan-settings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/malware-scan-settings"
payload := strings.NewReader("{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/malware-scan-settings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 105
{
"scanResourceCriteria": {
"Include": "",
"Exclude": ""
},
"ebsSnapshotPreservation": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/malware-scan-settings")
.setHeader("content-type", "application/json")
.setBody("{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/malware-scan-settings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/malware-scan-settings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/malware-scan-settings")
.header("content-type", "application/json")
.body("{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}")
.asString();
const data = JSON.stringify({
scanResourceCriteria: {
Include: '',
Exclude: ''
},
ebsSnapshotPreservation: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/malware-scan-settings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/malware-scan-settings',
headers: {'content-type': 'application/json'},
data: {scanResourceCriteria: {Include: '', Exclude: ''}, ebsSnapshotPreservation: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/malware-scan-settings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"scanResourceCriteria":{"Include":"","Exclude":""},"ebsSnapshotPreservation":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/malware-scan-settings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "scanResourceCriteria": {\n "Include": "",\n "Exclude": ""\n },\n "ebsSnapshotPreservation": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/malware-scan-settings")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/malware-scan-settings',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({scanResourceCriteria: {Include: '', Exclude: ''}, ebsSnapshotPreservation: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/malware-scan-settings',
headers: {'content-type': 'application/json'},
body: {scanResourceCriteria: {Include: '', Exclude: ''}, ebsSnapshotPreservation: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/malware-scan-settings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
scanResourceCriteria: {
Include: '',
Exclude: ''
},
ebsSnapshotPreservation: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/malware-scan-settings',
headers: {'content-type': 'application/json'},
data: {scanResourceCriteria: {Include: '', Exclude: ''}, ebsSnapshotPreservation: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/malware-scan-settings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"scanResourceCriteria":{"Include":"","Exclude":""},"ebsSnapshotPreservation":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"scanResourceCriteria": @{ @"Include": @"", @"Exclude": @"" },
@"ebsSnapshotPreservation": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/malware-scan-settings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/malware-scan-settings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/malware-scan-settings",
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([
'scanResourceCriteria' => [
'Include' => '',
'Exclude' => ''
],
'ebsSnapshotPreservation' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/malware-scan-settings', [
'body' => '{
"scanResourceCriteria": {
"Include": "",
"Exclude": ""
},
"ebsSnapshotPreservation": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/malware-scan-settings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'scanResourceCriteria' => [
'Include' => '',
'Exclude' => ''
],
'ebsSnapshotPreservation' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'scanResourceCriteria' => [
'Include' => '',
'Exclude' => ''
],
'ebsSnapshotPreservation' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/malware-scan-settings');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/malware-scan-settings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"scanResourceCriteria": {
"Include": "",
"Exclude": ""
},
"ebsSnapshotPreservation": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/malware-scan-settings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"scanResourceCriteria": {
"Include": "",
"Exclude": ""
},
"ebsSnapshotPreservation": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/malware-scan-settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/malware-scan-settings"
payload = {
"scanResourceCriteria": {
"Include": "",
"Exclude": ""
},
"ebsSnapshotPreservation": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/malware-scan-settings"
payload <- "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/malware-scan-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/malware-scan-settings') do |req|
req.body = "{\n \"scanResourceCriteria\": {\n \"Include\": \"\",\n \"Exclude\": \"\"\n },\n \"ebsSnapshotPreservation\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/malware-scan-settings";
let payload = json!({
"scanResourceCriteria": json!({
"Include": "",
"Exclude": ""
}),
"ebsSnapshotPreservation": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/malware-scan-settings \
--header 'content-type: application/json' \
--data '{
"scanResourceCriteria": {
"Include": "",
"Exclude": ""
},
"ebsSnapshotPreservation": ""
}'
echo '{
"scanResourceCriteria": {
"Include": "",
"Exclude": ""
},
"ebsSnapshotPreservation": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/malware-scan-settings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "scanResourceCriteria": {\n "Include": "",\n "Exclude": ""\n },\n "ebsSnapshotPreservation": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/malware-scan-settings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"scanResourceCriteria": [
"Include": "",
"Exclude": ""
],
"ebsSnapshotPreservation": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/malware-scan-settings")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateMemberDetectors
{{baseUrl}}/detector/:detectorId/member/detector/update
QUERY PARAMS
detectorId
BODY json
{
"accountIds": [],
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/member/detector/update");
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, "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/member/detector/update" {:content-type :json
:form-params {:accountIds []
:dataSources {:S3Logs ""
:Kubernetes ""
:MalwareProtection ""}
:features [{:Name ""
:Status ""
:AdditionalConfiguration ""}]}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/member/detector/update"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/member/detector/update"),
Content = new StringContent("{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/member/detector/update");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/member/detector/update"
payload := strings.NewReader("{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/member/detector/update HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 221
{
"accountIds": [],
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/member/detector/update")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/member/detector/update"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/detector/update")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/member/detector/update")
.header("content-type", "application/json")
.body("{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
accountIds: [],
dataSources: {
S3Logs: '',
Kubernetes: '',
MalwareProtection: ''
},
features: [
{
Name: '',
Status: '',
AdditionalConfiguration: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/member/detector/update');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/detector/update',
headers: {'content-type': 'application/json'},
data: {
accountIds: [],
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/member/detector/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[],"dataSources":{"S3Logs":"","Kubernetes":"","MalwareProtection":""},"features":[{"Name":"","Status":"","AdditionalConfiguration":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/member/detector/update',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIds": [],\n "dataSources": {\n "S3Logs": "",\n "Kubernetes": "",\n "MalwareProtection": ""\n },\n "features": [\n {\n "Name": "",\n "Status": "",\n "AdditionalConfiguration": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/member/detector/update")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/member/detector/update',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountIds: [],
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/detector/update',
headers: {'content-type': 'application/json'},
body: {
accountIds: [],
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/member/detector/update');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIds: [],
dataSources: {
S3Logs: '',
Kubernetes: '',
MalwareProtection: ''
},
features: [
{
Name: '',
Status: '',
AdditionalConfiguration: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/member/detector/update',
headers: {'content-type': 'application/json'},
data: {
accountIds: [],
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', Status: '', AdditionalConfiguration: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/member/detector/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIds":[],"dataSources":{"S3Logs":"","Kubernetes":"","MalwareProtection":""},"features":[{"Name":"","Status":"","AdditionalConfiguration":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountIds": @[ ],
@"dataSources": @{ @"S3Logs": @"", @"Kubernetes": @"", @"MalwareProtection": @"" },
@"features": @[ @{ @"Name": @"", @"Status": @"", @"AdditionalConfiguration": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/member/detector/update"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/member/detector/update" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/member/detector/update",
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([
'accountIds' => [
],
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/member/detector/update', [
'body' => '{
"accountIds": [],
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/member/detector/update');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIds' => [
],
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIds' => [
],
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'Status' => '',
'AdditionalConfiguration' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/member/detector/update');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/member/detector/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": [],
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/member/detector/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIds": [],
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/member/detector/update", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/member/detector/update"
payload = {
"accountIds": [],
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/member/detector/update"
payload <- "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/member/detector/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/member/detector/update') do |req|
req.body = "{\n \"accountIds\": [],\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"Status\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/member/detector/update";
let payload = json!({
"accountIds": (),
"dataSources": json!({
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
}),
"features": (
json!({
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/member/detector/update \
--header 'content-type: application/json' \
--data '{
"accountIds": [],
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}'
echo '{
"accountIds": [],
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
}
]
}' | \
http POST {{baseUrl}}/detector/:detectorId/member/detector/update \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIds": [],\n "dataSources": {\n "S3Logs": "",\n "Kubernetes": "",\n "MalwareProtection": ""\n },\n "features": [\n {\n "Name": "",\n "Status": "",\n "AdditionalConfiguration": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/member/detector/update
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountIds": [],
"dataSources": [
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
],
"features": [
[
"Name": "",
"Status": "",
"AdditionalConfiguration": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/member/detector/update")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateOrganizationConfiguration
{{baseUrl}}/detector/:detectorId/admin
QUERY PARAMS
detectorId
BODY json
{
"autoEnable": false,
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
}
],
"autoEnableOrganizationMembers": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/admin");
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, "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/admin" {:content-type :json
:form-params {:autoEnable false
:dataSources {:S3Logs ""
:Kubernetes ""
:MalwareProtection ""}
:features [{:Name ""
:AutoEnable ""
:AdditionalConfiguration ""}]
:autoEnableOrganizationMembers ""}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/admin"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/admin"),
Content = new StringContent("{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/admin");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/admin"
payload := strings.NewReader("{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/admin HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 267
{
"autoEnable": false,
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
}
],
"autoEnableOrganizationMembers": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/admin")
.setHeader("content-type", "application/json")
.setBody("{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/admin"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/admin")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/admin")
.header("content-type", "application/json")
.body("{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}")
.asString();
const data = JSON.stringify({
autoEnable: false,
dataSources: {
S3Logs: '',
Kubernetes: '',
MalwareProtection: ''
},
features: [
{
Name: '',
AutoEnable: '',
AdditionalConfiguration: ''
}
],
autoEnableOrganizationMembers: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/admin');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/admin',
headers: {'content-type': 'application/json'},
data: {
autoEnable: false,
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', AutoEnable: '', AdditionalConfiguration: ''}],
autoEnableOrganizationMembers: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/admin';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"autoEnable":false,"dataSources":{"S3Logs":"","Kubernetes":"","MalwareProtection":""},"features":[{"Name":"","AutoEnable":"","AdditionalConfiguration":""}],"autoEnableOrganizationMembers":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/admin',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "autoEnable": false,\n "dataSources": {\n "S3Logs": "",\n "Kubernetes": "",\n "MalwareProtection": ""\n },\n "features": [\n {\n "Name": "",\n "AutoEnable": "",\n "AdditionalConfiguration": ""\n }\n ],\n "autoEnableOrganizationMembers": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/admin")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/admin',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
autoEnable: false,
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', AutoEnable: '', AdditionalConfiguration: ''}],
autoEnableOrganizationMembers: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/admin',
headers: {'content-type': 'application/json'},
body: {
autoEnable: false,
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', AutoEnable: '', AdditionalConfiguration: ''}],
autoEnableOrganizationMembers: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/admin');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
autoEnable: false,
dataSources: {
S3Logs: '',
Kubernetes: '',
MalwareProtection: ''
},
features: [
{
Name: '',
AutoEnable: '',
AdditionalConfiguration: ''
}
],
autoEnableOrganizationMembers: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/admin',
headers: {'content-type': 'application/json'},
data: {
autoEnable: false,
dataSources: {S3Logs: '', Kubernetes: '', MalwareProtection: ''},
features: [{Name: '', AutoEnable: '', AdditionalConfiguration: ''}],
autoEnableOrganizationMembers: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/admin';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"autoEnable":false,"dataSources":{"S3Logs":"","Kubernetes":"","MalwareProtection":""},"features":[{"Name":"","AutoEnable":"","AdditionalConfiguration":""}],"autoEnableOrganizationMembers":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"autoEnable": @NO,
@"dataSources": @{ @"S3Logs": @"", @"Kubernetes": @"", @"MalwareProtection": @"" },
@"features": @[ @{ @"Name": @"", @"AutoEnable": @"", @"AdditionalConfiguration": @"" } ],
@"autoEnableOrganizationMembers": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/admin"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/admin" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/admin",
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([
'autoEnable' => null,
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'AutoEnable' => '',
'AdditionalConfiguration' => ''
]
],
'autoEnableOrganizationMembers' => ''
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/admin', [
'body' => '{
"autoEnable": false,
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
}
],
"autoEnableOrganizationMembers": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/admin');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'autoEnable' => null,
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'AutoEnable' => '',
'AdditionalConfiguration' => ''
]
],
'autoEnableOrganizationMembers' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'autoEnable' => null,
'dataSources' => [
'S3Logs' => '',
'Kubernetes' => '',
'MalwareProtection' => ''
],
'features' => [
[
'Name' => '',
'AutoEnable' => '',
'AdditionalConfiguration' => ''
]
],
'autoEnableOrganizationMembers' => ''
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/admin');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/admin' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"autoEnable": false,
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
}
],
"autoEnableOrganizationMembers": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/admin' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"autoEnable": false,
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
}
],
"autoEnableOrganizationMembers": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/admin", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/admin"
payload = {
"autoEnable": False,
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
}
],
"autoEnableOrganizationMembers": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/admin"
payload <- "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/admin")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/admin') do |req|
req.body = "{\n \"autoEnable\": false,\n \"dataSources\": {\n \"S3Logs\": \"\",\n \"Kubernetes\": \"\",\n \"MalwareProtection\": \"\"\n },\n \"features\": [\n {\n \"Name\": \"\",\n \"AutoEnable\": \"\",\n \"AdditionalConfiguration\": \"\"\n }\n ],\n \"autoEnableOrganizationMembers\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/admin";
let payload = json!({
"autoEnable": false,
"dataSources": json!({
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
}),
"features": (
json!({
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
})
),
"autoEnableOrganizationMembers": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/admin \
--header 'content-type: application/json' \
--data '{
"autoEnable": false,
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
}
],
"autoEnableOrganizationMembers": ""
}'
echo '{
"autoEnable": false,
"dataSources": {
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
},
"features": [
{
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
}
],
"autoEnableOrganizationMembers": ""
}' | \
http POST {{baseUrl}}/detector/:detectorId/admin \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "autoEnable": false,\n "dataSources": {\n "S3Logs": "",\n "Kubernetes": "",\n "MalwareProtection": ""\n },\n "features": [\n {\n "Name": "",\n "AutoEnable": "",\n "AdditionalConfiguration": ""\n }\n ],\n "autoEnableOrganizationMembers": ""\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/admin
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"autoEnable": false,
"dataSources": [
"S3Logs": "",
"Kubernetes": "",
"MalwareProtection": ""
],
"features": [
[
"Name": "",
"AutoEnable": "",
"AdditionalConfiguration": ""
]
],
"autoEnableOrganizationMembers": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/admin")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdatePublishingDestination
{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
QUERY PARAMS
detectorId
destinationId
BODY json
{
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId");
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, "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId" {:content-type :json
:form-params {:destinationProperties {:DestinationArn ""
:KmsKeyArn ""}}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"),
Content = new StringContent("{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
payload := strings.NewReader("{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/publishingDestination/:destinationId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.setHeader("content-type", "application/json")
.setBody("{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.header("content-type", "application/json")
.body("{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
destinationProperties: {
DestinationArn: '',
KmsKeyArn: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId',
headers: {'content-type': 'application/json'},
data: {destinationProperties: {DestinationArn: '', KmsKeyArn: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"destinationProperties":{"DestinationArn":"","KmsKeyArn":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "destinationProperties": {\n "DestinationArn": "",\n "KmsKeyArn": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/publishingDestination/:destinationId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({destinationProperties: {DestinationArn: '', KmsKeyArn: ''}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId',
headers: {'content-type': 'application/json'},
body: {destinationProperties: {DestinationArn: '', KmsKeyArn: ''}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
destinationProperties: {
DestinationArn: '',
KmsKeyArn: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId',
headers: {'content-type': 'application/json'},
data: {destinationProperties: {DestinationArn: '', KmsKeyArn: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"destinationProperties":{"DestinationArn":"","KmsKeyArn":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"destinationProperties": @{ @"DestinationArn": @"", @"KmsKeyArn": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId",
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([
'destinationProperties' => [
'DestinationArn' => '',
'KmsKeyArn' => ''
]
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId', [
'body' => '{
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'destinationProperties' => [
'DestinationArn' => '',
'KmsKeyArn' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'destinationProperties' => [
'DestinationArn' => '',
'KmsKeyArn' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/publishingDestination/:destinationId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
payload = { "destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId"
payload <- "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/publishingDestination/:destinationId') do |req|
req.body = "{\n \"destinationProperties\": {\n \"DestinationArn\": \"\",\n \"KmsKeyArn\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId";
let payload = json!({"destinationProperties": json!({
"DestinationArn": "",
"KmsKeyArn": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId \
--header 'content-type: application/json' \
--data '{
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
}
}'
echo '{
"destinationProperties": {
"DestinationArn": "",
"KmsKeyArn": ""
}
}' | \
http POST {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "destinationProperties": {\n "DestinationArn": "",\n "KmsKeyArn": ""\n }\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["destinationProperties": [
"DestinationArn": "",
"KmsKeyArn": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/publishingDestination/:destinationId")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateThreatIntelSet
{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
QUERY PARAMS
detectorId
threatIntelSetId
BODY json
{
"name": "",
"location": "",
"activate": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId");
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, "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId" {:content-type :json
:form-params {:name ""
:location ""
:activate false}})
require "http/client"
url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"),
Content = new StringContent("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
payload := strings.NewReader("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 55
{
"name": "",
"location": "",
"activate": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
.asString();
const data = JSON.stringify({
name: '',
location: '',
activate: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId',
headers: {'content-type': 'application/json'},
data: {name: '', location: '', activate: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","location":"","activate":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "location": "",\n "activate": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({name: '', location: '', activate: false}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId',
headers: {'content-type': 'application/json'},
body: {name: '', location: '', activate: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
location: '',
activate: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId',
headers: {'content-type': 'application/json'},
data: {name: '', location: '', activate: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","location":"","activate":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"location": @"",
@"activate": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId",
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([
'name' => '',
'location' => '',
'activate' => null
]),
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;
}
request('POST', '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId', [
'body' => '{
"name": "",
"location": "",
"activate": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'location' => '',
'activate' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'location' => '',
'activate' => null
]));
$request->setRequestUrl('{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"location": "",
"activate": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"location": "",
"activate": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
payload = {
"name": "",
"location": "",
"activate": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId"
payload <- "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/detector/:detectorId/threatintelset/:threatIntelSetId') do |req|
req.body = "{\n \"name\": \"\",\n \"location\": \"\",\n \"activate\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId";
let payload = json!({
"name": "",
"location": "",
"activate": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId \
--header 'content-type: application/json' \
--data '{
"name": "",
"location": "",
"activate": false
}'
echo '{
"name": "",
"location": "",
"activate": false
}' | \
http POST {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "location": "",\n "activate": false\n}' \
--output-document \
- {{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"location": "",
"activate": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/detector/:detectorId/threatintelset/:threatIntelSetId")! 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 as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()