AI Tasks REST
DELETE
deleteAITask
{{baseUrl}}/ai-tasks/:aiTaskId
QUERY PARAMS
aiTaskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/:aiTaskId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/ai-tasks/:aiTaskId")
require "http/client"
url = "{{baseUrl}}/ai-tasks/:aiTaskId"
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}}/ai-tasks/:aiTaskId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ai-tasks/:aiTaskId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/:aiTaskId"
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/ai-tasks/:aiTaskId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/ai-tasks/:aiTaskId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/:aiTaskId"))
.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}}/ai-tasks/:aiTaskId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/ai-tasks/:aiTaskId")
.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}}/ai-tasks/:aiTaskId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/ai-tasks/:aiTaskId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/:aiTaskId';
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}}/ai-tasks/:aiTaskId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/:aiTaskId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/:aiTaskId',
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}}/ai-tasks/:aiTaskId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/ai-tasks/:aiTaskId');
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}}/ai-tasks/:aiTaskId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/:aiTaskId';
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}}/ai-tasks/:aiTaskId"]
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}}/ai-tasks/:aiTaskId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/:aiTaskId",
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}}/ai-tasks/:aiTaskId');
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/:aiTaskId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ai-tasks/:aiTaskId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ai-tasks/:aiTaskId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/:aiTaskId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/ai-tasks/:aiTaskId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/:aiTaskId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/:aiTaskId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/:aiTaskId")
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/ai-tasks/:aiTaskId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/:aiTaskId";
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}}/ai-tasks/:aiTaskId
http DELETE {{baseUrl}}/ai-tasks/:aiTaskId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/ai-tasks/:aiTaskId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/:aiTaskId")! 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()
GET
getAITask
{{baseUrl}}/ai-tasks/:aiTaskId
QUERY PARAMS
aiTaskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/:aiTaskId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/ai-tasks/:aiTaskId")
require "http/client"
url = "{{baseUrl}}/ai-tasks/:aiTaskId"
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}}/ai-tasks/:aiTaskId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ai-tasks/:aiTaskId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/:aiTaskId"
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/ai-tasks/:aiTaskId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/ai-tasks/:aiTaskId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/:aiTaskId"))
.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}}/ai-tasks/:aiTaskId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/ai-tasks/:aiTaskId")
.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}}/ai-tasks/:aiTaskId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/ai-tasks/:aiTaskId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/:aiTaskId';
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}}/ai-tasks/:aiTaskId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/:aiTaskId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/:aiTaskId',
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}}/ai-tasks/:aiTaskId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/ai-tasks/:aiTaskId');
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}}/ai-tasks/:aiTaskId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/:aiTaskId';
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}}/ai-tasks/:aiTaskId"]
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}}/ai-tasks/:aiTaskId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/:aiTaskId",
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}}/ai-tasks/:aiTaskId');
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/:aiTaskId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ai-tasks/:aiTaskId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ai-tasks/:aiTaskId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/:aiTaskId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/ai-tasks/:aiTaskId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/:aiTaskId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/:aiTaskId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/:aiTaskId")
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/ai-tasks/:aiTaskId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/:aiTaskId";
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}}/ai-tasks/:aiTaskId
http GET {{baseUrl}}/ai-tasks/:aiTaskId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/ai-tasks/:aiTaskId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/:aiTaskId")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"externalReferenceCode": "AB-34098-789-N"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"externalReferenceCode": "AB-34098-789-N"
}
GET
getAITaskByExternalReferenceCode
{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode
QUERY PARAMS
externalReferenceCode
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
require "http/client"
url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"
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/ai-tasks/by-external-reference-code/:externalReferenceCode HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"))
.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}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
.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}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode';
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/by-external-reference-code/:externalReferenceCode',
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode';
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode"]
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode",
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/ai-tasks/by-external-reference-code/:externalReferenceCode")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
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/ai-tasks/by-external-reference-code/:externalReferenceCode') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode";
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode
http GET {{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"externalReferenceCode": "AB-34098-789-N"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"externalReferenceCode": "AB-34098-789-N"
}
GET
getAITaskExport
{{baseUrl}}/ai-tasks/:aiTaskId/export
QUERY PARAMS
aiTaskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/:aiTaskId/export");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/ai-tasks/:aiTaskId/export")
require "http/client"
url = "{{baseUrl}}/ai-tasks/:aiTaskId/export"
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}}/ai-tasks/:aiTaskId/export"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ai-tasks/:aiTaskId/export");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/:aiTaskId/export"
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/ai-tasks/:aiTaskId/export HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/ai-tasks/:aiTaskId/export")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/:aiTaskId/export"))
.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}}/ai-tasks/:aiTaskId/export")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/ai-tasks/:aiTaskId/export")
.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}}/ai-tasks/:aiTaskId/export');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/ai-tasks/:aiTaskId/export'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/:aiTaskId/export';
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}}/ai-tasks/:aiTaskId/export',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/:aiTaskId/export")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/:aiTaskId/export',
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}}/ai-tasks/:aiTaskId/export'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/ai-tasks/:aiTaskId/export');
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}}/ai-tasks/:aiTaskId/export'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/:aiTaskId/export';
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}}/ai-tasks/:aiTaskId/export"]
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}}/ai-tasks/:aiTaskId/export" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/:aiTaskId/export",
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}}/ai-tasks/:aiTaskId/export');
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/:aiTaskId/export');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ai-tasks/:aiTaskId/export');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ai-tasks/:aiTaskId/export' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/:aiTaskId/export' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/ai-tasks/:aiTaskId/export")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/:aiTaskId/export"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/:aiTaskId/export"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/:aiTaskId/export")
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/ai-tasks/:aiTaskId/export') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/:aiTaskId/export";
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}}/ai-tasks/:aiTaskId/export
http GET {{baseUrl}}/ai-tasks/:aiTaskId/export
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/ai-tasks/:aiTaskId/export
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/:aiTaskId/export")! 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
getAITasksPage
{{baseUrl}}/ai-tasks
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/ai-tasks")
require "http/client"
url = "{{baseUrl}}/ai-tasks"
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}}/ai-tasks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ai-tasks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks"
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/ai-tasks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/ai-tasks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks"))
.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}}/ai-tasks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/ai-tasks")
.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}}/ai-tasks');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/ai-tasks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks';
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}}/ai-tasks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks',
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}}/ai-tasks'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/ai-tasks');
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}}/ai-tasks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks';
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}}/ai-tasks"]
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}}/ai-tasks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks",
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}}/ai-tasks');
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ai-tasks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ai-tasks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/ai-tasks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks")
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/ai-tasks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks";
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}}/ai-tasks
http GET {{baseUrl}}/ai-tasks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/ai-tasks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"externalReferenceCode": "AB-34098-789-N"
}
]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[
{
"externalReferenceCode": "AB-34098-789-N"
}
]
PATCH
patchAITask
{{baseUrl}}/ai-tasks/:aiTaskId
QUERY PARAMS
aiTaskId
BODY json
{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/:aiTaskId");
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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/ai-tasks/:aiTaskId" {:content-type :json
:form-params {:actions {}
:configuration {:edges [{:id ""
:source ""
:target ""
:uiConfiguration {}}]
:nodes [{:condition {:in {:field ""
:id ""
:value {}}
:allConditions []
:anyConditions []
:contains {:field ""
:id ""
:value {}}
:equals {:field ""
:id ""
:value {}}
:exists {:field ""
:id ""}
:not ""
:range {:field ""
:gt {}
:gte {}
:id ""
:lt {}
:lte {}}}
:id ""
:label ""
:parameters {}
:type ""
:uiConfiguration {}}]
:trace false}
:createDate ""
:description ""
:description_i18n {}
:enabled false
:externalReferenceCode ""
:id 0
:modifiedDate ""
:readOnly false
:schemaVersion ""
:title ""
:title_i18n {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/ai-tasks/:aiTaskId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/ai-tasks/:aiTaskId"),
Content = new StringContent("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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}}/ai-tasks/:aiTaskId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/:aiTaskId"
payload := strings.NewReader("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}
PATCH /baseUrl/ai-tasks/:aiTaskId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1277
{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/ai-tasks/:aiTaskId")
.setHeader("content-type", "application/json")
.setBody("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/:aiTaskId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ai-tasks/:aiTaskId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/ai-tasks/:aiTaskId")
.header("content-type", "application/json")
.body("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
actions: {},
configuration: {
edges: [
{
id: '',
source: '',
target: '',
uiConfiguration: {}
}
],
nodes: [
{
condition: {
in: {
field: '',
id: '',
value: {}
},
allConditions: [],
anyConditions: [],
contains: {
field: '',
id: '',
value: {}
},
equals: {
field: '',
id: '',
value: {}
},
exists: {
field: '',
id: ''
},
not: '',
range: {
field: '',
gt: {},
gte: {},
id: '',
lt: {},
lte: {}
}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/ai-tasks/:aiTaskId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/ai-tasks/:aiTaskId',
headers: {'content-type': 'application/json'},
data: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/:aiTaskId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"actions":{},"configuration":{"edges":[{"id":"","source":"","target":"","uiConfiguration":{}}],"nodes":[{"condition":{"in":{"field":"","id":"","value":{}},"allConditions":[],"anyConditions":[],"contains":{"field":"","id":"","value":{}},"equals":{"field":"","id":"","value":{}},"exists":{"field":"","id":""},"not":"","range":{"field":"","gt":{},"gte":{},"id":"","lt":{},"lte":{}}},"id":"","label":"","parameters":{},"type":"","uiConfiguration":{}}],"trace":false},"createDate":"","description":"","description_i18n":{},"enabled":false,"externalReferenceCode":"","id":0,"modifiedDate":"","readOnly":false,"schemaVersion":"","title":"","title_i18n":{},"version":""}'
};
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}}/ai-tasks/:aiTaskId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actions": {},\n "configuration": {\n "edges": [\n {\n "id": "",\n "source": "",\n "target": "",\n "uiConfiguration": {}\n }\n ],\n "nodes": [\n {\n "condition": {\n "in": {\n "field": "",\n "id": "",\n "value": {}\n },\n "allConditions": [],\n "anyConditions": [],\n "contains": {\n "field": "",\n "id": "",\n "value": {}\n },\n "equals": {\n "field": "",\n "id": "",\n "value": {}\n },\n "exists": {\n "field": "",\n "id": ""\n },\n "not": "",\n "range": {\n "field": "",\n "gt": {},\n "gte": {},\n "id": "",\n "lt": {},\n "lte": {}\n }\n },\n "id": "",\n "label": "",\n "parameters": {},\n "type": "",\n "uiConfiguration": {}\n }\n ],\n "trace": false\n },\n "createDate": "",\n "description": "",\n "description_i18n": {},\n "enabled": false,\n "externalReferenceCode": "",\n "id": 0,\n "modifiedDate": "",\n "readOnly": false,\n "schemaVersion": "",\n "title": "",\n "title_i18n": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/:aiTaskId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/:aiTaskId',
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({
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/ai-tasks/:aiTaskId',
headers: {'content-type': 'application/json'},
body: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/ai-tasks/:aiTaskId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actions: {},
configuration: {
edges: [
{
id: '',
source: '',
target: '',
uiConfiguration: {}
}
],
nodes: [
{
condition: {
in: {
field: '',
id: '',
value: {}
},
allConditions: [],
anyConditions: [],
contains: {
field: '',
id: '',
value: {}
},
equals: {
field: '',
id: '',
value: {}
},
exists: {
field: '',
id: ''
},
not: '',
range: {
field: '',
gt: {},
gte: {},
id: '',
lt: {},
lte: {}
}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/ai-tasks/:aiTaskId',
headers: {'content-type': 'application/json'},
data: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/:aiTaskId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"actions":{},"configuration":{"edges":[{"id":"","source":"","target":"","uiConfiguration":{}}],"nodes":[{"condition":{"in":{"field":"","id":"","value":{}},"allConditions":[],"anyConditions":[],"contains":{"field":"","id":"","value":{}},"equals":{"field":"","id":"","value":{}},"exists":{"field":"","id":""},"not":"","range":{"field":"","gt":{},"gte":{},"id":"","lt":{},"lte":{}}},"id":"","label":"","parameters":{},"type":"","uiConfiguration":{}}],"trace":false},"createDate":"","description":"","description_i18n":{},"enabled":false,"externalReferenceCode":"","id":0,"modifiedDate":"","readOnly":false,"schemaVersion":"","title":"","title_i18n":{},"version":""}'
};
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 = @{ @"actions": @{ },
@"configuration": @{ @"edges": @[ @{ @"id": @"", @"source": @"", @"target": @"", @"uiConfiguration": @{ } } ], @"nodes": @[ @{ @"condition": @{ @"in": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"allConditions": @[ ], @"anyConditions": @[ ], @"contains": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"equals": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"exists": @{ @"field": @"", @"id": @"" }, @"not": @"", @"range": @{ @"field": @"", @"gt": @{ }, @"gte": @{ }, @"id": @"", @"lt": @{ }, @"lte": @{ } } }, @"id": @"", @"label": @"", @"parameters": @{ }, @"type": @"", @"uiConfiguration": @{ } } ], @"trace": @NO },
@"createDate": @"",
@"description": @"",
@"description_i18n": @{ },
@"enabled": @NO,
@"externalReferenceCode": @"",
@"id": @0,
@"modifiedDate": @"",
@"readOnly": @NO,
@"schemaVersion": @"",
@"title": @"",
@"title_i18n": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ai-tasks/:aiTaskId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/ai-tasks/:aiTaskId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/:aiTaskId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]),
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('PATCH', '{{baseUrl}}/ai-tasks/:aiTaskId', [
'body' => '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/:aiTaskId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ai-tasks/:aiTaskId');
$request->setRequestMethod('PATCH');
$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}}/ai-tasks/:aiTaskId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/:aiTaskId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/ai-tasks/:aiTaskId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/:aiTaskId"
payload = {
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": False
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": False,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": False,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/:aiTaskId"
payload <- "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/:aiTaskId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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.patch('/baseUrl/ai-tasks/:aiTaskId') do |req|
req.body = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/:aiTaskId";
let payload = json!({
"actions": json!({}),
"configuration": json!({
"edges": (
json!({
"id": "",
"source": "",
"target": "",
"uiConfiguration": json!({})
})
),
"nodes": (
json!({
"condition": json!({
"in": json!({
"field": "",
"id": "",
"value": json!({})
}),
"allConditions": (),
"anyConditions": (),
"contains": json!({
"field": "",
"id": "",
"value": json!({})
}),
"equals": json!({
"field": "",
"id": "",
"value": json!({})
}),
"exists": json!({
"field": "",
"id": ""
}),
"not": "",
"range": json!({
"field": "",
"gt": json!({}),
"gte": json!({}),
"id": "",
"lt": json!({}),
"lte": json!({})
})
}),
"id": "",
"label": "",
"parameters": json!({}),
"type": "",
"uiConfiguration": json!({})
})
),
"trace": false
}),
"createDate": "",
"description": "",
"description_i18n": json!({}),
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/ai-tasks/:aiTaskId \
--header 'content-type: application/json' \
--data '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
echo '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}' | \
http PATCH {{baseUrl}}/ai-tasks/:aiTaskId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "actions": {},\n "configuration": {\n "edges": [\n {\n "id": "",\n "source": "",\n "target": "",\n "uiConfiguration": {}\n }\n ],\n "nodes": [\n {\n "condition": {\n "in": {\n "field": "",\n "id": "",\n "value": {}\n },\n "allConditions": [],\n "anyConditions": [],\n "contains": {\n "field": "",\n "id": "",\n "value": {}\n },\n "equals": {\n "field": "",\n "id": "",\n "value": {}\n },\n "exists": {\n "field": "",\n "id": ""\n },\n "not": "",\n "range": {\n "field": "",\n "gt": {},\n "gte": {},\n "id": "",\n "lt": {},\n "lte": {}\n }\n },\n "id": "",\n "label": "",\n "parameters": {},\n "type": "",\n "uiConfiguration": {}\n }\n ],\n "trace": false\n },\n "createDate": "",\n "description": "",\n "description_i18n": {},\n "enabled": false,\n "externalReferenceCode": "",\n "id": 0,\n "modifiedDate": "",\n "readOnly": false,\n "schemaVersion": "",\n "title": "",\n "title_i18n": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/ai-tasks/:aiTaskId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actions": [],
"configuration": [
"edges": [
[
"id": "",
"source": "",
"target": "",
"uiConfiguration": []
]
],
"nodes": [
[
"condition": [
"in": [
"field": "",
"id": "",
"value": []
],
"allConditions": [],
"anyConditions": [],
"contains": [
"field": "",
"id": "",
"value": []
],
"equals": [
"field": "",
"id": "",
"value": []
],
"exists": [
"field": "",
"id": ""
],
"not": "",
"range": [
"field": "",
"gt": [],
"gte": [],
"id": "",
"lt": [],
"lte": []
]
],
"id": "",
"label": "",
"parameters": [],
"type": "",
"uiConfiguration": []
]
],
"trace": false
],
"createDate": "",
"description": "",
"description_i18n": [],
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/:aiTaskId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"externalReferenceCode": "AB-34098-789-N"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"externalReferenceCode": "AB-34098-789-N"
}
POST
postAITask
{{baseUrl}}/ai-tasks
BODY json
{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks");
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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ai-tasks" {:content-type :json
:form-params {:actions {}
:configuration {:edges [{:id ""
:source ""
:target ""
:uiConfiguration {}}]
:nodes [{:condition {:in {:field ""
:id ""
:value {}}
:allConditions []
:anyConditions []
:contains {:field ""
:id ""
:value {}}
:equals {:field ""
:id ""
:value {}}
:exists {:field ""
:id ""}
:not ""
:range {:field ""
:gt {}
:gte {}
:id ""
:lt {}
:lte {}}}
:id ""
:label ""
:parameters {}
:type ""
:uiConfiguration {}}]
:trace false}
:createDate ""
:description ""
:description_i18n {}
:enabled false
:externalReferenceCode ""
:id 0
:modifiedDate ""
:readOnly false
:schemaVersion ""
:title ""
:title_i18n {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/ai-tasks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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}}/ai-tasks"),
Content = new StringContent("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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}}/ai-tasks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks"
payload := strings.NewReader("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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/ai-tasks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1277
{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ai-tasks")
.setHeader("content-type", "application/json")
.setBody("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ai-tasks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ai-tasks")
.header("content-type", "application/json")
.body("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
actions: {},
configuration: {
edges: [
{
id: '',
source: '',
target: '',
uiConfiguration: {}
}
],
nodes: [
{
condition: {
in: {
field: '',
id: '',
value: {}
},
allConditions: [],
anyConditions: [],
contains: {
field: '',
id: '',
value: {}
},
equals: {
field: '',
id: '',
value: {}
},
exists: {
field: '',
id: ''
},
not: '',
range: {
field: '',
gt: {},
gte: {},
id: '',
lt: {},
lte: {}
}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/ai-tasks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ai-tasks',
headers: {'content-type': 'application/json'},
data: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actions":{},"configuration":{"edges":[{"id":"","source":"","target":"","uiConfiguration":{}}],"nodes":[{"condition":{"in":{"field":"","id":"","value":{}},"allConditions":[],"anyConditions":[],"contains":{"field":"","id":"","value":{}},"equals":{"field":"","id":"","value":{}},"exists":{"field":"","id":""},"not":"","range":{"field":"","gt":{},"gte":{},"id":"","lt":{},"lte":{}}},"id":"","label":"","parameters":{},"type":"","uiConfiguration":{}}],"trace":false},"createDate":"","description":"","description_i18n":{},"enabled":false,"externalReferenceCode":"","id":0,"modifiedDate":"","readOnly":false,"schemaVersion":"","title":"","title_i18n":{},"version":""}'
};
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}}/ai-tasks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actions": {},\n "configuration": {\n "edges": [\n {\n "id": "",\n "source": "",\n "target": "",\n "uiConfiguration": {}\n }\n ],\n "nodes": [\n {\n "condition": {\n "in": {\n "field": "",\n "id": "",\n "value": {}\n },\n "allConditions": [],\n "anyConditions": [],\n "contains": {\n "field": "",\n "id": "",\n "value": {}\n },\n "equals": {\n "field": "",\n "id": "",\n "value": {}\n },\n "exists": {\n "field": "",\n "id": ""\n },\n "not": "",\n "range": {\n "field": "",\n "gt": {},\n "gte": {},\n "id": "",\n "lt": {},\n "lte": {}\n }\n },\n "id": "",\n "label": "",\n "parameters": {},\n "type": "",\n "uiConfiguration": {}\n }\n ],\n "trace": false\n },\n "createDate": "",\n "description": "",\n "description_i18n": {},\n "enabled": false,\n "externalReferenceCode": "",\n "id": 0,\n "modifiedDate": "",\n "readOnly": false,\n "schemaVersion": "",\n "title": "",\n "title_i18n": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks")
.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/ai-tasks',
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({
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/ai-tasks',
headers: {'content-type': 'application/json'},
body: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
},
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}}/ai-tasks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actions: {},
configuration: {
edges: [
{
id: '',
source: '',
target: '',
uiConfiguration: {}
}
],
nodes: [
{
condition: {
in: {
field: '',
id: '',
value: {}
},
allConditions: [],
anyConditions: [],
contains: {
field: '',
id: '',
value: {}
},
equals: {
field: '',
id: '',
value: {}
},
exists: {
field: '',
id: ''
},
not: '',
range: {
field: '',
gt: {},
gte: {},
id: '',
lt: {},
lte: {}
}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
});
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}}/ai-tasks',
headers: {'content-type': 'application/json'},
data: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actions":{},"configuration":{"edges":[{"id":"","source":"","target":"","uiConfiguration":{}}],"nodes":[{"condition":{"in":{"field":"","id":"","value":{}},"allConditions":[],"anyConditions":[],"contains":{"field":"","id":"","value":{}},"equals":{"field":"","id":"","value":{}},"exists":{"field":"","id":""},"not":"","range":{"field":"","gt":{},"gte":{},"id":"","lt":{},"lte":{}}},"id":"","label":"","parameters":{},"type":"","uiConfiguration":{}}],"trace":false},"createDate":"","description":"","description_i18n":{},"enabled":false,"externalReferenceCode":"","id":0,"modifiedDate":"","readOnly":false,"schemaVersion":"","title":"","title_i18n":{},"version":""}'
};
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 = @{ @"actions": @{ },
@"configuration": @{ @"edges": @[ @{ @"id": @"", @"source": @"", @"target": @"", @"uiConfiguration": @{ } } ], @"nodes": @[ @{ @"condition": @{ @"in": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"allConditions": @[ ], @"anyConditions": @[ ], @"contains": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"equals": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"exists": @{ @"field": @"", @"id": @"" }, @"not": @"", @"range": @{ @"field": @"", @"gt": @{ }, @"gte": @{ }, @"id": @"", @"lt": @{ }, @"lte": @{ } } }, @"id": @"", @"label": @"", @"parameters": @{ }, @"type": @"", @"uiConfiguration": @{ } } ], @"trace": @NO },
@"createDate": @"",
@"description": @"",
@"description_i18n": @{ },
@"enabled": @NO,
@"externalReferenceCode": @"",
@"id": @0,
@"modifiedDate": @"",
@"readOnly": @NO,
@"schemaVersion": @"",
@"title": @"",
@"title_i18n": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ai-tasks"]
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}}/ai-tasks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks",
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([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]),
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}}/ai-tasks', [
'body' => '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ai-tasks');
$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}}/ai-tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/ai-tasks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks"
payload = {
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": False
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": False,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": False,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks"
payload <- "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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}}/ai-tasks")
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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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/ai-tasks') do |req|
req.body = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks";
let payload = json!({
"actions": json!({}),
"configuration": json!({
"edges": (
json!({
"id": "",
"source": "",
"target": "",
"uiConfiguration": json!({})
})
),
"nodes": (
json!({
"condition": json!({
"in": json!({
"field": "",
"id": "",
"value": json!({})
}),
"allConditions": (),
"anyConditions": (),
"contains": json!({
"field": "",
"id": "",
"value": json!({})
}),
"equals": json!({
"field": "",
"id": "",
"value": json!({})
}),
"exists": json!({
"field": "",
"id": ""
}),
"not": "",
"range": json!({
"field": "",
"gt": json!({}),
"gte": json!({}),
"id": "",
"lt": json!({}),
"lte": json!({})
})
}),
"id": "",
"label": "",
"parameters": json!({}),
"type": "",
"uiConfiguration": json!({})
})
),
"trace": false
}),
"createDate": "",
"description": "",
"description_i18n": json!({}),
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": json!({}),
"version": ""
});
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}}/ai-tasks \
--header 'content-type: application/json' \
--data '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
echo '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}' | \
http POST {{baseUrl}}/ai-tasks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "actions": {},\n "configuration": {\n "edges": [\n {\n "id": "",\n "source": "",\n "target": "",\n "uiConfiguration": {}\n }\n ],\n "nodes": [\n {\n "condition": {\n "in": {\n "field": "",\n "id": "",\n "value": {}\n },\n "allConditions": [],\n "anyConditions": [],\n "contains": {\n "field": "",\n "id": "",\n "value": {}\n },\n "equals": {\n "field": "",\n "id": "",\n "value": {}\n },\n "exists": {\n "field": "",\n "id": ""\n },\n "not": "",\n "range": {\n "field": "",\n "gt": {},\n "gte": {},\n "id": "",\n "lt": {},\n "lte": {}\n }\n },\n "id": "",\n "label": "",\n "parameters": {},\n "type": "",\n "uiConfiguration": {}\n }\n ],\n "trace": false\n },\n "createDate": "",\n "description": "",\n "description_i18n": {},\n "enabled": false,\n "externalReferenceCode": "",\n "id": 0,\n "modifiedDate": "",\n "readOnly": false,\n "schemaVersion": "",\n "title": "",\n "title_i18n": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/ai-tasks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actions": [],
"configuration": [
"edges": [
[
"id": "",
"source": "",
"target": "",
"uiConfiguration": []
]
],
"nodes": [
[
"condition": [
"in": [
"field": "",
"id": "",
"value": []
],
"allConditions": [],
"anyConditions": [],
"contains": [
"field": "",
"id": "",
"value": []
],
"equals": [
"field": "",
"id": "",
"value": []
],
"exists": [
"field": "",
"id": ""
],
"not": "",
"range": [
"field": "",
"gt": [],
"gte": [],
"id": "",
"lt": [],
"lte": []
]
],
"id": "",
"label": "",
"parameters": [],
"type": "",
"uiConfiguration": []
]
],
"trace": false
],
"createDate": "",
"description": "",
"description_i18n": [],
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"externalReferenceCode": "AB-34098-789-N"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"externalReferenceCode": "AB-34098-789-N"
}
POST
postAITaskByExternalReferenceCodeClear
{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory
QUERY PARAMS
externalReferenceCode
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory")
require "http/client"
url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory"
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory"
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/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory"))
.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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory")
.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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory';
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory',
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory');
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory';
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory"]
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory",
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory');
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory")
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/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory";
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory
http POST {{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode/clear-memory")! 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
postAITaskCopy
{{baseUrl}}/ai-tasks/:aiTaskId/copy
QUERY PARAMS
aiTaskId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/:aiTaskId/copy");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ai-tasks/:aiTaskId/copy")
require "http/client"
url = "{{baseUrl}}/ai-tasks/:aiTaskId/copy"
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}}/ai-tasks/:aiTaskId/copy"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ai-tasks/:aiTaskId/copy");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/:aiTaskId/copy"
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/ai-tasks/:aiTaskId/copy HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ai-tasks/:aiTaskId/copy")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/:aiTaskId/copy"))
.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}}/ai-tasks/:aiTaskId/copy")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ai-tasks/:aiTaskId/copy")
.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}}/ai-tasks/:aiTaskId/copy');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/ai-tasks/:aiTaskId/copy'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/:aiTaskId/copy';
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}}/ai-tasks/:aiTaskId/copy',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/:aiTaskId/copy")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/:aiTaskId/copy',
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}}/ai-tasks/:aiTaskId/copy'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ai-tasks/:aiTaskId/copy');
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}}/ai-tasks/:aiTaskId/copy'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/:aiTaskId/copy';
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}}/ai-tasks/:aiTaskId/copy"]
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}}/ai-tasks/:aiTaskId/copy" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/:aiTaskId/copy",
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}}/ai-tasks/:aiTaskId/copy');
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/:aiTaskId/copy');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ai-tasks/:aiTaskId/copy');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ai-tasks/:aiTaskId/copy' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/:aiTaskId/copy' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/ai-tasks/:aiTaskId/copy")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/:aiTaskId/copy"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/:aiTaskId/copy"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/:aiTaskId/copy")
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/ai-tasks/:aiTaskId/copy') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/:aiTaskId/copy";
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}}/ai-tasks/:aiTaskId/copy
http POST {{baseUrl}}/ai-tasks/:aiTaskId/copy
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/ai-tasks/:aiTaskId/copy
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/:aiTaskId/copy")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"externalReferenceCode": "AB-34098-789-N"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"externalReferenceCode": "AB-34098-789-N"
}
POST
postAITaskValidate
{{baseUrl}}/ai-tasks/validate
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/validate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/ai-tasks/validate")
require "http/client"
url = "{{baseUrl}}/ai-tasks/validate"
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}}/ai-tasks/validate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/ai-tasks/validate");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/validate"
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/ai-tasks/validate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/ai-tasks/validate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/validate"))
.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}}/ai-tasks/validate")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/ai-tasks/validate")
.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}}/ai-tasks/validate');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/ai-tasks/validate'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/validate';
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}}/ai-tasks/validate',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/validate")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/validate',
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}}/ai-tasks/validate'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/ai-tasks/validate');
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}}/ai-tasks/validate'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/validate';
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}}/ai-tasks/validate"]
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}}/ai-tasks/validate" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/ai-tasks/validate');
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/validate');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/ai-tasks/validate');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/ai-tasks/validate' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/validate' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = ""
conn.request("POST", "/baseUrl/ai-tasks/validate", payload)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/validate"
payload = ""
response = requests.post(url, data=payload)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/validate"
payload <- ""
response <- VERB("POST", url, body = payload, content_type(""))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/validate")
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/ai-tasks/validate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/validate";
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}}/ai-tasks/validate
http POST {{baseUrl}}/ai-tasks/validate
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/ai-tasks/validate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/validate")! 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"externalReferenceCode": "AB-34098-789-N"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"externalReferenceCode": "AB-34098-789-N"
}
PUT
putAITask
{{baseUrl}}/ai-tasks/:aiTaskId
QUERY PARAMS
aiTaskId
BODY json
{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/:aiTaskId");
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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/ai-tasks/:aiTaskId" {:content-type :json
:form-params {:actions {}
:configuration {:edges [{:id ""
:source ""
:target ""
:uiConfiguration {}}]
:nodes [{:condition {:in {:field ""
:id ""
:value {}}
:allConditions []
:anyConditions []
:contains {:field ""
:id ""
:value {}}
:equals {:field ""
:id ""
:value {}}
:exists {:field ""
:id ""}
:not ""
:range {:field ""
:gt {}
:gte {}
:id ""
:lt {}
:lte {}}}
:id ""
:label ""
:parameters {}
:type ""
:uiConfiguration {}}]
:trace false}
:createDate ""
:description ""
:description_i18n {}
:enabled false
:externalReferenceCode ""
:id 0
:modifiedDate ""
:readOnly false
:schemaVersion ""
:title ""
:title_i18n {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/ai-tasks/:aiTaskId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/ai-tasks/:aiTaskId"),
Content = new StringContent("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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}}/ai-tasks/:aiTaskId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/:aiTaskId"
payload := strings.NewReader("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/ai-tasks/:aiTaskId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1277
{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/ai-tasks/:aiTaskId")
.setHeader("content-type", "application/json")
.setBody("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/:aiTaskId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ai-tasks/:aiTaskId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/ai-tasks/:aiTaskId")
.header("content-type", "application/json")
.body("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
actions: {},
configuration: {
edges: [
{
id: '',
source: '',
target: '',
uiConfiguration: {}
}
],
nodes: [
{
condition: {
in: {
field: '',
id: '',
value: {}
},
allConditions: [],
anyConditions: [],
contains: {
field: '',
id: '',
value: {}
},
equals: {
field: '',
id: '',
value: {}
},
exists: {
field: '',
id: ''
},
not: '',
range: {
field: '',
gt: {},
gte: {},
id: '',
lt: {},
lte: {}
}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/ai-tasks/:aiTaskId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/ai-tasks/:aiTaskId',
headers: {'content-type': 'application/json'},
data: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/:aiTaskId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"actions":{},"configuration":{"edges":[{"id":"","source":"","target":"","uiConfiguration":{}}],"nodes":[{"condition":{"in":{"field":"","id":"","value":{}},"allConditions":[],"anyConditions":[],"contains":{"field":"","id":"","value":{}},"equals":{"field":"","id":"","value":{}},"exists":{"field":"","id":""},"not":"","range":{"field":"","gt":{},"gte":{},"id":"","lt":{},"lte":{}}},"id":"","label":"","parameters":{},"type":"","uiConfiguration":{}}],"trace":false},"createDate":"","description":"","description_i18n":{},"enabled":false,"externalReferenceCode":"","id":0,"modifiedDate":"","readOnly":false,"schemaVersion":"","title":"","title_i18n":{},"version":""}'
};
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}}/ai-tasks/:aiTaskId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actions": {},\n "configuration": {\n "edges": [\n {\n "id": "",\n "source": "",\n "target": "",\n "uiConfiguration": {}\n }\n ],\n "nodes": [\n {\n "condition": {\n "in": {\n "field": "",\n "id": "",\n "value": {}\n },\n "allConditions": [],\n "anyConditions": [],\n "contains": {\n "field": "",\n "id": "",\n "value": {}\n },\n "equals": {\n "field": "",\n "id": "",\n "value": {}\n },\n "exists": {\n "field": "",\n "id": ""\n },\n "not": "",\n "range": {\n "field": "",\n "gt": {},\n "gte": {},\n "id": "",\n "lt": {},\n "lte": {}\n }\n },\n "id": "",\n "label": "",\n "parameters": {},\n "type": "",\n "uiConfiguration": {}\n }\n ],\n "trace": false\n },\n "createDate": "",\n "description": "",\n "description_i18n": {},\n "enabled": false,\n "externalReferenceCode": "",\n "id": 0,\n "modifiedDate": "",\n "readOnly": false,\n "schemaVersion": "",\n "title": "",\n "title_i18n": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/:aiTaskId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/:aiTaskId',
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({
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/ai-tasks/:aiTaskId',
headers: {'content-type': 'application/json'},
body: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/ai-tasks/:aiTaskId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actions: {},
configuration: {
edges: [
{
id: '',
source: '',
target: '',
uiConfiguration: {}
}
],
nodes: [
{
condition: {
in: {
field: '',
id: '',
value: {}
},
allConditions: [],
anyConditions: [],
contains: {
field: '',
id: '',
value: {}
},
equals: {
field: '',
id: '',
value: {}
},
exists: {
field: '',
id: ''
},
not: '',
range: {
field: '',
gt: {},
gte: {},
id: '',
lt: {},
lte: {}
}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/ai-tasks/:aiTaskId',
headers: {'content-type': 'application/json'},
data: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/:aiTaskId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"actions":{},"configuration":{"edges":[{"id":"","source":"","target":"","uiConfiguration":{}}],"nodes":[{"condition":{"in":{"field":"","id":"","value":{}},"allConditions":[],"anyConditions":[],"contains":{"field":"","id":"","value":{}},"equals":{"field":"","id":"","value":{}},"exists":{"field":"","id":""},"not":"","range":{"field":"","gt":{},"gte":{},"id":"","lt":{},"lte":{}}},"id":"","label":"","parameters":{},"type":"","uiConfiguration":{}}],"trace":false},"createDate":"","description":"","description_i18n":{},"enabled":false,"externalReferenceCode":"","id":0,"modifiedDate":"","readOnly":false,"schemaVersion":"","title":"","title_i18n":{},"version":""}'
};
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 = @{ @"actions": @{ },
@"configuration": @{ @"edges": @[ @{ @"id": @"", @"source": @"", @"target": @"", @"uiConfiguration": @{ } } ], @"nodes": @[ @{ @"condition": @{ @"in": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"allConditions": @[ ], @"anyConditions": @[ ], @"contains": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"equals": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"exists": @{ @"field": @"", @"id": @"" }, @"not": @"", @"range": @{ @"field": @"", @"gt": @{ }, @"gte": @{ }, @"id": @"", @"lt": @{ }, @"lte": @{ } } }, @"id": @"", @"label": @"", @"parameters": @{ }, @"type": @"", @"uiConfiguration": @{ } } ], @"trace": @NO },
@"createDate": @"",
@"description": @"",
@"description_i18n": @{ },
@"enabled": @NO,
@"externalReferenceCode": @"",
@"id": @0,
@"modifiedDate": @"",
@"readOnly": @NO,
@"schemaVersion": @"",
@"title": @"",
@"title_i18n": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ai-tasks/:aiTaskId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/ai-tasks/:aiTaskId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/:aiTaskId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]),
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('PUT', '{{baseUrl}}/ai-tasks/:aiTaskId', [
'body' => '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/:aiTaskId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ai-tasks/:aiTaskId');
$request->setRequestMethod('PUT');
$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}}/ai-tasks/:aiTaskId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/:aiTaskId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/ai-tasks/:aiTaskId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/:aiTaskId"
payload = {
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": False
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": False,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": False,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/:aiTaskId"
payload <- "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/:aiTaskId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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.put('/baseUrl/ai-tasks/:aiTaskId') do |req|
req.body = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/:aiTaskId";
let payload = json!({
"actions": json!({}),
"configuration": json!({
"edges": (
json!({
"id": "",
"source": "",
"target": "",
"uiConfiguration": json!({})
})
),
"nodes": (
json!({
"condition": json!({
"in": json!({
"field": "",
"id": "",
"value": json!({})
}),
"allConditions": (),
"anyConditions": (),
"contains": json!({
"field": "",
"id": "",
"value": json!({})
}),
"equals": json!({
"field": "",
"id": "",
"value": json!({})
}),
"exists": json!({
"field": "",
"id": ""
}),
"not": "",
"range": json!({
"field": "",
"gt": json!({}),
"gte": json!({}),
"id": "",
"lt": json!({}),
"lte": json!({})
})
}),
"id": "",
"label": "",
"parameters": json!({}),
"type": "",
"uiConfiguration": json!({})
})
),
"trace": false
}),
"createDate": "",
"description": "",
"description_i18n": json!({}),
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/ai-tasks/:aiTaskId \
--header 'content-type: application/json' \
--data '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
echo '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}' | \
http PUT {{baseUrl}}/ai-tasks/:aiTaskId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "actions": {},\n "configuration": {\n "edges": [\n {\n "id": "",\n "source": "",\n "target": "",\n "uiConfiguration": {}\n }\n ],\n "nodes": [\n {\n "condition": {\n "in": {\n "field": "",\n "id": "",\n "value": {}\n },\n "allConditions": [],\n "anyConditions": [],\n "contains": {\n "field": "",\n "id": "",\n "value": {}\n },\n "equals": {\n "field": "",\n "id": "",\n "value": {}\n },\n "exists": {\n "field": "",\n "id": ""\n },\n "not": "",\n "range": {\n "field": "",\n "gt": {},\n "gte": {},\n "id": "",\n "lt": {},\n "lte": {}\n }\n },\n "id": "",\n "label": "",\n "parameters": {},\n "type": "",\n "uiConfiguration": {}\n }\n ],\n "trace": false\n },\n "createDate": "",\n "description": "",\n "description_i18n": {},\n "enabled": false,\n "externalReferenceCode": "",\n "id": 0,\n "modifiedDate": "",\n "readOnly": false,\n "schemaVersion": "",\n "title": "",\n "title_i18n": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/ai-tasks/:aiTaskId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actions": [],
"configuration": [
"edges": [
[
"id": "",
"source": "",
"target": "",
"uiConfiguration": []
]
],
"nodes": [
[
"condition": [
"in": [
"field": "",
"id": "",
"value": []
],
"allConditions": [],
"anyConditions": [],
"contains": [
"field": "",
"id": "",
"value": []
],
"equals": [
"field": "",
"id": "",
"value": []
],
"exists": [
"field": "",
"id": ""
],
"not": "",
"range": [
"field": "",
"gt": [],
"gte": [],
"id": "",
"lt": [],
"lte": []
]
],
"id": "",
"label": "",
"parameters": [],
"type": "",
"uiConfiguration": []
]
],
"trace": false
],
"createDate": "",
"description": "",
"description_i18n": [],
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/:aiTaskId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"externalReferenceCode": "AB-34098-789-N"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"externalReferenceCode": "AB-34098-789-N"
}
PUT
putAITaskByExternalReferenceCode
{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode
QUERY PARAMS
externalReferenceCode
BODY json
{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode");
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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode" {:content-type :json
:form-params {:actions {}
:configuration {:edges [{:id ""
:source ""
:target ""
:uiConfiguration {}}]
:nodes [{:condition {:in {:field ""
:id ""
:value {}}
:allConditions []
:anyConditions []
:contains {:field ""
:id ""
:value {}}
:equals {:field ""
:id ""
:value {}}
:exists {:field ""
:id ""}
:not ""
:range {:field ""
:gt {}
:gte {}
:id ""
:lt {}
:lte {}}}
:id ""
:label ""
:parameters {}
:type ""
:uiConfiguration {}}]
:trace false}
:createDate ""
:description ""
:description_i18n {}
:enabled false
:externalReferenceCode ""
:id 0
:modifiedDate ""
:readOnly false
:schemaVersion ""
:title ""
:title_i18n {}
:version ""}})
require "http/client"
url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"),
Content = new StringContent("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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}}/ai-tasks/by-external-reference-code/:externalReferenceCode");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"
payload := strings.NewReader("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
req, _ := http.NewRequest("PUT", 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))
}
PUT /baseUrl/ai-tasks/by-external-reference-code/:externalReferenceCode HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1277
{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
.setHeader("content-type", "application/json")
.setBody("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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 \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
.header("content-type", "application/json")
.body("{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
.asString();
const data = JSON.stringify({
actions: {},
configuration: {
edges: [
{
id: '',
source: '',
target: '',
uiConfiguration: {}
}
],
nodes: [
{
condition: {
in: {
field: '',
id: '',
value: {}
},
allConditions: [],
anyConditions: [],
contains: {
field: '',
id: '',
value: {}
},
equals: {
field: '',
id: '',
value: {}
},
exists: {
field: '',
id: ''
},
not: '',
range: {
field: '',
gt: {},
gte: {},
id: '',
lt: {},
lte: {}
}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode',
headers: {'content-type': 'application/json'},
data: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"actions":{},"configuration":{"edges":[{"id":"","source":"","target":"","uiConfiguration":{}}],"nodes":[{"condition":{"in":{"field":"","id":"","value":{}},"allConditions":[],"anyConditions":[],"contains":{"field":"","id":"","value":{}},"equals":{"field":"","id":"","value":{}},"exists":{"field":"","id":""},"not":"","range":{"field":"","gt":{},"gte":{},"id":"","lt":{},"lte":{}}},"id":"","label":"","parameters":{},"type":"","uiConfiguration":{}}],"trace":false},"createDate":"","description":"","description_i18n":{},"enabled":false,"externalReferenceCode":"","id":0,"modifiedDate":"","readOnly":false,"schemaVersion":"","title":"","title_i18n":{},"version":""}'
};
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}}/ai-tasks/by-external-reference-code/:externalReferenceCode',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actions": {},\n "configuration": {\n "edges": [\n {\n "id": "",\n "source": "",\n "target": "",\n "uiConfiguration": {}\n }\n ],\n "nodes": [\n {\n "condition": {\n "in": {\n "field": "",\n "id": "",\n "value": {}\n },\n "allConditions": [],\n "anyConditions": [],\n "contains": {\n "field": "",\n "id": "",\n "value": {}\n },\n "equals": {\n "field": "",\n "id": "",\n "value": {}\n },\n "exists": {\n "field": "",\n "id": ""\n },\n "not": "",\n "range": {\n "field": "",\n "gt": {},\n "gte": {},\n "id": "",\n "lt": {},\n "lte": {}\n }\n },\n "id": "",\n "label": "",\n "parameters": {},\n "type": "",\n "uiConfiguration": {}\n }\n ],\n "trace": false\n },\n "createDate": "",\n "description": "",\n "description_i18n": {},\n "enabled": false,\n "externalReferenceCode": "",\n "id": 0,\n "modifiedDate": "",\n "readOnly": false,\n "schemaVersion": "",\n "title": "",\n "title_i18n": {},\n "version": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/ai-tasks/by-external-reference-code/:externalReferenceCode',
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({
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode',
headers: {'content-type': 'application/json'},
body: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actions: {},
configuration: {
edges: [
{
id: '',
source: '',
target: '',
uiConfiguration: {}
}
],
nodes: [
{
condition: {
in: {
field: '',
id: '',
value: {}
},
allConditions: [],
anyConditions: [],
contains: {
field: '',
id: '',
value: {}
},
equals: {
field: '',
id: '',
value: {}
},
exists: {
field: '',
id: ''
},
not: '',
range: {
field: '',
gt: {},
gte: {},
id: '',
lt: {},
lte: {}
}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode',
headers: {'content-type': 'application/json'},
data: {
actions: {},
configuration: {
edges: [{id: '', source: '', target: '', uiConfiguration: {}}],
nodes: [
{
condition: {
in: {field: '', id: '', value: {}},
allConditions: [],
anyConditions: [],
contains: {field: '', id: '', value: {}},
equals: {field: '', id: '', value: {}},
exists: {field: '', id: ''},
not: '',
range: {field: '', gt: {}, gte: {}, id: '', lt: {}, lte: {}}
},
id: '',
label: '',
parameters: {},
type: '',
uiConfiguration: {}
}
],
trace: false
},
createDate: '',
description: '',
description_i18n: {},
enabled: false,
externalReferenceCode: '',
id: 0,
modifiedDate: '',
readOnly: false,
schemaVersion: '',
title: '',
title_i18n: {},
version: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"actions":{},"configuration":{"edges":[{"id":"","source":"","target":"","uiConfiguration":{}}],"nodes":[{"condition":{"in":{"field":"","id":"","value":{}},"allConditions":[],"anyConditions":[],"contains":{"field":"","id":"","value":{}},"equals":{"field":"","id":"","value":{}},"exists":{"field":"","id":""},"not":"","range":{"field":"","gt":{},"gte":{},"id":"","lt":{},"lte":{}}},"id":"","label":"","parameters":{},"type":"","uiConfiguration":{}}],"trace":false},"createDate":"","description":"","description_i18n":{},"enabled":false,"externalReferenceCode":"","id":0,"modifiedDate":"","readOnly":false,"schemaVersion":"","title":"","title_i18n":{},"version":""}'
};
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 = @{ @"actions": @{ },
@"configuration": @{ @"edges": @[ @{ @"id": @"", @"source": @"", @"target": @"", @"uiConfiguration": @{ } } ], @"nodes": @[ @{ @"condition": @{ @"in": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"allConditions": @[ ], @"anyConditions": @[ ], @"contains": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"equals": @{ @"field": @"", @"id": @"", @"value": @{ } }, @"exists": @{ @"field": @"", @"id": @"" }, @"not": @"", @"range": @{ @"field": @"", @"gt": @{ }, @"gte": @{ }, @"id": @"", @"lt": @{ }, @"lte": @{ } } }, @"id": @"", @"label": @"", @"parameters": @{ }, @"type": @"", @"uiConfiguration": @{ } } ], @"trace": @NO },
@"createDate": @"",
@"description": @"",
@"description_i18n": @{ },
@"enabled": @NO,
@"externalReferenceCode": @"",
@"id": @0,
@"modifiedDate": @"",
@"readOnly": @NO,
@"schemaVersion": @"",
@"title": @"",
@"title_i18n": @{ },
@"version": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/ai-tasks/by-external-reference-code/:externalReferenceCode" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]),
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('PUT', '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode', [
'body' => '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actions' => [
],
'configuration' => [
'edges' => [
[
'id' => '',
'source' => '',
'target' => '',
'uiConfiguration' => [
]
]
],
'nodes' => [
[
'condition' => [
'in' => [
'field' => '',
'id' => '',
'value' => [
]
],
'allConditions' => [
],
'anyConditions' => [
],
'contains' => [
'field' => '',
'id' => '',
'value' => [
]
],
'equals' => [
'field' => '',
'id' => '',
'value' => [
]
],
'exists' => [
'field' => '',
'id' => ''
],
'not' => '',
'range' => [
'field' => '',
'gt' => [
],
'gte' => [
],
'id' => '',
'lt' => [
],
'lte' => [
]
]
],
'id' => '',
'label' => '',
'parameters' => [
],
'type' => '',
'uiConfiguration' => [
]
]
],
'trace' => null
],
'createDate' => '',
'description' => '',
'description_i18n' => [
],
'enabled' => null,
'externalReferenceCode' => '',
'id' => 0,
'modifiedDate' => '',
'readOnly' => null,
'schemaVersion' => '',
'title' => '',
'title_i18n' => [
],
'version' => ''
]));
$request->setRequestUrl('{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode');
$request->setRequestMethod('PUT');
$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}}/ai-tasks/by-external-reference-code/:externalReferenceCode' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/ai-tasks/by-external-reference-code/:externalReferenceCode", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"
payload = {
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": False
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": False,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": False,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode"
payload <- "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\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.put('/baseUrl/ai-tasks/by-external-reference-code/:externalReferenceCode') do |req|
req.body = "{\n \"actions\": {},\n \"configuration\": {\n \"edges\": [\n {\n \"id\": \"\",\n \"source\": \"\",\n \"target\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"nodes\": [\n {\n \"condition\": {\n \"in\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"allConditions\": [],\n \"anyConditions\": [],\n \"contains\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"equals\": {\n \"field\": \"\",\n \"id\": \"\",\n \"value\": {}\n },\n \"exists\": {\n \"field\": \"\",\n \"id\": \"\"\n },\n \"not\": \"\",\n \"range\": {\n \"field\": \"\",\n \"gt\": {},\n \"gte\": {},\n \"id\": \"\",\n \"lt\": {},\n \"lte\": {}\n }\n },\n \"id\": \"\",\n \"label\": \"\",\n \"parameters\": {},\n \"type\": \"\",\n \"uiConfiguration\": {}\n }\n ],\n \"trace\": false\n },\n \"createDate\": \"\",\n \"description\": \"\",\n \"description_i18n\": {},\n \"enabled\": false,\n \"externalReferenceCode\": \"\",\n \"id\": 0,\n \"modifiedDate\": \"\",\n \"readOnly\": false,\n \"schemaVersion\": \"\",\n \"title\": \"\",\n \"title_i18n\": {},\n \"version\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode";
let payload = json!({
"actions": json!({}),
"configuration": json!({
"edges": (
json!({
"id": "",
"source": "",
"target": "",
"uiConfiguration": json!({})
})
),
"nodes": (
json!({
"condition": json!({
"in": json!({
"field": "",
"id": "",
"value": json!({})
}),
"allConditions": (),
"anyConditions": (),
"contains": json!({
"field": "",
"id": "",
"value": json!({})
}),
"equals": json!({
"field": "",
"id": "",
"value": json!({})
}),
"exists": json!({
"field": "",
"id": ""
}),
"not": "",
"range": json!({
"field": "",
"gt": json!({}),
"gte": json!({}),
"id": "",
"lt": json!({}),
"lte": json!({})
})
}),
"id": "",
"label": "",
"parameters": json!({}),
"type": "",
"uiConfiguration": json!({})
})
),
"trace": false
}),
"createDate": "",
"description": "",
"description_i18n": json!({}),
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": json!({}),
"version": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode \
--header 'content-type: application/json' \
--data '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}'
echo '{
"actions": {},
"configuration": {
"edges": [
{
"id": "",
"source": "",
"target": "",
"uiConfiguration": {}
}
],
"nodes": [
{
"condition": {
"in": {
"field": "",
"id": "",
"value": {}
},
"allConditions": [],
"anyConditions": [],
"contains": {
"field": "",
"id": "",
"value": {}
},
"equals": {
"field": "",
"id": "",
"value": {}
},
"exists": {
"field": "",
"id": ""
},
"not": "",
"range": {
"field": "",
"gt": {},
"gte": {},
"id": "",
"lt": {},
"lte": {}
}
},
"id": "",
"label": "",
"parameters": {},
"type": "",
"uiConfiguration": {}
}
],
"trace": false
},
"createDate": "",
"description": "",
"description_i18n": {},
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": {},
"version": ""
}' | \
http PUT {{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "actions": {},\n "configuration": {\n "edges": [\n {\n "id": "",\n "source": "",\n "target": "",\n "uiConfiguration": {}\n }\n ],\n "nodes": [\n {\n "condition": {\n "in": {\n "field": "",\n "id": "",\n "value": {}\n },\n "allConditions": [],\n "anyConditions": [],\n "contains": {\n "field": "",\n "id": "",\n "value": {}\n },\n "equals": {\n "field": "",\n "id": "",\n "value": {}\n },\n "exists": {\n "field": "",\n "id": ""\n },\n "not": "",\n "range": {\n "field": "",\n "gt": {},\n "gte": {},\n "id": "",\n "lt": {},\n "lte": {}\n }\n },\n "id": "",\n "label": "",\n "parameters": {},\n "type": "",\n "uiConfiguration": {}\n }\n ],\n "trace": false\n },\n "createDate": "",\n "description": "",\n "description_i18n": {},\n "enabled": false,\n "externalReferenceCode": "",\n "id": 0,\n "modifiedDate": "",\n "readOnly": false,\n "schemaVersion": "",\n "title": "",\n "title_i18n": {},\n "version": ""\n}' \
--output-document \
- {{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actions": [],
"configuration": [
"edges": [
[
"id": "",
"source": "",
"target": "",
"uiConfiguration": []
]
],
"nodes": [
[
"condition": [
"in": [
"field": "",
"id": "",
"value": []
],
"allConditions": [],
"anyConditions": [],
"contains": [
"field": "",
"id": "",
"value": []
],
"equals": [
"field": "",
"id": "",
"value": []
],
"exists": [
"field": "",
"id": ""
],
"not": "",
"range": [
"field": "",
"gt": [],
"gte": [],
"id": "",
"lt": [],
"lte": []
]
],
"id": "",
"label": "",
"parameters": [],
"type": "",
"uiConfiguration": []
]
],
"trace": false
],
"createDate": "",
"description": "",
"description_i18n": [],
"enabled": false,
"externalReferenceCode": "",
"id": 0,
"modifiedDate": "",
"readOnly": false,
"schemaVersion": "",
"title": "",
"title_i18n": [],
"version": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/ai-tasks/by-external-reference-code/:externalReferenceCode")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"externalReferenceCode": "AB-34098-789-N"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"externalReferenceCode": "AB-34098-789-N"
}
POST
postGenerateExternalReferenceCode
{{baseUrl}}/generate/:externalReferenceCode
QUERY PARAMS
externalReferenceCode
BODY json
{
"input": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/generate/:externalReferenceCode");
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 \"input\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/generate/:externalReferenceCode" {:content-type :json
:form-params {:input {}}})
require "http/client"
url = "{{baseUrl}}/generate/:externalReferenceCode"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"input\": {}\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}}/generate/:externalReferenceCode"),
Content = new StringContent("{\n \"input\": {}\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}}/generate/:externalReferenceCode");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"input\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/generate/:externalReferenceCode"
payload := strings.NewReader("{\n \"input\": {}\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/generate/:externalReferenceCode HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"input": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/generate/:externalReferenceCode")
.setHeader("content-type", "application/json")
.setBody("{\n \"input\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/generate/:externalReferenceCode"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"input\": {}\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 \"input\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/generate/:externalReferenceCode")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/generate/:externalReferenceCode")
.header("content-type", "application/json")
.body("{\n \"input\": {}\n}")
.asString();
const data = JSON.stringify({
input: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/generate/:externalReferenceCode');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/generate/:externalReferenceCode',
headers: {'content-type': 'application/json'},
data: {input: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/generate/:externalReferenceCode';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"input":{}}'
};
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}}/generate/:externalReferenceCode',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "input": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"input\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/generate/:externalReferenceCode")
.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/generate/:externalReferenceCode',
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({input: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/generate/:externalReferenceCode',
headers: {'content-type': 'application/json'},
body: {input: {}},
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}}/generate/:externalReferenceCode');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
input: {}
});
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}}/generate/:externalReferenceCode',
headers: {'content-type': 'application/json'},
data: {input: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/generate/:externalReferenceCode';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"input":{}}'
};
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 = @{ @"input": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/generate/:externalReferenceCode"]
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}}/generate/:externalReferenceCode" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"input\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/generate/:externalReferenceCode",
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([
'input' => [
]
]),
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}}/generate/:externalReferenceCode', [
'body' => '{
"input": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/generate/:externalReferenceCode');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'input' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'input' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/generate/:externalReferenceCode');
$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}}/generate/:externalReferenceCode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"input": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/generate/:externalReferenceCode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"input": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"input\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/generate/:externalReferenceCode", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/generate/:externalReferenceCode"
payload = { "input": {} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/generate/:externalReferenceCode"
payload <- "{\n \"input\": {}\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}}/generate/:externalReferenceCode")
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 \"input\": {}\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/generate/:externalReferenceCode') do |req|
req.body = "{\n \"input\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/generate/:externalReferenceCode";
let payload = json!({"input": 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}}/generate/:externalReferenceCode \
--header 'content-type: application/json' \
--data '{
"input": {}
}'
echo '{
"input": {}
}' | \
http POST {{baseUrl}}/generate/:externalReferenceCode \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "input": {}\n}' \
--output-document \
- {{baseUrl}}/generate/:externalReferenceCode
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["input": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/generate/:externalReferenceCode")! 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
postStreamExternalReferenceCode
{{baseUrl}}/stream/:externalReferenceCode
QUERY PARAMS
externalReferenceCode
BODY json
{
"input": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stream/:externalReferenceCode");
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 \"input\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/stream/:externalReferenceCode" {:content-type :json
:form-params {:input {}}})
require "http/client"
url = "{{baseUrl}}/stream/:externalReferenceCode"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"input\": {}\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}}/stream/:externalReferenceCode"),
Content = new StringContent("{\n \"input\": {}\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}}/stream/:externalReferenceCode");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"input\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stream/:externalReferenceCode"
payload := strings.NewReader("{\n \"input\": {}\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/stream/:externalReferenceCode HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"input": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/stream/:externalReferenceCode")
.setHeader("content-type", "application/json")
.setBody("{\n \"input\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stream/:externalReferenceCode"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"input\": {}\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 \"input\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/stream/:externalReferenceCode")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/stream/:externalReferenceCode")
.header("content-type", "application/json")
.body("{\n \"input\": {}\n}")
.asString();
const data = JSON.stringify({
input: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/stream/:externalReferenceCode');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/stream/:externalReferenceCode',
headers: {'content-type': 'application/json'},
data: {input: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stream/:externalReferenceCode';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"input":{}}'
};
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}}/stream/:externalReferenceCode',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "input": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"input\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/stream/:externalReferenceCode")
.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/stream/:externalReferenceCode',
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({input: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/stream/:externalReferenceCode',
headers: {'content-type': 'application/json'},
body: {input: {}},
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}}/stream/:externalReferenceCode');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
input: {}
});
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}}/stream/:externalReferenceCode',
headers: {'content-type': 'application/json'},
data: {input: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stream/:externalReferenceCode';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"input":{}}'
};
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 = @{ @"input": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/stream/:externalReferenceCode"]
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}}/stream/:externalReferenceCode" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"input\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stream/:externalReferenceCode",
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([
'input' => [
]
]),
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}}/stream/:externalReferenceCode', [
'body' => '{
"input": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/stream/:externalReferenceCode');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'input' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'input' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/stream/:externalReferenceCode');
$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}}/stream/:externalReferenceCode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"input": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stream/:externalReferenceCode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"input": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"input\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/stream/:externalReferenceCode", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stream/:externalReferenceCode"
payload = { "input": {} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stream/:externalReferenceCode"
payload <- "{\n \"input\": {}\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}}/stream/:externalReferenceCode")
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 \"input\": {}\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/stream/:externalReferenceCode') do |req|
req.body = "{\n \"input\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stream/:externalReferenceCode";
let payload = json!({"input": 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}}/stream/:externalReferenceCode \
--header 'content-type: application/json' \
--data '{
"input": {}
}'
echo '{
"input": {}
}' | \
http POST {{baseUrl}}/stream/:externalReferenceCode \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "input": {}\n}' \
--output-document \
- {{baseUrl}}/stream/:externalReferenceCode
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["input": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stream/:externalReferenceCode")! 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()