Amazon Augmented AI Runtime
DELETE
DeleteHumanLoop
{{baseUrl}}/human-loops/:HumanLoopName
QUERY PARAMS
HumanLoopName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/human-loops/:HumanLoopName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/human-loops/:HumanLoopName")
require "http/client"
url = "{{baseUrl}}/human-loops/:HumanLoopName"
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}}/human-loops/:HumanLoopName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/human-loops/:HumanLoopName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/human-loops/:HumanLoopName"
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/human-loops/:HumanLoopName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/human-loops/:HumanLoopName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/human-loops/:HumanLoopName"))
.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}}/human-loops/:HumanLoopName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/human-loops/:HumanLoopName")
.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}}/human-loops/:HumanLoopName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/human-loops/:HumanLoopName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/human-loops/:HumanLoopName';
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}}/human-loops/:HumanLoopName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/human-loops/:HumanLoopName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/human-loops/:HumanLoopName',
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}}/human-loops/:HumanLoopName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/human-loops/:HumanLoopName');
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}}/human-loops/:HumanLoopName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/human-loops/:HumanLoopName';
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}}/human-loops/:HumanLoopName"]
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}}/human-loops/:HumanLoopName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/human-loops/:HumanLoopName",
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}}/human-loops/:HumanLoopName');
echo $response->getBody();
setUrl('{{baseUrl}}/human-loops/:HumanLoopName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/human-loops/:HumanLoopName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/human-loops/:HumanLoopName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/human-loops/:HumanLoopName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/human-loops/:HumanLoopName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/human-loops/:HumanLoopName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/human-loops/:HumanLoopName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/human-loops/:HumanLoopName")
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/human-loops/:HumanLoopName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/human-loops/:HumanLoopName";
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}}/human-loops/:HumanLoopName
http DELETE {{baseUrl}}/human-loops/:HumanLoopName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/human-loops/:HumanLoopName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/human-loops/:HumanLoopName")! 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
DescribeHumanLoop
{{baseUrl}}/human-loops/:HumanLoopName
QUERY PARAMS
HumanLoopName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/human-loops/:HumanLoopName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/human-loops/:HumanLoopName")
require "http/client"
url = "{{baseUrl}}/human-loops/:HumanLoopName"
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}}/human-loops/:HumanLoopName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/human-loops/:HumanLoopName");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/human-loops/:HumanLoopName"
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/human-loops/:HumanLoopName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/human-loops/:HumanLoopName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/human-loops/:HumanLoopName"))
.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}}/human-loops/:HumanLoopName")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/human-loops/:HumanLoopName")
.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}}/human-loops/:HumanLoopName');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/human-loops/:HumanLoopName'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/human-loops/:HumanLoopName';
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}}/human-loops/:HumanLoopName',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/human-loops/:HumanLoopName")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/human-loops/:HumanLoopName',
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}}/human-loops/:HumanLoopName'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/human-loops/:HumanLoopName');
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}}/human-loops/:HumanLoopName'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/human-loops/:HumanLoopName';
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}}/human-loops/:HumanLoopName"]
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}}/human-loops/:HumanLoopName" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/human-loops/:HumanLoopName",
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}}/human-loops/:HumanLoopName');
echo $response->getBody();
setUrl('{{baseUrl}}/human-loops/:HumanLoopName');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/human-loops/:HumanLoopName');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/human-loops/:HumanLoopName' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/human-loops/:HumanLoopName' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/human-loops/:HumanLoopName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/human-loops/:HumanLoopName"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/human-loops/:HumanLoopName"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/human-loops/:HumanLoopName")
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/human-loops/:HumanLoopName') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/human-loops/:HumanLoopName";
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}}/human-loops/:HumanLoopName
http GET {{baseUrl}}/human-loops/:HumanLoopName
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/human-loops/:HumanLoopName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/human-loops/:HumanLoopName")! 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
ListHumanLoops
{{baseUrl}}/human-loops#FlowDefinitionArn
QUERY PARAMS
FlowDefinitionArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/human-loops#FlowDefinitionArn" {:query-params {:FlowDefinitionArn ""}})
require "http/client"
url = "{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn"
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}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn"
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/human-loops?FlowDefinitionArn= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn"))
.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}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn")
.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}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/human-loops#FlowDefinitionArn',
params: {FlowDefinitionArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn';
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}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/human-loops?FlowDefinitionArn=',
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}}/human-loops#FlowDefinitionArn',
qs: {FlowDefinitionArn: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/human-loops#FlowDefinitionArn');
req.query({
FlowDefinitionArn: ''
});
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}}/human-loops#FlowDefinitionArn',
params: {FlowDefinitionArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn';
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}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn"]
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}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn",
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}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn');
echo $response->getBody();
setUrl('{{baseUrl}}/human-loops#FlowDefinitionArn');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'FlowDefinitionArn' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/human-loops#FlowDefinitionArn');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'FlowDefinitionArn' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/human-loops?FlowDefinitionArn=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/human-loops#FlowDefinitionArn"
querystring = {"FlowDefinitionArn":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/human-loops#FlowDefinitionArn"
queryString <- list(FlowDefinitionArn = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn")
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/human-loops') do |req|
req.params['FlowDefinitionArn'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/human-loops#FlowDefinitionArn";
let querystring = [
("FlowDefinitionArn", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn'
http GET '{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/human-loops?FlowDefinitionArn=#FlowDefinitionArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
StartHumanLoop
{{baseUrl}}/human-loops
BODY json
{
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": {
"InputContent": ""
},
"DataAttributes": {
"ContentClassifiers": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/human-loops");
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 \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/human-loops" {:content-type :json
:form-params {:HumanLoopName ""
:FlowDefinitionArn ""
:HumanLoopInput {:InputContent ""}
:DataAttributes {:ContentClassifiers ""}}})
require "http/client"
url = "{{baseUrl}}/human-loops"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/human-loops"),
Content = new StringContent("{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/human-loops");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/human-loops"
payload := strings.NewReader("{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/human-loops HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 158
{
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": {
"InputContent": ""
},
"DataAttributes": {
"ContentClassifiers": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/human-loops")
.setHeader("content-type", "application/json")
.setBody("{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/human-loops"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/human-loops")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/human-loops")
.header("content-type", "application/json")
.body("{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
HumanLoopName: '',
FlowDefinitionArn: '',
HumanLoopInput: {
InputContent: ''
},
DataAttributes: {
ContentClassifiers: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/human-loops');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/human-loops',
headers: {'content-type': 'application/json'},
data: {
HumanLoopName: '',
FlowDefinitionArn: '',
HumanLoopInput: {InputContent: ''},
DataAttributes: {ContentClassifiers: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/human-loops';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"HumanLoopName":"","FlowDefinitionArn":"","HumanLoopInput":{"InputContent":""},"DataAttributes":{"ContentClassifiers":""}}'
};
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}}/human-loops',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "HumanLoopName": "",\n "FlowDefinitionArn": "",\n "HumanLoopInput": {\n "InputContent": ""\n },\n "DataAttributes": {\n "ContentClassifiers": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/human-loops")
.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/human-loops',
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({
HumanLoopName: '',
FlowDefinitionArn: '',
HumanLoopInput: {InputContent: ''},
DataAttributes: {ContentClassifiers: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/human-loops',
headers: {'content-type': 'application/json'},
body: {
HumanLoopName: '',
FlowDefinitionArn: '',
HumanLoopInput: {InputContent: ''},
DataAttributes: {ContentClassifiers: ''}
},
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}}/human-loops');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
HumanLoopName: '',
FlowDefinitionArn: '',
HumanLoopInput: {
InputContent: ''
},
DataAttributes: {
ContentClassifiers: ''
}
});
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}}/human-loops',
headers: {'content-type': 'application/json'},
data: {
HumanLoopName: '',
FlowDefinitionArn: '',
HumanLoopInput: {InputContent: ''},
DataAttributes: {ContentClassifiers: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/human-loops';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"HumanLoopName":"","FlowDefinitionArn":"","HumanLoopInput":{"InputContent":""},"DataAttributes":{"ContentClassifiers":""}}'
};
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 = @{ @"HumanLoopName": @"",
@"FlowDefinitionArn": @"",
@"HumanLoopInput": @{ @"InputContent": @"" },
@"DataAttributes": @{ @"ContentClassifiers": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/human-loops"]
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}}/human-loops" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/human-loops",
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([
'HumanLoopName' => '',
'FlowDefinitionArn' => '',
'HumanLoopInput' => [
'InputContent' => ''
],
'DataAttributes' => [
'ContentClassifiers' => ''
]
]),
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}}/human-loops', [
'body' => '{
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": {
"InputContent": ""
},
"DataAttributes": {
"ContentClassifiers": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/human-loops');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'HumanLoopName' => '',
'FlowDefinitionArn' => '',
'HumanLoopInput' => [
'InputContent' => ''
],
'DataAttributes' => [
'ContentClassifiers' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'HumanLoopName' => '',
'FlowDefinitionArn' => '',
'HumanLoopInput' => [
'InputContent' => ''
],
'DataAttributes' => [
'ContentClassifiers' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/human-loops');
$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}}/human-loops' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": {
"InputContent": ""
},
"DataAttributes": {
"ContentClassifiers": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/human-loops' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": {
"InputContent": ""
},
"DataAttributes": {
"ContentClassifiers": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/human-loops", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/human-loops"
payload = {
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": { "InputContent": "" },
"DataAttributes": { "ContentClassifiers": "" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/human-loops"
payload <- "{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/human-loops")
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 \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/human-loops') do |req|
req.body = "{\n \"HumanLoopName\": \"\",\n \"FlowDefinitionArn\": \"\",\n \"HumanLoopInput\": {\n \"InputContent\": \"\"\n },\n \"DataAttributes\": {\n \"ContentClassifiers\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/human-loops";
let payload = json!({
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": json!({"InputContent": ""}),
"DataAttributes": json!({"ContentClassifiers": ""})
});
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}}/human-loops \
--header 'content-type: application/json' \
--data '{
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": {
"InputContent": ""
},
"DataAttributes": {
"ContentClassifiers": ""
}
}'
echo '{
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": {
"InputContent": ""
},
"DataAttributes": {
"ContentClassifiers": ""
}
}' | \
http POST {{baseUrl}}/human-loops \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "HumanLoopName": "",\n "FlowDefinitionArn": "",\n "HumanLoopInput": {\n "InputContent": ""\n },\n "DataAttributes": {\n "ContentClassifiers": ""\n }\n}' \
--output-document \
- {{baseUrl}}/human-loops
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"HumanLoopName": "",
"FlowDefinitionArn": "",
"HumanLoopInput": ["InputContent": ""],
"DataAttributes": ["ContentClassifiers": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/human-loops")! 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
StopHumanLoop
{{baseUrl}}/human-loops/stop
BODY json
{
"HumanLoopName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/human-loops/stop");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"HumanLoopName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/human-loops/stop" {:content-type :json
:form-params {:HumanLoopName ""}})
require "http/client"
url = "{{baseUrl}}/human-loops/stop"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"HumanLoopName\": \"\"\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}}/human-loops/stop"),
Content = new StringContent("{\n \"HumanLoopName\": \"\"\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}}/human-loops/stop");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"HumanLoopName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/human-loops/stop"
payload := strings.NewReader("{\n \"HumanLoopName\": \"\"\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/human-loops/stop HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"HumanLoopName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/human-loops/stop")
.setHeader("content-type", "application/json")
.setBody("{\n \"HumanLoopName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/human-loops/stop"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"HumanLoopName\": \"\"\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 \"HumanLoopName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/human-loops/stop")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/human-loops/stop")
.header("content-type", "application/json")
.body("{\n \"HumanLoopName\": \"\"\n}")
.asString();
const data = JSON.stringify({
HumanLoopName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/human-loops/stop');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/human-loops/stop',
headers: {'content-type': 'application/json'},
data: {HumanLoopName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/human-loops/stop';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"HumanLoopName":""}'
};
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}}/human-loops/stop',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "HumanLoopName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"HumanLoopName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/human-loops/stop")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/human-loops/stop',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({HumanLoopName: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/human-loops/stop',
headers: {'content-type': 'application/json'},
body: {HumanLoopName: ''},
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}}/human-loops/stop');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
HumanLoopName: ''
});
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}}/human-loops/stop',
headers: {'content-type': 'application/json'},
data: {HumanLoopName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/human-loops/stop';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"HumanLoopName":""}'
};
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 = @{ @"HumanLoopName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/human-loops/stop"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/human-loops/stop" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"HumanLoopName\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/human-loops/stop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'HumanLoopName' => ''
]),
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}}/human-loops/stop', [
'body' => '{
"HumanLoopName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/human-loops/stop');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'HumanLoopName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'HumanLoopName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/human-loops/stop');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/human-loops/stop' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"HumanLoopName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/human-loops/stop' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"HumanLoopName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"HumanLoopName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/human-loops/stop", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/human-loops/stop"
payload = { "HumanLoopName": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/human-loops/stop"
payload <- "{\n \"HumanLoopName\": \"\"\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}}/human-loops/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"HumanLoopName\": \"\"\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/human-loops/stop') do |req|
req.body = "{\n \"HumanLoopName\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/human-loops/stop";
let payload = json!({"HumanLoopName": ""});
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}}/human-loops/stop \
--header 'content-type: application/json' \
--data '{
"HumanLoopName": ""
}'
echo '{
"HumanLoopName": ""
}' | \
http POST {{baseUrl}}/human-loops/stop \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "HumanLoopName": ""\n}' \
--output-document \
- {{baseUrl}}/human-loops/stop
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["HumanLoopName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/human-loops/stop")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()