Custom Vision Training Client
GET
Get a list of the available domains.
{{baseUrl}}/domains
HEADERS
Training-Key
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/domains"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains"))
.header("training-key", "")
.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}}/domains")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains")
.header("training-key", "")
.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}}/domains');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/domains',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains',
headers: {
'training-key': ''
}
};
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}}/domains',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains');
req.headers({
'training-key': ''
});
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}}/domains',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/domains" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/domains", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains \
--header 'training-key: '
http GET {{baseUrl}}/domains \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/domains
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get information about a specific domain.
{{baseUrl}}/domains/:domainId
HEADERS
Training-Key
QUERY PARAMS
domainId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domainId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domainId" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domainId"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domainId"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domainId");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domainId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domainId HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domainId")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domainId"))
.header("training-key", "")
.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}}/domains/:domainId")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domainId")
.header("training-key", "")
.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}}/domains/:domainId');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domainId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domainId';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/domains/:domainId',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domainId")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domainId',
headers: {
'training-key': ''
}
};
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}}/domains/:domainId',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domainId');
req.headers({
'training-key': ''
});
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}}/domains/:domainId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domainId';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domainId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/domains/:domainId" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domainId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domainId', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domainId');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domainId');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domainId' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domainId' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/domains/:domainId", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domainId"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domainId"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domainId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domainId') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domainId";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domainId \
--header 'training-key: '
http GET {{baseUrl}}/domains/:domainId \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/domains/:domainId
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domainId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Add the provided batch of images to the set of training images.
{{baseUrl}}/projects/:projectId/images/files
HEADERS
Training-Key
QUERY PARAMS
projectId
BODY json
{
"images": [
{
"contents": "",
"name": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/files");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images/files" {:headers {:training-key ""}
:content-type :json
:form-params {:images [{:contents ""
:name ""
:regions [{:height ""
:left ""
:tagId ""
:top ""
:width ""}]
:tagIds []}]
:tagIds []}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/files"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\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}}/projects/:projectId/images/files"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\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}}/projects/:projectId/images/files");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/files"
payload := strings.NewReader("{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/images/files HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 268
{
"images": [
{
"contents": "",
"name": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images/files")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/files"))
.header("training-key", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\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 \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/files")
.post(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/files")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}")
.asString();
const data = JSON.stringify({
images: [
{
contents: '',
name: '',
regions: [
{
height: '',
left: '',
tagId: '',
top: '',
width: ''
}
],
tagIds: []
}
],
tagIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/images/files');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/files',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
images: [
{
contents: '',
name: '',
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: []
}
],
tagIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/files';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"images":[{"contents":"","name":"","regions":[{"height":"","left":"","tagId":"","top":"","width":""}],"tagIds":[]}],"tagIds":[]}'
};
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}}/projects/:projectId/images/files',
method: 'POST',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "images": [\n {\n "contents": "",\n "name": "",\n "regions": [\n {\n "height": "",\n "left": "",\n "tagId": "",\n "top": "",\n "width": ""\n }\n ],\n "tagIds": []\n }\n ],\n "tagIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/files")
.post(body)
.addHeader("training-key", "")
.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/projects/:projectId/images/files',
headers: {
'training-key': '',
'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({
images: [
{
contents: '',
name: '',
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: []
}
],
tagIds: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/files',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {
images: [
{
contents: '',
name: '',
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: []
}
],
tagIds: []
},
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}}/projects/:projectId/images/files');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
images: [
{
contents: '',
name: '',
regions: [
{
height: '',
left: '',
tagId: '',
top: '',
width: ''
}
],
tagIds: []
}
],
tagIds: []
});
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}}/projects/:projectId/images/files',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
images: [
{
contents: '',
name: '',
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: []
}
],
tagIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/files';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"images":[{"contents":"","name":"","regions":[{"height":"","left":"","tagId":"","top":"","width":""}],"tagIds":[]}],"tagIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"images": @[ @{ @"contents": @"", @"name": @"", @"regions": @[ @{ @"height": @"", @"left": @"", @"tagId": @"", @"top": @"", @"width": @"" } ], @"tagIds": @[ ] } ],
@"tagIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/files"]
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}}/projects/:projectId/images/files" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/files",
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([
'images' => [
[
'contents' => '',
'name' => '',
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
]
]
],
'tagIds' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/images/files', [
'body' => '{
"images": [
{
"contents": "",
"name": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/files');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'images' => [
[
'contents' => '',
'name' => '',
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
]
]
],
'tagIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'images' => [
[
'contents' => '',
'name' => '',
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
]
]
],
'tagIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/images/files');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/files' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"images": [
{
"contents": "",
"name": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/files' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"images": [
{
"contents": "",
"name": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/projects/:projectId/images/files", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/files"
payload = {
"images": [
{
"contents": "",
"name": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/files"
payload <- "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\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/projects/:projectId/images/files') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"images\": [\n {\n \"contents\": \"\",\n \"name\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/files";
let payload = json!({
"images": (
json!({
"contents": "",
"name": "",
"regions": (
json!({
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
})
),
"tagIds": ()
})
),
"tagIds": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/images/files \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"images": [
{
"contents": "",
"name": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}'
echo '{
"images": [
{
"contents": "",
"name": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}' | \
http POST {{baseUrl}}/projects/:projectId/images/files \
content-type:application/json \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "images": [\n {\n "contents": "",\n "name": "",\n "regions": [\n {\n "height": "",\n "left": "",\n "tagId": "",\n "top": "",\n "width": ""\n }\n ],\n "tagIds": []\n }\n ],\n "tagIds": []\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/files
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = [
"images": [
[
"contents": "",
"name": "",
"regions": [
[
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
]
],
"tagIds": []
]
],
"tagIds": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/files")! 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
Add the provided images to the set of training images.
{{baseUrl}}/projects/:projectId/images
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/images HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images"))
.header("training-key", "")
.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}}/projects/:projectId/images")
.post(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images")
.header("training-key", "")
.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}}/projects/:projectId/images');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images';
const options = {method: 'POST', headers: {'training-key': ''}};
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}}/projects/:projectId/images',
method: 'POST',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images")
.post(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/images');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images';
const options = {method: 'POST', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/images', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images');
$request->setRequestMethod('POST');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images' -Method POST -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("POST", "/baseUrl/projects/:projectId/images", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images"
headers = {"training-key": ""}
response = requests.post(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images"
response <- VERB("POST", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/:projectId/images') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/images \
--header 'training-key: '
http POST {{baseUrl}}/projects/:projectId/images \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/images
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
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
Add the provided images urls to the set of training images.
{{baseUrl}}/projects/:projectId/images/urls
HEADERS
Training-Key
QUERY PARAMS
projectId
BODY json
{
"images": [
{
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": [],
"url": ""
}
],
"tagIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/urls");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images/urls" {:headers {:training-key ""}
:content-type :json
:form-params {:images [{:regions [{:height ""
:left ""
:tagId ""
:top ""
:width ""}]
:tagIds []
:url ""}]
:tagIds []}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/urls"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\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}}/projects/:projectId/images/urls"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\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}}/projects/:projectId/images/urls");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/urls"
payload := strings.NewReader("{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/images/urls HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 245
{
"images": [
{
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": [],
"url": ""
}
],
"tagIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images/urls")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/urls"))
.header("training-key", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\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 \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/urls")
.post(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/urls")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}")
.asString();
const data = JSON.stringify({
images: [
{
regions: [
{
height: '',
left: '',
tagId: '',
top: '',
width: ''
}
],
tagIds: [],
url: ''
}
],
tagIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/images/urls');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/urls',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
images: [
{
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: [],
url: ''
}
],
tagIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/urls';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"images":[{"regions":[{"height":"","left":"","tagId":"","top":"","width":""}],"tagIds":[],"url":""}],"tagIds":[]}'
};
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}}/projects/:projectId/images/urls',
method: 'POST',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "images": [\n {\n "regions": [\n {\n "height": "",\n "left": "",\n "tagId": "",\n "top": "",\n "width": ""\n }\n ],\n "tagIds": [],\n "url": ""\n }\n ],\n "tagIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/urls")
.post(body)
.addHeader("training-key", "")
.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/projects/:projectId/images/urls',
headers: {
'training-key': '',
'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({
images: [
{
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: [],
url: ''
}
],
tagIds: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/urls',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {
images: [
{
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: [],
url: ''
}
],
tagIds: []
},
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}}/projects/:projectId/images/urls');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
images: [
{
regions: [
{
height: '',
left: '',
tagId: '',
top: '',
width: ''
}
],
tagIds: [],
url: ''
}
],
tagIds: []
});
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}}/projects/:projectId/images/urls',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
images: [
{
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: [],
url: ''
}
],
tagIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/urls';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"images":[{"regions":[{"height":"","left":"","tagId":"","top":"","width":""}],"tagIds":[],"url":""}],"tagIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"images": @[ @{ @"regions": @[ @{ @"height": @"", @"left": @"", @"tagId": @"", @"top": @"", @"width": @"" } ], @"tagIds": @[ ], @"url": @"" } ],
@"tagIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/urls"]
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}}/projects/:projectId/images/urls" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/urls",
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([
'images' => [
[
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
],
'url' => ''
]
],
'tagIds' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/images/urls', [
'body' => '{
"images": [
{
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": [],
"url": ""
}
],
"tagIds": []
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/urls');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'images' => [
[
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
],
'url' => ''
]
],
'tagIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'images' => [
[
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
],
'url' => ''
]
],
'tagIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/images/urls');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/urls' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"images": [
{
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": [],
"url": ""
}
],
"tagIds": []
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/urls' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"images": [
{
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": [],
"url": ""
}
],
"tagIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/projects/:projectId/images/urls", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/urls"
payload = {
"images": [
{
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": [],
"url": ""
}
],
"tagIds": []
}
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/urls"
payload <- "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/urls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\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/projects/:projectId/images/urls') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"images\": [\n {\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": [],\n \"url\": \"\"\n }\n ],\n \"tagIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/urls";
let payload = json!({
"images": (
json!({
"regions": (
json!({
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
})
),
"tagIds": (),
"url": ""
})
),
"tagIds": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/images/urls \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"images": [
{
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": [],
"url": ""
}
],
"tagIds": []
}'
echo '{
"images": [
{
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": [],
"url": ""
}
],
"tagIds": []
}' | \
http POST {{baseUrl}}/projects/:projectId/images/urls \
content-type:application/json \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "images": [\n {\n "regions": [\n {\n "height": "",\n "left": "",\n "tagId": "",\n "top": "",\n "width": ""\n }\n ],\n "tagIds": [],\n "url": ""\n }\n ],\n "tagIds": []\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/urls
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = [
"images": [
[
"regions": [
[
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
]
],
"tagIds": [],
"url": ""
]
],
"tagIds": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/urls")! 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
Add the specified predicted images to the set of training images.
{{baseUrl}}/projects/:projectId/images/predictions
HEADERS
Training-Key
QUERY PARAMS
projectId
BODY json
{
"images": [
{
"id": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/predictions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images/predictions" {:headers {:training-key ""}
:content-type :json
:form-params {:images [{:id ""
:regions [{:height ""
:left ""
:tagId ""
:top ""
:width ""}]
:tagIds []}]
:tagIds []}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/predictions"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\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}}/projects/:projectId/images/predictions"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\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}}/projects/:projectId/images/predictions");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/predictions"
payload := strings.NewReader("{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/images/predictions HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 244
{
"images": [
{
"id": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images/predictions")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/predictions"))
.header("training-key", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\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 \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/predictions")
.post(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/predictions")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}")
.asString();
const data = JSON.stringify({
images: [
{
id: '',
regions: [
{
height: '',
left: '',
tagId: '',
top: '',
width: ''
}
],
tagIds: []
}
],
tagIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/images/predictions');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/predictions',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
images: [
{
id: '',
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: []
}
],
tagIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/predictions';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"images":[{"id":"","regions":[{"height":"","left":"","tagId":"","top":"","width":""}],"tagIds":[]}],"tagIds":[]}'
};
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}}/projects/:projectId/images/predictions',
method: 'POST',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "images": [\n {\n "id": "",\n "regions": [\n {\n "height": "",\n "left": "",\n "tagId": "",\n "top": "",\n "width": ""\n }\n ],\n "tagIds": []\n }\n ],\n "tagIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/predictions")
.post(body)
.addHeader("training-key", "")
.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/projects/:projectId/images/predictions',
headers: {
'training-key': '',
'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({
images: [
{
id: '',
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: []
}
],
tagIds: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/predictions',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {
images: [
{
id: '',
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: []
}
],
tagIds: []
},
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}}/projects/:projectId/images/predictions');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
images: [
{
id: '',
regions: [
{
height: '',
left: '',
tagId: '',
top: '',
width: ''
}
],
tagIds: []
}
],
tagIds: []
});
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}}/projects/:projectId/images/predictions',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
images: [
{
id: '',
regions: [{height: '', left: '', tagId: '', top: '', width: ''}],
tagIds: []
}
],
tagIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/predictions';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"images":[{"id":"","regions":[{"height":"","left":"","tagId":"","top":"","width":""}],"tagIds":[]}],"tagIds":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"images": @[ @{ @"id": @"", @"regions": @[ @{ @"height": @"", @"left": @"", @"tagId": @"", @"top": @"", @"width": @"" } ], @"tagIds": @[ ] } ],
@"tagIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/predictions"]
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}}/projects/:projectId/images/predictions" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/predictions",
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([
'images' => [
[
'id' => '',
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
]
]
],
'tagIds' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/images/predictions', [
'body' => '{
"images": [
{
"id": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/predictions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'images' => [
[
'id' => '',
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
]
]
],
'tagIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'images' => [
[
'id' => '',
'regions' => [
[
'height' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
],
'tagIds' => [
]
]
],
'tagIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/images/predictions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/predictions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"images": [
{
"id": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/predictions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"images": [
{
"id": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/projects/:projectId/images/predictions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/predictions"
payload = {
"images": [
{
"id": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/predictions"
payload <- "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/predictions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\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/projects/:projectId/images/predictions') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"images\": [\n {\n \"id\": \"\",\n \"regions\": [\n {\n \"height\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ],\n \"tagIds\": []\n }\n ],\n \"tagIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/predictions";
let payload = json!({
"images": (
json!({
"id": "",
"regions": (
json!({
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
})
),
"tagIds": ()
})
),
"tagIds": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/images/predictions \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"images": [
{
"id": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}'
echo '{
"images": [
{
"id": "",
"regions": [
{
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
],
"tagIds": []
}
],
"tagIds": []
}' | \
http POST {{baseUrl}}/projects/:projectId/images/predictions \
content-type:application/json \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "images": [\n {\n "id": "",\n "regions": [\n {\n "height": "",\n "left": "",\n "tagId": "",\n "top": "",\n "width": ""\n }\n ],\n "tagIds": []\n }\n ],\n "tagIds": []\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/predictions
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = [
"images": [
[
"id": "",
"regions": [
[
"height": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
]
],
"tagIds": []
]
],
"tagIds": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/predictions")! 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
Associate a set of images with a set of tags.
{{baseUrl}}/projects/:projectId/images/tags
HEADERS
Training-Key
QUERY PARAMS
projectId
BODY json
{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/tags");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images/tags" {:headers {:training-key ""}
:content-type :json
:form-params {:tags [{:imageId ""
:tagId ""}]}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/tags"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/tags"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/tags");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/tags"
payload := strings.NewReader("{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/images/tags HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 70
{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images/tags")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/tags"))
.header("training-key", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/tags")
.post(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/tags")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
tags: [
{
imageId: '',
tagId: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/images/tags');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/tags',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {tags: [{imageId: '', tagId: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/tags';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"tags":[{"imageId":"","tagId":""}]}'
};
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}}/projects/:projectId/images/tags',
method: 'POST',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "tags": [\n {\n "imageId": "",\n "tagId": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/tags")
.post(body)
.addHeader("training-key", "")
.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/projects/:projectId/images/tags',
headers: {
'training-key': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tags: [{imageId: '', tagId: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/tags',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {tags: [{imageId: '', tagId: ''}]},
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}}/projects/:projectId/images/tags');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
tags: [
{
imageId: '',
tagId: ''
}
]
});
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}}/projects/:projectId/images/tags',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {tags: [{imageId: '', tagId: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/tags';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"tags":[{"imageId":"","tagId":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tags": @[ @{ @"imageId": @"", @"tagId": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/tags"]
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}}/projects/:projectId/images/tags" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tags' => [
[
'imageId' => '',
'tagId' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/images/tags', [
'body' => '{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/tags');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tags' => [
[
'imageId' => '',
'tagId' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tags' => [
[
'imageId' => '',
'tagId' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/images/tags');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/projects/:projectId/images/tags", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/tags"
payload = { "tags": [
{
"imageId": "",
"tagId": ""
}
] }
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/tags"
payload <- "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects/:projectId/images/tags') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"tags\": [\n {\n \"imageId\": \"\",\n \"tagId\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/tags";
let payload = json!({"tags": (
json!({
"imageId": "",
"tagId": ""
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/images/tags \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}'
echo '{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}' | \
http POST {{baseUrl}}/projects/:projectId/images/tags \
content-type:application/json \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "tags": [\n {\n "imageId": "",\n "tagId": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/tags
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = ["tags": [
[
"imageId": "",
"tagId": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/tags")! 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
Create a set of image regions.
{{baseUrl}}/projects/:projectId/images/regions
HEADERS
Training-Key
QUERY PARAMS
projectId
BODY json
{
"regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/regions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images/regions" {:headers {:training-key ""}
:content-type :json
:form-params {:regions [{:height ""
:imageId ""
:left ""
:tagId ""
:top ""
:width ""}]}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/regions"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/regions"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/regions");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/regions"
payload := strings.NewReader("{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/images/regions HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 147
{
"regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images/regions")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/regions"))
.header("training-key", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/regions")
.post(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/regions")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
regions: [
{
height: '',
imageId: '',
left: '',
tagId: '',
top: '',
width: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/images/regions');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/regions',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {regions: [{height: '', imageId: '', left: '', tagId: '', top: '', width: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/regions';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"regions":[{"height":"","imageId":"","left":"","tagId":"","top":"","width":""}]}'
};
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}}/projects/:projectId/images/regions',
method: 'POST',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "regions": [\n {\n "height": "",\n "imageId": "",\n "left": "",\n "tagId": "",\n "top": "",\n "width": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/regions")
.post(body)
.addHeader("training-key", "")
.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/projects/:projectId/images/regions',
headers: {
'training-key': '',
'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({regions: [{height: '', imageId: '', left: '', tagId: '', top: '', width: ''}]}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/regions',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {regions: [{height: '', imageId: '', left: '', tagId: '', top: '', width: ''}]},
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}}/projects/:projectId/images/regions');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
regions: [
{
height: '',
imageId: '',
left: '',
tagId: '',
top: '',
width: ''
}
]
});
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}}/projects/:projectId/images/regions',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {regions: [{height: '', imageId: '', left: '', tagId: '', top: '', width: ''}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/regions';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"regions":[{"height":"","imageId":"","left":"","tagId":"","top":"","width":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"regions": @[ @{ @"height": @"", @"imageId": @"", @"left": @"", @"tagId": @"", @"top": @"", @"width": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/regions"]
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}}/projects/:projectId/images/regions" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/regions",
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([
'regions' => [
[
'height' => '',
'imageId' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/images/regions', [
'body' => '{
"regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/regions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'regions' => [
[
'height' => '',
'imageId' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'regions' => [
[
'height' => '',
'imageId' => '',
'left' => '',
'tagId' => '',
'top' => '',
'width' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/images/regions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/regions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
]
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/regions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/projects/:projectId/images/regions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/regions"
payload = { "regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
] }
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/regions"
payload <- "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/regions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects/:projectId/images/regions') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"regions\": [\n {\n \"height\": \"\",\n \"imageId\": \"\",\n \"left\": \"\",\n \"tagId\": \"\",\n \"top\": \"\",\n \"width\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/regions";
let payload = json!({"regions": (
json!({
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/images/regions \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
]
}'
echo '{
"regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
]
}' | \
http POST {{baseUrl}}/projects/:projectId/images/regions \
content-type:application/json \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "regions": [\n {\n "height": "",\n "imageId": "",\n "left": "",\n "tagId": "",\n "top": "",\n "width": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/regions
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = ["regions": [
[
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/regions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete a set of image regions.
{{baseUrl}}/projects/:projectId/images/regions
HEADERS
Training-Key
QUERY PARAMS
regionIds
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/regions?regionIds=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/images/regions" {:headers {:training-key ""}
:query-params {:regionIds ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/regions?regionIds="
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/regions?regionIds="),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/regions?regionIds=");
var request = new RestRequest("", Method.Delete);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/regions?regionIds="
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId/images/regions?regionIds= HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/images/regions?regionIds=")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/regions?regionIds="))
.header("training-key", "")
.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}}/projects/:projectId/images/regions?regionIds=")
.delete(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/images/regions?regionIds=")
.header("training-key", "")
.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}}/projects/:projectId/images/regions?regionIds=');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/images/regions',
params: {regionIds: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/regions?regionIds=';
const options = {method: 'DELETE', headers: {'training-key': ''}};
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}}/projects/:projectId/images/regions?regionIds=',
method: 'DELETE',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/regions?regionIds=")
.delete(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/regions?regionIds=',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images/regions',
qs: {regionIds: ''},
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId/images/regions');
req.query({
regionIds: ''
});
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images/regions',
params: {regionIds: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/regions?regionIds=';
const options = {method: 'DELETE', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/regions?regionIds="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images/regions?regionIds=" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/regions?regionIds=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/projects/:projectId/images/regions?regionIds=', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/regions');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'regionIds' => ''
]);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/regions');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'regionIds' => ''
]));
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/regions?regionIds=' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/regions?regionIds=' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("DELETE", "/baseUrl/projects/:projectId/images/regions?regionIds=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/regions"
querystring = {"regionIds":""}
headers = {"training-key": ""}
response = requests.delete(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/regions"
queryString <- list(regionIds = "")
response <- VERB("DELETE", url, query = queryString, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/regions?regionIds=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/projects/:projectId/images/regions') do |req|
req.headers['training-key'] = ''
req.params['regionIds'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/regions";
let querystring = [
("regionIds", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/projects/:projectId/images/regions?regionIds=' \
--header 'training-key: '
http DELETE '{{baseUrl}}/projects/:projectId/images/regions?regionIds=' \
training-key:''
wget --quiet \
--method DELETE \
--header 'training-key: ' \
--output-document \
- '{{baseUrl}}/projects/:projectId/images/regions?regionIds='
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/regions?regionIds=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete images from the set of training images.
{{baseUrl}}/projects/:projectId/images
HEADERS
Training-Key
QUERY PARAMS
imageIds
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images?imageIds=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/images" {:headers {:training-key ""}
:query-params {:imageIds ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images?imageIds="
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images?imageIds="),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images?imageIds=");
var request = new RestRequest("", Method.Delete);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images?imageIds="
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId/images?imageIds= HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/images?imageIds=")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images?imageIds="))
.header("training-key", "")
.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}}/projects/:projectId/images?imageIds=")
.delete(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/images?imageIds=")
.header("training-key", "")
.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}}/projects/:projectId/images?imageIds=');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/images',
params: {imageIds: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images?imageIds=';
const options = {method: 'DELETE', headers: {'training-key': ''}};
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}}/projects/:projectId/images?imageIds=',
method: 'DELETE',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images?imageIds=")
.delete(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images?imageIds=',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images',
qs: {imageIds: ''},
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId/images');
req.query({
imageIds: ''
});
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images',
params: {imageIds: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images?imageIds=';
const options = {method: 'DELETE', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images?imageIds="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images?imageIds=" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images?imageIds=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/projects/:projectId/images?imageIds=', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'imageIds' => ''
]);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'imageIds' => ''
]));
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images?imageIds=' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images?imageIds=' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("DELETE", "/baseUrl/projects/:projectId/images?imageIds=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images"
querystring = {"imageIds":""}
headers = {"training-key": ""}
response = requests.delete(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images"
queryString <- list(imageIds = "")
response <- VERB("DELETE", url, query = queryString, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images?imageIds=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/projects/:projectId/images') do |req|
req.headers['training-key'] = ''
req.params['imageIds'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images";
let querystring = [
("imageIds", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/projects/:projectId/images?imageIds=' \
--header 'training-key: '
http DELETE '{{baseUrl}}/projects/:projectId/images?imageIds=' \
training-key:''
wget --quiet \
--method DELETE \
--header 'training-key: ' \
--output-document \
- '{{baseUrl}}/projects/:projectId/images?imageIds='
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images?imageIds=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
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
Get images by id for a given project iteration.
{{baseUrl}}/projects/:projectId/images/id
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/id" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/id"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/id"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/id");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/images/id HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/id")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/id"))
.header("training-key", "")
.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}}/projects/:projectId/images/id")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/id")
.header("training-key", "")
.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}}/projects/:projectId/images/id');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/id',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/id';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/images/id',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/id")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/id',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images/id',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/images/id');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images/id',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/id';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images/id" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/images/id', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/id');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/images/id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/id"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/id"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/images/id') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/id \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/images/id \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/id
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get tagged images for a given project iteration.
{{baseUrl}}/projects/:projectId/images/tagged
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/tagged");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/tagged" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/tagged"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/tagged"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/tagged");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/tagged"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/images/tagged HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/tagged")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/tagged"))
.header("training-key", "")
.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}}/projects/:projectId/images/tagged")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/tagged")
.header("training-key", "")
.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}}/projects/:projectId/images/tagged');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/tagged',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/tagged';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/images/tagged',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/tagged")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/tagged',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images/tagged',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/images/tagged');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images/tagged',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/tagged';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/tagged"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images/tagged" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/tagged",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/images/tagged', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/tagged');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/tagged');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/tagged' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/tagged' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/images/tagged", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/tagged"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/tagged"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/tagged")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/images/tagged') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/tagged";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/tagged \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/images/tagged \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/tagged
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/tagged")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get untagged images for a given project iteration.
{{baseUrl}}/projects/:projectId/images/untagged
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/untagged");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/untagged" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/untagged"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/untagged"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/untagged");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/untagged"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/images/untagged HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/untagged")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/untagged"))
.header("training-key", "")
.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}}/projects/:projectId/images/untagged")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/untagged")
.header("training-key", "")
.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}}/projects/:projectId/images/untagged');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/untagged',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/untagged';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/images/untagged',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/untagged")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/untagged',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images/untagged',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/images/untagged');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images/untagged',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/untagged';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/untagged"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images/untagged" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/untagged",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/images/untagged', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/untagged');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/untagged');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/untagged' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/untagged' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/images/untagged", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/untagged"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/untagged"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/untagged")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/images/untagged') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/untagged";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/untagged \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/images/untagged \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/untagged
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/untagged")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Gets the number of images tagged with the provided {tagIds}.
{{baseUrl}}/projects/:projectId/images/tagged/count
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/tagged/count");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/tagged/count" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/tagged/count"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/tagged/count"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/tagged/count");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/tagged/count"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/images/tagged/count HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/tagged/count")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/tagged/count"))
.header("training-key", "")
.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}}/projects/:projectId/images/tagged/count")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/tagged/count")
.header("training-key", "")
.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}}/projects/:projectId/images/tagged/count');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/tagged/count',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/tagged/count';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/images/tagged/count',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/tagged/count")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/tagged/count',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images/tagged/count',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/images/tagged/count');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images/tagged/count',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/tagged/count';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/tagged/count"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images/tagged/count" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/tagged/count",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/images/tagged/count', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/tagged/count');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/tagged/count');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/tagged/count' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/tagged/count' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/images/tagged/count", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/tagged/count"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/tagged/count"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/tagged/count")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/images/tagged/count') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/tagged/count";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/tagged/count \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/images/tagged/count \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/tagged/count
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/tagged/count")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Gets the number of untagged images.
{{baseUrl}}/projects/:projectId/images/untagged/count
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/untagged/count");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/untagged/count" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/untagged/count"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/untagged/count"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/untagged/count");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/untagged/count"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/images/untagged/count HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/untagged/count")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/untagged/count"))
.header("training-key", "")
.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}}/projects/:projectId/images/untagged/count")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/untagged/count")
.header("training-key", "")
.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}}/projects/:projectId/images/untagged/count');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/untagged/count',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/untagged/count';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/images/untagged/count',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/untagged/count")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/untagged/count',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images/untagged/count',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/images/untagged/count');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images/untagged/count',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/untagged/count';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/untagged/count"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images/untagged/count" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/untagged/count",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/images/untagged/count', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/untagged/count');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/untagged/count');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/untagged/count' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/untagged/count' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/images/untagged/count", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/untagged/count"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/untagged/count"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/untagged/count")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/images/untagged/count') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/untagged/count";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/untagged/count \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/images/untagged/count \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/images/untagged/count
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/untagged/count")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Remove a set of tags from a set of images.
{{baseUrl}}/projects/:projectId/images/tags
HEADERS
Training-Key
QUERY PARAMS
imageIds
tagIds
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/images/tags" {:headers {:training-key ""}
:query-params {:imageIds ""
:tagIds ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=");
var request = new RestRequest("", Method.Delete);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId/images/tags?imageIds=&tagIds= HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="))
.header("training-key", "")
.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}}/projects/:projectId/images/tags?imageIds=&tagIds=")
.delete(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=")
.header("training-key", "")
.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}}/projects/:projectId/images/tags?imageIds=&tagIds=');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/images/tags',
params: {imageIds: '', tagIds: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=';
const options = {method: 'DELETE', headers: {'training-key': ''}};
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}}/projects/:projectId/images/tags?imageIds=&tagIds=',
method: 'DELETE',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=")
.delete(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/tags?imageIds=&tagIds=',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/images/tags',
qs: {imageIds: '', tagIds: ''},
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId/images/tags');
req.query({
imageIds: '',
tagIds: ''
});
req.headers({
'training-key': ''
});
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}}/projects/:projectId/images/tags',
params: {imageIds: '', tagIds: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=';
const options = {method: 'DELETE', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/images/tags?imageIds=&tagIds=" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/tags');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'imageIds' => '',
'tagIds' => ''
]);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/tags');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'imageIds' => '',
'tagIds' => ''
]));
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("DELETE", "/baseUrl/projects/:projectId/images/tags?imageIds=&tagIds=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/tags"
querystring = {"imageIds":"","tagIds":""}
headers = {"training-key": ""}
response = requests.delete(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/tags"
queryString <- list(
imageIds = "",
tagIds = ""
)
response <- VERB("DELETE", url, query = queryString, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/projects/:projectId/images/tags') do |req|
req.headers['training-key'] = ''
req.params['imageIds'] = ''
req.params['tagIds'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/tags";
let querystring = [
("imageIds", ""),
("tagIds", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=' \
--header 'training-key: '
http DELETE '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=' \
training-key:''
wget --quiet \
--method DELETE \
--header 'training-key: ' \
--output-document \
- '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds='
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
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
Get region proposals for an image. Returns empty array if no proposals are found.
{{baseUrl}}/:projectId/images/:imageId/regionproposals
HEADERS
Training-Key
QUERY PARAMS
projectId
imageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/:projectId/images/:imageId/regionproposals");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/:projectId/images/:imageId/regionproposals" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/:projectId/images/:imageId/regionproposals"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/:projectId/images/:imageId/regionproposals"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/:projectId/images/:imageId/regionproposals");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/:projectId/images/:imageId/regionproposals"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/:projectId/images/:imageId/regionproposals HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/:projectId/images/:imageId/regionproposals")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/:projectId/images/:imageId/regionproposals"))
.header("training-key", "")
.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}}/:projectId/images/:imageId/regionproposals")
.post(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/:projectId/images/:imageId/regionproposals")
.header("training-key", "")
.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}}/:projectId/images/:imageId/regionproposals');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/:projectId/images/:imageId/regionproposals',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/:projectId/images/:imageId/regionproposals';
const options = {method: 'POST', headers: {'training-key': ''}};
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}}/:projectId/images/:imageId/regionproposals',
method: 'POST',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/:projectId/images/:imageId/regionproposals")
.post(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/:projectId/images/:imageId/regionproposals',
headers: {
'training-key': ''
}
};
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}}/:projectId/images/:imageId/regionproposals',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/:projectId/images/:imageId/regionproposals');
req.headers({
'training-key': ''
});
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}}/:projectId/images/:imageId/regionproposals',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/:projectId/images/:imageId/regionproposals';
const options = {method: 'POST', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/:projectId/images/:imageId/regionproposals"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
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}}/:projectId/images/:imageId/regionproposals" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/:projectId/images/:imageId/regionproposals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/:projectId/images/:imageId/regionproposals', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/:projectId/images/:imageId/regionproposals');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/:projectId/images/:imageId/regionproposals');
$request->setRequestMethod('POST');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/:projectId/images/:imageId/regionproposals' -Method POST -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/:projectId/images/:imageId/regionproposals' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("POST", "/baseUrl/:projectId/images/:imageId/regionproposals", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/:projectId/images/:imageId/regionproposals"
headers = {"training-key": ""}
response = requests.post(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/:projectId/images/:imageId/regionproposals"
response <- VERB("POST", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/:projectId/images/:imageId/regionproposals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/:projectId/images/:imageId/regionproposals') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/:projectId/images/:imageId/regionproposals";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/:projectId/images/:imageId/regionproposals \
--header 'training-key: '
http POST {{baseUrl}}/:projectId/images/:imageId/regionproposals \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/:projectId/images/:imageId/regionproposals
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/:projectId/images/:imageId/regionproposals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete a set of predicted images and their associated prediction results.
{{baseUrl}}/projects/:projectId/predictions
HEADERS
Training-Key
QUERY PARAMS
ids
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/predictions?ids=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/predictions" {:headers {:training-key ""}
:query-params {:ids ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/predictions?ids="
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/predictions?ids="),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/predictions?ids=");
var request = new RestRequest("", Method.Delete);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/predictions?ids="
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId/predictions?ids= HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/predictions?ids=")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/predictions?ids="))
.header("training-key", "")
.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}}/projects/:projectId/predictions?ids=")
.delete(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/predictions?ids=")
.header("training-key", "")
.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}}/projects/:projectId/predictions?ids=');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/predictions',
params: {ids: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/predictions?ids=';
const options = {method: 'DELETE', headers: {'training-key': ''}};
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}}/projects/:projectId/predictions?ids=',
method: 'DELETE',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/predictions?ids=")
.delete(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/predictions?ids=',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/predictions',
qs: {ids: ''},
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId/predictions');
req.query({
ids: ''
});
req.headers({
'training-key': ''
});
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}}/projects/:projectId/predictions',
params: {ids: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/predictions?ids=';
const options = {method: 'DELETE', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/predictions?ids="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/predictions?ids=" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/predictions?ids=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/projects/:projectId/predictions?ids=', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/predictions');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'ids' => ''
]);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/predictions');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'ids' => ''
]));
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/predictions?ids=' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/predictions?ids=' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("DELETE", "/baseUrl/projects/:projectId/predictions?ids=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/predictions"
querystring = {"ids":""}
headers = {"training-key": ""}
response = requests.delete(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/predictions"
queryString <- list(ids = "")
response <- VERB("DELETE", url, query = queryString, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/predictions?ids=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/projects/:projectId/predictions') do |req|
req.headers['training-key'] = ''
req.params['ids'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/predictions";
let querystring = [
("ids", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/projects/:projectId/predictions?ids=' \
--header 'training-key: '
http DELETE '{{baseUrl}}/projects/:projectId/predictions?ids=' \
training-key:''
wget --quiet \
--method DELETE \
--header 'training-key: ' \
--output-document \
- '{{baseUrl}}/projects/:projectId/predictions?ids='
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/predictions?ids=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
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
Get images that were sent to your prediction endpoint.
{{baseUrl}}/projects/:projectId/predictions/query
HEADERS
Training-Key
QUERY PARAMS
projectId
BODY json
{
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/predictions/query");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/predictions/query" {:headers {:training-key ""}
:content-type :json
:form-params {:tags [{:id ""
:maxThreshold ""
:minThreshold ""}]
:application ""
:continuation ""
:endTime ""
:iterationId ""
:maxCount 0
:orderBy ""
:session ""
:startTime ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/predictions/query"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\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}}/projects/:projectId/predictions/query"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\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}}/projects/:projectId/predictions/query");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/predictions/query"
payload := strings.NewReader("{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/predictions/query HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 249
{
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/predictions/query")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/predictions/query"))
.header("training-key", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/predictions/query")
.post(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/predictions/query")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
tags: [
{
id: '',
maxThreshold: '',
minThreshold: ''
}
],
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/predictions/query');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/predictions/query',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
tags: [{id: '', maxThreshold: '', minThreshold: ''}],
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/predictions/query';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"tags":[{"id":"","maxThreshold":"","minThreshold":""}],"application":"","continuation":"","endTime":"","iterationId":"","maxCount":0,"orderBy":"","session":"","startTime":""}'
};
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}}/projects/:projectId/predictions/query',
method: 'POST',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "tags": [\n {\n "id": "",\n "maxThreshold": "",\n "minThreshold": ""\n }\n ],\n "application": "",\n "continuation": "",\n "endTime": "",\n "iterationId": "",\n "maxCount": 0,\n "orderBy": "",\n "session": "",\n "startTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/predictions/query")
.post(body)
.addHeader("training-key", "")
.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/projects/:projectId/predictions/query',
headers: {
'training-key': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
tags: [{id: '', maxThreshold: '', minThreshold: ''}],
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/predictions/query',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {
tags: [{id: '', maxThreshold: '', minThreshold: ''}],
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: ''
},
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}}/projects/:projectId/predictions/query');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
tags: [
{
id: '',
maxThreshold: '',
minThreshold: ''
}
],
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: ''
});
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}}/projects/:projectId/predictions/query',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
tags: [{id: '', maxThreshold: '', minThreshold: ''}],
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/predictions/query';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"tags":[{"id":"","maxThreshold":"","minThreshold":""}],"application":"","continuation":"","endTime":"","iterationId":"","maxCount":0,"orderBy":"","session":"","startTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tags": @[ @{ @"id": @"", @"maxThreshold": @"", @"minThreshold": @"" } ],
@"application": @"",
@"continuation": @"",
@"endTime": @"",
@"iterationId": @"",
@"maxCount": @0,
@"orderBy": @"",
@"session": @"",
@"startTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/predictions/query"]
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}}/projects/:projectId/predictions/query" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/predictions/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tags' => [
[
'id' => '',
'maxThreshold' => '',
'minThreshold' => ''
]
],
'application' => '',
'continuation' => '',
'endTime' => '',
'iterationId' => '',
'maxCount' => 0,
'orderBy' => '',
'session' => '',
'startTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/predictions/query', [
'body' => '{
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/predictions/query');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tags' => [
[
'id' => '',
'maxThreshold' => '',
'minThreshold' => ''
]
],
'application' => '',
'continuation' => '',
'endTime' => '',
'iterationId' => '',
'maxCount' => 0,
'orderBy' => '',
'session' => '',
'startTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tags' => [
[
'id' => '',
'maxThreshold' => '',
'minThreshold' => ''
]
],
'application' => '',
'continuation' => '',
'endTime' => '',
'iterationId' => '',
'maxCount' => 0,
'orderBy' => '',
'session' => '',
'startTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/predictions/query');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/predictions/query' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/predictions/query' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/projects/:projectId/predictions/query", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/predictions/query"
payload = {
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
}
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/predictions/query"
payload <- "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/predictions/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\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/projects/:projectId/predictions/query') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ],\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/predictions/query";
let payload = json!({
"tags": (
json!({
"id": "",
"maxThreshold": "",
"minThreshold": ""
})
),
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/predictions/query \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
}'
echo '{
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
}' | \
http POST {{baseUrl}}/projects/:projectId/predictions/query \
content-type:application/json \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "tags": [\n {\n "id": "",\n "maxThreshold": "",\n "minThreshold": ""\n }\n ],\n "application": "",\n "continuation": "",\n "endTime": "",\n "iterationId": "",\n "maxCount": 0,\n "orderBy": "",\n "session": "",\n "startTime": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/predictions/query
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = [
"tags": [
[
"id": "",
"maxThreshold": "",
"minThreshold": ""
]
],
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/predictions/query")! 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
Quick test an image url.
{{baseUrl}}/projects/:projectId/quicktest/url
HEADERS
Training-Key
QUERY PARAMS
projectId
BODY json
{
"url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/quicktest/url");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/quicktest/url" {:headers {:training-key ""}
:content-type :json
:form-params {:url ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/quicktest/url"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"url\": \"\"\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}}/projects/:projectId/quicktest/url"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"url\": \"\"\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}}/projects/:projectId/quicktest/url");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/quicktest/url"
payload := strings.NewReader("{\n \"url\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/quicktest/url HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 15
{
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/quicktest/url")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/quicktest/url"))
.header("training-key", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"url\": \"\"\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 \"url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/quicktest/url")
.post(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/quicktest/url")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"url\": \"\"\n}")
.asString();
const data = JSON.stringify({
url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/quicktest/url');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/quicktest/url',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {url: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/quicktest/url';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"url":""}'
};
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}}/projects/:projectId/quicktest/url',
method: 'POST',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/quicktest/url")
.post(body)
.addHeader("training-key", "")
.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/projects/:projectId/quicktest/url',
headers: {
'training-key': '',
'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({url: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/quicktest/url',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {url: ''},
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}}/projects/:projectId/quicktest/url');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
url: ''
});
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}}/projects/:projectId/quicktest/url',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {url: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/quicktest/url';
const options = {
method: 'POST',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"url":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/quicktest/url"]
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}}/projects/:projectId/quicktest/url" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"url\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/quicktest/url",
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([
'url' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/quicktest/url', [
'body' => '{
"url": ""
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/quicktest/url');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/quicktest/url');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/quicktest/url' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"url": ""
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/quicktest/url' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"url\": \"\"\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/projects/:projectId/quicktest/url", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/quicktest/url"
payload = { "url": "" }
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/quicktest/url"
payload <- "{\n \"url\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/quicktest/url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"url\": \"\"\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/projects/:projectId/quicktest/url') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"url\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/quicktest/url";
let payload = json!({"url": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/quicktest/url \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"url": ""
}'
echo '{
"url": ""
}' | \
http POST {{baseUrl}}/projects/:projectId/quicktest/url \
content-type:application/json \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/quicktest/url
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = ["url": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/quicktest/url")! 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
Quick test an image.
{{baseUrl}}/projects/:projectId/quicktest/image
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/quicktest/image");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/quicktest/image" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/quicktest/image"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/quicktest/image"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/quicktest/image");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/quicktest/image"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/quicktest/image HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/quicktest/image")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/quicktest/image"))
.header("training-key", "")
.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}}/projects/:projectId/quicktest/image")
.post(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/quicktest/image")
.header("training-key", "")
.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}}/projects/:projectId/quicktest/image');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/quicktest/image',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/quicktest/image';
const options = {method: 'POST', headers: {'training-key': ''}};
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}}/projects/:projectId/quicktest/image',
method: 'POST',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/quicktest/image")
.post(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/quicktest/image',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/quicktest/image',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/quicktest/image');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/quicktest/image',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/quicktest/image';
const options = {method: 'POST', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/quicktest/image"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/quicktest/image" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/quicktest/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/quicktest/image', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/quicktest/image');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/quicktest/image');
$request->setRequestMethod('POST');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/quicktest/image' -Method POST -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/quicktest/image' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("POST", "/baseUrl/projects/:projectId/quicktest/image", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/quicktest/image"
headers = {"training-key": ""}
response = requests.post(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/quicktest/image"
response <- VERB("POST", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/quicktest/image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/:projectId/quicktest/image') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/quicktest/image";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/quicktest/image \
--header 'training-key: '
http POST {{baseUrl}}/projects/:projectId/quicktest/image \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/quicktest/image
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/quicktest/image")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
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
Create a project.
{{baseUrl}}/projects
HEADERS
Training-Key
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects?name=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects" {:headers {:training-key ""}
:query-params {:name ""}})
require "http/client"
url = "{{baseUrl}}/projects?name="
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects?name="),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects?name=");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects?name="
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects?name= HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects?name=")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects?name="))
.header("training-key", "")
.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}}/projects?name=")
.post(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects?name=")
.header("training-key", "")
.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}}/projects?name=');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects',
params: {name: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects?name=';
const options = {method: 'POST', headers: {'training-key': ''}};
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}}/projects?name=',
method: 'POST',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects?name=")
.post(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects?name=',
headers: {
'training-key': ''
}
};
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}}/projects',
qs: {name: ''},
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects');
req.query({
name: ''
});
req.headers({
'training-key': ''
});
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}}/projects',
params: {name: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects?name=';
const options = {method: 'POST', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects?name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
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}}/projects?name=" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects?name=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects?name=', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'name' => ''
]);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'name' => ''
]));
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects?name=' -Method POST -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects?name=' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("POST", "/baseUrl/projects?name=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects"
querystring = {"name":""}
headers = {"training-key": ""}
response = requests.post(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects"
queryString <- list(name = "")
response <- VERB("POST", url, query = queryString, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects?name=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects') do |req|
req.headers['training-key'] = ''
req.params['name'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects";
let querystring = [
("name", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects?name=' \
--header 'training-key: '
http POST '{{baseUrl}}/projects?name=' \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--output-document \
- '{{baseUrl}}/projects?name='
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects?name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete a specific iteration of a project.
{{baseUrl}}/projects/:projectId/iterations/:iterationId
HEADERS
Training-Key
QUERY PARAMS
projectId
iterationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations/:iterationId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/iterations/:iterationId" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/iterations/:iterationId");
var request = new RestRequest("", Method.Delete);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId/iterations/:iterationId HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId"))
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId")
.delete(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId';
const options = {method: 'DELETE', headers: {'training-key': ''}};
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}}/projects/:projectId/iterations/:iterationId',
method: 'DELETE',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.delete(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations/:iterationId',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId/iterations/:iterationId');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId';
const options = {method: 'DELETE', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/iterations/:iterationId" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/projects/:projectId/iterations/:iterationId', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("DELETE", "/baseUrl/projects/:projectId/iterations/:iterationId", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
headers = {"training-key": ""}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
response <- VERB("DELETE", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/projects/:projectId/iterations/:iterationId') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId \
--header 'training-key: '
http DELETE {{baseUrl}}/projects/:projectId/iterations/:iterationId \
training-key:''
wget --quiet \
--method DELETE \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete a specific project.
{{baseUrl}}/projects/:projectId
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId");
var request = new RestRequest("", Method.Delete);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId"))
.header("training-key", "")
.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}}/projects/:projectId")
.delete(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId")
.header("training-key", "")
.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}}/projects/:projectId');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId';
const options = {method: 'DELETE', headers: {'training-key': ''}};
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}}/projects/:projectId',
method: 'DELETE',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.delete(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId');
req.headers({
'training-key': ''
});
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}}/projects/:projectId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId';
const options = {method: 'DELETE', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/projects/:projectId', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("DELETE", "/baseUrl/projects/:projectId", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId"
headers = {"training-key": ""}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId"
response <- VERB("DELETE", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/projects/:projectId') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/projects/:projectId \
--header 'training-key: '
http DELETE {{baseUrl}}/projects/:projectId \
training-key:''
wget --quiet \
--method DELETE \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
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
Export a trained iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/export
HEADERS
Training-Key
QUERY PARAMS
platform
projectId
iterationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export" {:headers {:training-key ""}
:query-params {:platform ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/iterations/:iterationId/export?platform= HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="))
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/export?platform=")
.post(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=")
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/export?platform=');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export',
params: {platform: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=';
const options = {method: 'POST', headers: {'training-key': ''}};
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}}/projects/:projectId/iterations/:iterationId/export?platform=',
method: 'POST',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=")
.post(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations/:iterationId/export?platform=',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/iterations/:iterationId/export',
qs: {platform: ''},
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
req.query({
platform: ''
});
req.headers({
'training-key': ''
});
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}}/projects/:projectId/iterations/:iterationId/export',
params: {platform: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=';
const options = {method: 'POST', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/iterations/:iterationId/export?platform=" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'platform' => ''
]);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'platform' => ''
]));
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=' -Method POST -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("POST", "/baseUrl/projects/:projectId/iterations/:iterationId/export?platform=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
querystring = {"platform":""}
headers = {"training-key": ""}
response = requests.post(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
queryString <- list(platform = "")
response <- VERB("POST", url, query = queryString, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/:projectId/iterations/:iterationId/export') do |req|
req.headers['training-key'] = ''
req.params['platform'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export";
let querystring = [
("platform", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=' \
--header 'training-key: '
http POST '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=' \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--output-document \
- '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform='
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
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
Get a specific iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId
HEADERS
Training-Key
QUERY PARAMS
projectId
iterationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations/:iterationId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/iterations/:iterationId");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/iterations/:iterationId HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId"))
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/iterations/:iterationId',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations/:iterationId',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/iterations/:iterationId" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/iterations/:iterationId') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get a specific project.
{{baseUrl}}/projects/:projectId
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId"))
.header("training-key", "")
.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}}/projects/:projectId")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId")
.header("training-key", "")
.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}}/projects/:projectId');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId');
req.headers({
'training-key': ''
});
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}}/projects/:projectId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get detailed performance information about an iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance
HEADERS
Training-Key
QUERY PARAMS
projectId
iterationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/iterations/:iterationId/performance HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"))
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/performance")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/performance');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/iterations/:iterationId/performance',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations/:iterationId/performance',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/iterations/:iterationId/performance',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/iterations/:iterationId/performance',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/iterations/:iterationId/performance" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId/performance", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/iterations/:iterationId/performance') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get image with its prediction for a given project iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images
HEADERS
Training-Key
QUERY PARAMS
projectId
iterationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/iterations/:iterationId/performance/images HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"))
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/performance/images")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/performance/images');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/iterations/:iterationId/performance/images',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations/:iterationId/performance/images',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/iterations/:iterationId/performance/images',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/iterations/:iterationId/performance/images',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/iterations/:iterationId/performance/images" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId/performance/images", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/iterations/:iterationId/performance/images') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get iterations for the project.
{{baseUrl}}/projects/:projectId/iterations
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/iterations");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/iterations HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations"))
.header("training-key", "")
.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}}/projects/:projectId/iterations")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations")
.header("training-key", "")
.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}}/projects/:projectId/iterations');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/iterations',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/iterations',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/iterations');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/iterations',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/iterations" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/iterations', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/iterations", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/iterations') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/iterations \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get the list of exports for a specific iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/export
HEADERS
Training-Key
QUERY PARAMS
projectId
iterationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/iterations/:iterationId/export HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"))
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/export")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/export');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/iterations/:iterationId/export',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations/:iterationId/export',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/iterations/:iterationId/export',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/iterations/:iterationId/export',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/iterations/:iterationId/export" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId/export", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/iterations/:iterationId/export') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/export \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId/export \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/export
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get your projects.
{{baseUrl}}/projects
HEADERS
Training-Key
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects"))
.header("training-key", "")
.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}}/projects")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects")
.header("training-key", "")
.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}}/projects');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects',
headers: {
'training-key': ''
}
};
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}}/projects',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects');
req.headers({
'training-key': ''
});
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}}/projects',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects \
--header 'training-key: '
http GET {{baseUrl}}/projects \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Gets the number of images tagged with the provided {tagIds} that have prediction results from training for the provided iteration {iterationId}.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count
HEADERS
Training-Key
QUERY PARAMS
projectId
iterationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/iterations/:iterationId/performance/images/count HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"))
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/performance/images/count")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")
.header("training-key", "")
.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}}/projects/:projectId/iterations/:iterationId/performance/images/count');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/iterations/:iterationId/performance/images/count',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations/:iterationId/performance/images/count',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/iterations/:iterationId/performance/images/count',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/iterations/:iterationId/performance/images/count',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/iterations/:iterationId/performance/images/count" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId/performance/images/count", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/iterations/:iterationId/performance/images/count') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Queues project for training.
{{baseUrl}}/projects/:projectId/train
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/train");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/train" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/train"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/train"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/train");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/train"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/train HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/train")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/train"))
.header("training-key", "")
.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}}/projects/:projectId/train")
.post(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/train")
.header("training-key", "")
.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}}/projects/:projectId/train');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/train',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/train';
const options = {method: 'POST', headers: {'training-key': ''}};
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}}/projects/:projectId/train',
method: 'POST',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/train")
.post(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/train',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/train',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/train');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/train',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/train';
const options = {method: 'POST', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/train"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/train" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/train",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/train', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/train');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/train');
$request->setRequestMethod('POST');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/train' -Method POST -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/train' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("POST", "/baseUrl/projects/:projectId/train", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/train"
headers = {"training-key": ""}
response = requests.post(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/train"
response <- VERB("POST", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/train")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/:projectId/train') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/train";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/train \
--header 'training-key: '
http POST {{baseUrl}}/projects/:projectId/train \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/train
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/train")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
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()
PATCH
Update a specific iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId
HEADERS
Training-Key
QUERY PARAMS
projectId
iterationId
BODY json
{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/iterations/:iterationId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/projects/:projectId/iterations/:iterationId" {:headers {:training-key ""}
:content-type :json
:form-params {:classificationType ""
:created ""
:domainId ""
:exportable false
:id ""
:isDefault false
:lastModified ""
:name ""
:projectId ""
:status ""
:trainedAt ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\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}}/projects/:projectId/iterations/:iterationId"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\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}}/projects/:projectId/iterations/:iterationId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
payload := strings.NewReader("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/iterations/:iterationId HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 212
{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId"))
.header("training-key", "")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\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 \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.patch(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}")
.asString();
const data = JSON.stringify({
classificationType: '',
created: '',
domainId: '',
exportable: false,
id: '',
isDefault: false,
lastModified: '',
name: '',
projectId: '',
status: '',
trainedAt: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/projects/:projectId/iterations/:iterationId');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
classificationType: '',
created: '',
domainId: '',
exportable: false,
id: '',
isDefault: false,
lastModified: '',
name: '',
projectId: '',
status: '',
trainedAt: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId';
const options = {
method: 'PATCH',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"classificationType":"","created":"","domainId":"","exportable":false,"id":"","isDefault":false,"lastModified":"","name":"","projectId":"","status":"","trainedAt":""}'
};
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}}/projects/:projectId/iterations/:iterationId',
method: 'PATCH',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "classificationType": "",\n "created": "",\n "domainId": "",\n "exportable": false,\n "id": "",\n "isDefault": false,\n "lastModified": "",\n "name": "",\n "projectId": "",\n "status": "",\n "trainedAt": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.patch(body)
.addHeader("training-key", "")
.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/projects/:projectId/iterations/:iterationId',
headers: {
'training-key': '',
'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({
classificationType: '',
created: '',
domainId: '',
exportable: false,
id: '',
isDefault: false,
lastModified: '',
name: '',
projectId: '',
status: '',
trainedAt: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {
classificationType: '',
created: '',
domainId: '',
exportable: false,
id: '',
isDefault: false,
lastModified: '',
name: '',
projectId: '',
status: '',
trainedAt: ''
},
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}}/projects/:projectId/iterations/:iterationId');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
classificationType: '',
created: '',
domainId: '',
exportable: false,
id: '',
isDefault: false,
lastModified: '',
name: '',
projectId: '',
status: '',
trainedAt: ''
});
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}}/projects/:projectId/iterations/:iterationId',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
classificationType: '',
created: '',
domainId: '',
exportable: false,
id: '',
isDefault: false,
lastModified: '',
name: '',
projectId: '',
status: '',
trainedAt: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId';
const options = {
method: 'PATCH',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"classificationType":"","created":"","domainId":"","exportable":false,"id":"","isDefault":false,"lastModified":"","name":"","projectId":"","status":"","trainedAt":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"classificationType": @"",
@"created": @"",
@"domainId": @"",
@"exportable": @NO,
@"id": @"",
@"isDefault": @NO,
@"lastModified": @"",
@"name": @"",
@"projectId": @"",
@"status": @"",
@"trainedAt": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId"]
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}}/projects/:projectId/iterations/:iterationId" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId",
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([
'classificationType' => '',
'created' => '',
'domainId' => '',
'exportable' => null,
'id' => '',
'isDefault' => null,
'lastModified' => '',
'name' => '',
'projectId' => '',
'status' => '',
'trainedAt' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/projects/:projectId/iterations/:iterationId', [
'body' => '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'classificationType' => '',
'created' => '',
'domainId' => '',
'exportable' => null,
'id' => '',
'isDefault' => null,
'lastModified' => '',
'name' => '',
'projectId' => '',
'status' => '',
'trainedAt' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'classificationType' => '',
'created' => '',
'domainId' => '',
'exportable' => null,
'id' => '',
'isDefault' => null,
'lastModified' => '',
'name' => '',
'projectId' => '',
'status' => '',
'trainedAt' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/projects/:projectId/iterations/:iterationId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
payload = {
"classificationType": "",
"created": "",
"domainId": "",
"exportable": False,
"id": "",
"isDefault": False,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
}
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
payload <- "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\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/projects/:projectId/iterations/:iterationId') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"id\": \"\",\n \"isDefault\": false,\n \"lastModified\": \"\",\n \"name\": \"\",\n \"projectId\": \"\",\n \"status\": \"\",\n \"trainedAt\": \"\"\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}}/projects/:projectId/iterations/:iterationId";
let payload = json!({
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/iterations/:iterationId \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
}'
echo '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
}' | \
http PATCH {{baseUrl}}/projects/:projectId/iterations/:iterationId \
content-type:application/json \
training-key:''
wget --quiet \
--method PATCH \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "classificationType": "",\n "created": "",\n "domainId": "",\n "exportable": false,\n "id": "",\n "isDefault": false,\n "lastModified": "",\n "name": "",\n "projectId": "",\n "status": "",\n "trainedAt": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = [
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"id": "",
"isDefault": false,
"lastModified": "",
"name": "",
"projectId": "",
"status": "",
"trainedAt": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId")! 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()
PATCH
Update a specific project.
{{baseUrl}}/projects/:projectId
HEADERS
Training-Key
QUERY PARAMS
projectId
BODY json
{
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"domainId": ""
},
"thumbnailUri": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/projects/:projectId" {:headers {:training-key ""}
:content-type :json
:form-params {:created ""
:description ""
:id ""
:lastModified ""
:name ""
:settings {:classificationType ""
:domainId ""}
:thumbnailUri ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\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}}/projects/:projectId"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\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}}/projects/:projectId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId"
payload := strings.NewReader("{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 180
{
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"domainId": ""
},
"thumbnailUri": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/projects/:projectId")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId"))
.header("training-key", "")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\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 \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.patch(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/projects/:projectId")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}")
.asString();
const data = JSON.stringify({
created: '',
description: '',
id: '',
lastModified: '',
name: '',
settings: {
classificationType: '',
domainId: ''
},
thumbnailUri: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/projects/:projectId');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
created: '',
description: '',
id: '',
lastModified: '',
name: '',
settings: {classificationType: '', domainId: ''},
thumbnailUri: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId';
const options = {
method: 'PATCH',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"created":"","description":"","id":"","lastModified":"","name":"","settings":{"classificationType":"","domainId":""},"thumbnailUri":""}'
};
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}}/projects/:projectId',
method: 'PATCH',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "created": "",\n "description": "",\n "id": "",\n "lastModified": "",\n "name": "",\n "settings": {\n "classificationType": "",\n "domainId": ""\n },\n "thumbnailUri": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.patch(body)
.addHeader("training-key", "")
.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/projects/:projectId',
headers: {
'training-key': '',
'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({
created: '',
description: '',
id: '',
lastModified: '',
name: '',
settings: {classificationType: '', domainId: ''},
thumbnailUri: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {
created: '',
description: '',
id: '',
lastModified: '',
name: '',
settings: {classificationType: '', domainId: ''},
thumbnailUri: ''
},
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}}/projects/:projectId');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
created: '',
description: '',
id: '',
lastModified: '',
name: '',
settings: {
classificationType: '',
domainId: ''
},
thumbnailUri: ''
});
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}}/projects/:projectId',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {
created: '',
description: '',
id: '',
lastModified: '',
name: '',
settings: {classificationType: '', domainId: ''},
thumbnailUri: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId';
const options = {
method: 'PATCH',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"created":"","description":"","id":"","lastModified":"","name":"","settings":{"classificationType":"","domainId":""},"thumbnailUri":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created": @"",
@"description": @"",
@"id": @"",
@"lastModified": @"",
@"name": @"",
@"settings": @{ @"classificationType": @"", @"domainId": @"" },
@"thumbnailUri": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId"]
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}}/projects/:projectId" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId",
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([
'created' => '',
'description' => '',
'id' => '',
'lastModified' => '',
'name' => '',
'settings' => [
'classificationType' => '',
'domainId' => ''
],
'thumbnailUri' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/projects/:projectId', [
'body' => '{
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"domainId": ""
},
"thumbnailUri": ""
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created' => '',
'description' => '',
'id' => '',
'lastModified' => '',
'name' => '',
'settings' => [
'classificationType' => '',
'domainId' => ''
],
'thumbnailUri' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created' => '',
'description' => '',
'id' => '',
'lastModified' => '',
'name' => '',
'settings' => [
'classificationType' => '',
'domainId' => ''
],
'thumbnailUri' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"domainId": ""
},
"thumbnailUri": ""
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"domainId": ""
},
"thumbnailUri": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/projects/:projectId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId"
payload = {
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"domainId": ""
},
"thumbnailUri": ""
}
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId"
payload <- "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\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/projects/:projectId') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"created\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"domainId\": \"\"\n },\n \"thumbnailUri\": \"\"\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}}/projects/:projectId";
let payload = json!({
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": json!({
"classificationType": "",
"domainId": ""
}),
"thumbnailUri": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"domainId": ""
},
"thumbnailUri": ""
}'
echo '{
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"domainId": ""
},
"thumbnailUri": ""
}' | \
http PATCH {{baseUrl}}/projects/:projectId \
content-type:application/json \
training-key:''
wget --quiet \
--method PATCH \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "created": "",\n "description": "",\n "id": "",\n "lastModified": "",\n "name": "",\n "settings": {\n "classificationType": "",\n "domainId": ""\n },\n "thumbnailUri": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = [
"created": "",
"description": "",
"id": "",
"lastModified": "",
"name": "",
"settings": [
"classificationType": "",
"domainId": ""
],
"thumbnailUri": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId")! 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()
POST
Create a tag for the project.
{{baseUrl}}/projects/:projectId/tags
HEADERS
Training-Key
QUERY PARAMS
name
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/tags?name=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/tags" {:headers {:training-key ""}
:query-params {:name ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags?name="
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.post url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tags?name="),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/tags?name=");
var request = new RestRequest("", Method.Post);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/tags?name="
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/tags?name= HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/tags?name=")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags?name="))
.header("training-key", "")
.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}}/projects/:projectId/tags?name=")
.post(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/tags?name=")
.header("training-key", "")
.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}}/projects/:projectId/tags?name=');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/tags',
params: {name: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/tags?name=';
const options = {method: 'POST', headers: {'training-key': ''}};
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}}/projects/:projectId/tags?name=',
method: 'POST',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags?name=")
.post(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/tags?name=',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/tags',
qs: {name: ''},
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/tags');
req.query({
name: ''
});
req.headers({
'training-key': ''
});
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}}/projects/:projectId/tags',
params: {name: ''},
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/tags?name=';
const options = {method: 'POST', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags?name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/tags?name=" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/tags?name=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/tags?name=', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'name' => ''
]);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/tags');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'name' => ''
]));
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags?name=' -Method POST -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags?name=' -Method POST -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("POST", "/baseUrl/projects/:projectId/tags?name=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags"
querystring = {"name":""}
headers = {"training-key": ""}
response = requests.post(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags"
queryString <- list(name = "")
response <- VERB("POST", url, query = queryString, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/tags?name=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/:projectId/tags') do |req|
req.headers['training-key'] = ''
req.params['name'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/tags";
let querystring = [
("name", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/:projectId/tags?name=' \
--header 'training-key: '
http POST '{{baseUrl}}/projects/:projectId/tags?name=' \
training-key:''
wget --quiet \
--method POST \
--header 'training-key: ' \
--output-document \
- '{{baseUrl}}/projects/:projectId/tags?name='
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags?name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete a tag from the project.
{{baseUrl}}/projects/:projectId/tags/:tagId
HEADERS
Training-Key
QUERY PARAMS
projectId
tagId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/tags/:tagId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/tags/:tagId" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tags/:tagId"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/tags/:tagId");
var request = new RestRequest("", Method.Delete);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/tags/:tagId"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId/tags/:tagId HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/tags/:tagId")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags/:tagId"))
.header("training-key", "")
.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}}/projects/:projectId/tags/:tagId")
.delete(null)
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/tags/:tagId")
.header("training-key", "")
.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}}/projects/:projectId/tags/:tagId');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/tags/:tagId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/tags/:tagId';
const options = {method: 'DELETE', headers: {'training-key': ''}};
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}}/projects/:projectId/tags/:tagId',
method: 'DELETE',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags/:tagId")
.delete(null)
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/tags/:tagId',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/tags/:tagId',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/projects/:projectId/tags/:tagId');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/tags/:tagId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/tags/:tagId';
const options = {method: 'DELETE', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags/:tagId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/tags/:tagId" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/tags/:tagId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/projects/:projectId/tags/:tagId', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("DELETE", "/baseUrl/projects/:projectId/tags/:tagId", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
headers = {"training-key": ""}
response = requests.delete(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags/:tagId"
response <- VERB("DELETE", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/tags/:tagId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/projects/:projectId/tags/:tagId') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/tags/:tagId";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/projects/:projectId/tags/:tagId \
--header 'training-key: '
http DELETE {{baseUrl}}/projects/:projectId/tags/:tagId \
training-key:''
wget --quiet \
--method DELETE \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/tags/:tagId
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags/:tagId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
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
Get information about a specific tag.
{{baseUrl}}/projects/:projectId/tags/:tagId
HEADERS
Training-Key
QUERY PARAMS
projectId
tagId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/tags/:tagId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/tags/:tagId" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tags/:tagId"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/tags/:tagId");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/tags/:tagId"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/tags/:tagId HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/tags/:tagId")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags/:tagId"))
.header("training-key", "")
.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}}/projects/:projectId/tags/:tagId")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/tags/:tagId")
.header("training-key", "")
.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}}/projects/:projectId/tags/:tagId');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/tags/:tagId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/tags/:tagId';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/tags/:tagId',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags/:tagId")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/tags/:tagId',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/tags/:tagId',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/tags/:tagId');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/tags/:tagId',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/tags/:tagId';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags/:tagId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/tags/:tagId" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/tags/:tagId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/tags/:tagId', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/tags/:tagId", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags/:tagId"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/tags/:tagId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/tags/:tagId') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/tags/:tagId";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/tags/:tagId \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/tags/:tagId \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/tags/:tagId
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags/:tagId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get the tags for a given project and iteration.
{{baseUrl}}/projects/:projectId/tags
HEADERS
Training-Key
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/tags");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/tags" {:headers {:training-key ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags"
headers = HTTP::Headers{
"training-key" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tags"),
Headers =
{
{ "training-key", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/tags");
var request = new RestRequest("", Method.Get);
request.AddHeader("training-key", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/tags"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("training-key", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/tags HTTP/1.1
Training-Key:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/tags")
.setHeader("training-key", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags"))
.header("training-key", "")
.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}}/projects/:projectId/tags")
.get()
.addHeader("training-key", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/tags")
.header("training-key", "")
.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}}/projects/:projectId/tags');
xhr.setRequestHeader('training-key', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/tags',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/tags';
const options = {method: 'GET', headers: {'training-key': ''}};
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}}/projects/:projectId/tags',
method: 'GET',
headers: {
'training-key': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags")
.get()
.addHeader("training-key", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/tags',
headers: {
'training-key': ''
}
};
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}}/projects/:projectId/tags',
headers: {'training-key': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/tags');
req.headers({
'training-key': ''
});
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}}/projects/:projectId/tags',
headers: {'training-key': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/tags';
const options = {method: 'GET', headers: {'training-key': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/projects/:projectId/tags" in
let headers = Header.add (Header.init ()) "training-key" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/tags', [
'headers' => [
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'training-key' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/tags');
$request->setRequestMethod('GET');
$request->setHeaders([
'training-key' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags' -Method GET -Headers $headers
$headers=@{}
$headers.Add("training-key", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'training-key': "" }
conn.request("GET", "/baseUrl/projects/:projectId/tags", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags"
headers = {"training-key": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags"
response <- VERB("GET", url, add_headers('training-key' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/tags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["training-key"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/tags') do |req|
req.headers['training-key'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/tags";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/tags \
--header 'training-key: '
http GET {{baseUrl}}/projects/:projectId/tags \
training-key:''
wget --quiet \
--method GET \
--header 'training-key: ' \
--output-document \
- {{baseUrl}}/projects/:projectId/tags
import Foundation
let headers = ["training-key": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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()
PATCH
Update a tag.
{{baseUrl}}/projects/:projectId/tags/:tagId
HEADERS
Training-Key
QUERY PARAMS
projectId
tagId
BODY json
{
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/tags/:tagId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "training-key: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/projects/:projectId/tags/:tagId" {:headers {:training-key ""}
:content-type :json
:form-params {:description ""
:id ""
:imageCount 0
:name ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
headers = HTTP::Headers{
"training-key" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/tags/:tagId"),
Headers =
{
{ "training-key", "" },
},
Content = new StringContent("{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/tags/:tagId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("training-key", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/tags/:tagId"
payload := strings.NewReader("{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("training-key", "")
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/projects/:projectId/tags/:tagId HTTP/1.1
Training-Key:
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/projects/:projectId/tags/:tagId")
.setHeader("training-key", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags/:tagId"))
.header("training-key", "")
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags/:tagId")
.patch(body)
.addHeader("training-key", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/projects/:projectId/tags/:tagId")
.header("training-key", "")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
id: '',
imageCount: 0,
name: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/projects/:projectId/tags/:tagId');
xhr.setRequestHeader('training-key', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId/tags/:tagId',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {description: '', id: '', imageCount: 0, name: '', type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/tags/:tagId';
const options = {
method: 'PATCH',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"description":"","id":"","imageCount":0,"name":"","type":""}'
};
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}}/projects/:projectId/tags/:tagId',
method: 'PATCH',
headers: {
'training-key': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "id": "",\n "imageCount": 0,\n "name": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags/:tagId")
.patch(body)
.addHeader("training-key", "")
.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/projects/:projectId/tags/:tagId',
headers: {
'training-key': '',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', id: '', imageCount: 0, name: '', type: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId/tags/:tagId',
headers: {'training-key': '', 'content-type': 'application/json'},
body: {description: '', id: '', imageCount: 0, name: '', type: ''},
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}}/projects/:projectId/tags/:tagId');
req.headers({
'training-key': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
id: '',
imageCount: 0,
name: '',
type: ''
});
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}}/projects/:projectId/tags/:tagId',
headers: {'training-key': '', 'content-type': 'application/json'},
data: {description: '', id: '', imageCount: 0, name: '', type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/:projectId/tags/:tagId';
const options = {
method: 'PATCH',
headers: {'training-key': '', 'content-type': 'application/json'},
body: '{"description":"","id":"","imageCount":0,"name":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"training-key": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"id": @"",
@"imageCount": @0,
@"name": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags/:tagId"]
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}}/projects/:projectId/tags/:tagId" in
let headers = Header.add_list (Header.init ()) [
("training-key", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/tags/:tagId",
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([
'description' => '',
'id' => '',
'imageCount' => 0,
'name' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"training-key: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/projects/:projectId/tags/:tagId', [
'body' => '{
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
'training-key' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'id' => '',
'imageCount' => 0,
'name' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'id' => '',
'imageCount' => 0,
'name' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'training-key' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}'
$headers=@{}
$headers.Add("training-key", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}"
headers = {
'training-key': "",
'content-type': "application/json"
}
conn.request("PATCH", "/baseUrl/projects/:projectId/tags/:tagId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
payload = {
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}
headers = {
"training-key": "",
"content-type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags/:tagId"
payload <- "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, add_headers('training-key' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/tags/:tagId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["training-key"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\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/projects/:projectId/tags/:tagId') do |req|
req.headers['training-key'] = ''
req.body = "{\n \"description\": \"\",\n \"id\": \"\",\n \"imageCount\": 0,\n \"name\": \"\",\n \"type\": \"\"\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}}/projects/:projectId/tags/:tagId";
let payload = json!({
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("training-key", "".parse().unwrap());
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}}/projects/:projectId/tags/:tagId \
--header 'content-type: application/json' \
--header 'training-key: ' \
--data '{
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}'
echo '{
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}' | \
http PATCH {{baseUrl}}/projects/:projectId/tags/:tagId \
content-type:application/json \
training-key:''
wget --quiet \
--method PATCH \
--header 'training-key: ' \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "id": "",\n "imageCount": 0,\n "name": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/tags/:tagId
import Foundation
let headers = [
"training-key": "",
"content-type": "application/json"
]
let parameters = [
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags/:tagId")! 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()