Custom Vision Training Client
GET
Get a list of the available domains.
{{baseUrl}}/domains
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains")
require "http/client"
url = "{{baseUrl}}/domains"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains"),
};
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);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains")
.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.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains'};
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.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'};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains" in
Client.call `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",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains');
echo $response->getBody();
setUrl('{{baseUrl}}/domains');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains"
response <- VERB("GET", url, 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)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains
http GET {{baseUrl}}/domains
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"enabled": true,
"exportable": false,
"id": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"name": "General",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "c151d5b5-dd07-472a-acc8-15d29dea8518",
"name": "Food",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "ca455789-012d-4b50-9fec-5bb63841c793",
"name": "Landmarks",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"name": "Retail",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "45badf75-3591-4f26-a705-45678d3e9f5f",
"name": "Adult",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "0732100f-1a38-4e49-a514-c9b44c697ab5",
"name": "General (compact)",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "b5cfd229-2ac7-4b2b-8d0a-2b0661344894",
"name": "Landmarks (compact)",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "6b4faeda-8396-481b-9f8b-177b9fa3097f",
"name": "Retail (compact)",
"type": "Classification"
}
]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[
{
"enabled": true,
"exportable": false,
"id": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"name": "General",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "c151d5b5-dd07-472a-acc8-15d29dea8518",
"name": "Food",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "ca455789-012d-4b50-9fec-5bb63841c793",
"name": "Landmarks",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"name": "Retail",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "45badf75-3591-4f26-a705-45678d3e9f5f",
"name": "Adult",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "0732100f-1a38-4e49-a514-c9b44c697ab5",
"name": "General (compact)",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "b5cfd229-2ac7-4b2b-8d0a-2b0661344894",
"name": "Landmarks (compact)",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "6b4faeda-8396-481b-9f8b-177b9fa3097f",
"name": "Retail (compact)",
"type": "Classification"
}
]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[
{
"enabled": true,
"exportable": false,
"id": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"name": "General",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "c151d5b5-dd07-472a-acc8-15d29dea8518",
"name": "Food",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "ca455789-012d-4b50-9fec-5bb63841c793",
"name": "Landmarks",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"name": "Retail",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "45badf75-3591-4f26-a705-45678d3e9f5f",
"name": "Adult",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "0732100f-1a38-4e49-a514-c9b44c697ab5",
"name": "General (compact)",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "b5cfd229-2ac7-4b2b-8d0a-2b0661344894",
"name": "Landmarks (compact)",
"type": "Classification"
},
{
"enabled": true,
"exportable": false,
"id": "6b4faeda-8396-481b-9f8b-177b9fa3097f",
"name": "Retail (compact)",
"type": "Classification"
}
]
GET
Get information about a specific domain.
{{baseUrl}}/domains/:domainId
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domainId")
require "http/client"
url = "{{baseUrl}}/domains/:domainId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domainId"),
};
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);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domainId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domainId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domainId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domainId"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domainId")
.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.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domainId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domainId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domainId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domainId")
.get()
.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: {}
};
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'};
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.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'};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domainId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domainId" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domainId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domainId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domainId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domainId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domainId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domainId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domainId"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domainId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domainId
http GET {{baseUrl}}/domains/:domainId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domainId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domainId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"enabled": true,
"exportable": false,
"id": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"name": "Retail",
"type": "Classification"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"enabled": true,
"exportable": false,
"id": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"name": "Retail",
"type": "Classification"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"enabled": true,
"exportable": false,
"id": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"name": "Retail",
"type": "Classification"
}
POST
Add the provided batch of images to the set of training images.
{{baseUrl}}/projects/:projectId/images/files
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, "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" {: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{
"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"),
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("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("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
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("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("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("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/files")
.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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/files',
headers: {'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: {'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: {
'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("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: {
'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: {'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({
'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: {'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: {'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 = @{ @"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 (Header.init ()) "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"
],
]);
$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',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/files');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'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([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/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("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 = { '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 = {"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, 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["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.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("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' \
--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
wget --quiet \
--method POST \
--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 = ["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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
POST
Add the provided images to the set of training images.
{{baseUrl}}/projects/:projectId/images
QUERY PARAMS
projectId
BODY multipartForm
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, "content-type: multipart/form-data; boundary=---011000010111000001101001");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images" {:multipart [{:name "imageData"
:content ""}]})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images"
headers = HTTP::Headers{
"content-type" => "multipart/form-data; boundary=---011000010111000001101001"
}
reqBody = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\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"),
Content = new MultipartFormDataContent
{
new StringContent("")
{
Headers =
{
ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "imageData",
}
}
},
},
};
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("content-type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
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
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
Content-Length: 118
-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images")
.setHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.setBody("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images"))
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
const data = new FormData();
data.append('imageData', '');
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.send(data);
import axios from 'axios';
const form = new FormData();
form.append('imageData', '');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '[form]'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images';
const form = new FormData();
form.append('imageData', '');
const options = {method: 'POST'};
options.body = form;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const form = new FormData();
form.append('imageData', '');
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/images',
method: 'POST',
headers: {},
processData: false,
contentType: false,
mimeType: 'multipart/form-data',
data: form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.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: {
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
}
};
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('-----011000010111000001101001\r\nContent-Disposition: form-data; name="imageData"\r\n\r\n\r\n-----011000010111000001101001--\r\n');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
formData: {imageData: ''}
};
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({
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
});
req.multipart([]);
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: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '-----011000010111000001101001\r\nContent-Disposition: form-data; name="imageData"\r\n\r\n\r\n-----011000010111000001101001--\r\n'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const FormData = require('form-data');
const fetch = require('node-fetch');
const formData = new FormData();
formData.append('imageData', '');
const url = '{{baseUrl}}/projects/:projectId/images';
const options = {method: 'POST'};
options.body = formData;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"multipart/form-data; boundary=---011000010111000001101001" };
NSArray *parameters = @[ @{ @"name": @"imageData", @"value": @"" } ];
NSString *boundary = @"---011000010111000001101001";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images"]
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" in
let headers = Header.add (Header.init ()) "content-type" "multipart/form-data; boundary=---011000010111000001101001" in
let body = Cohttp_lwt_body.of_string "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" in
Client.call ~headers ~body `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_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
CURLOPT_HTTPHEADER => [
"content-type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$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' => [
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001'
]);
$request->setBody('-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
addForm(null, null);
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/images');
$request->setRequestMethod('POST');
$request->setBody($body);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
'
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = { 'content-type': "multipart/form-data; boundary=---011000010111000001101001" }
conn.request("POST", "/baseUrl/projects/:projectId/images", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {"content-type": "multipart/form-data; boundary=---011000010111000001101001"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images"
payload <- "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
encode <- "multipart"
response <- VERB("POST", url, body = payload, content_type("multipart/form-data"), encode = encode)
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["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001'}
)
response = conn.post('/baseUrl/projects/:projectId/images') do |req|
req.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images";
let form = reqwest::multipart::Form::new()
.text("imageData", "");
let mut headers = reqwest::header::HeaderMap::new();
let client = reqwest::Client::new();
let response = client.post(url)
.multipart(form)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/images \
--header 'content-type: multipart/form-data' \
--form imageData=
echo '-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
' | \
http POST {{baseUrl}}/projects/:projectId/images \
content-type:'multipart/form-data; boundary=---011000010111000001101001'
wget --quiet \
--method POST \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--body-data '-----011000010111000001101001\r\nContent-Disposition: form-data; name="imageData"\r\n\r\n\r\n-----011000010111000001101001--\r\n' \
--output-document \
- {{baseUrl}}/projects/:projectId/images
import Foundation
let headers = ["content-type": "multipart/form-data; boundary=---011000010111000001101001"]
let parameters = [
[
"name": "imageData",
"value": ""
]
]
let boundary = "---011000010111000001101001"
var body = ""
var error: NSError? = nil
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["content-type"]!
let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
if (error != nil) {
print(error as Any)
}
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
},
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 1531,
"id": "f1855a92-b873-47e7-b513-f07a667ceda1",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 900
},
"sourceUrl": "\"hemlock_6.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
},
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 1531,
"id": "f1855a92-b873-47e7-b513-f07a667ceda1",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 900
},
"sourceUrl": "\"hemlock_6.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
},
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 1531,
"id": "f1855a92-b873-47e7-b513-f07a667ceda1",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 900
},
"sourceUrl": "\"hemlock_6.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
POST
Add the provided images urls to the set of training images.
{{baseUrl}}/projects/:projectId/images/urls
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, "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" {: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{
"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"),
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("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("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
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("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("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("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/urls")
.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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/urls',
headers: {'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: {'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: {
'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("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: {
'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: {'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({
'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: {'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: {'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 = @{ @"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 (Header.init ()) "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"
],
]);
$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',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/urls');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'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([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/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("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 = { '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 = {"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, 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["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.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("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' \
--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
wget --quiet \
--method POST \
--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 = ["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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag name"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "{url to image}",
"status": "OK"
}
],
"isBatchSuccessful": true
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag name"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "{url to image}",
"status": "OK"
}
],
"isBatchSuccessful": true
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag name"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "{url to image}",
"status": "OK"
}
],
"isBatchSuccessful": true
}
POST
Add the specified predicted images to the set of training images.
{{baseUrl}}/projects/:projectId/images/predictions
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, "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" {: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{
"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"),
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("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("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
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("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("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("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/predictions")
.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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/predictions',
headers: {'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: {'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: {
'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("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: {
'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: {'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({
'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: {'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: {'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 = @{ @"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 (Header.init ()) "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"
],
]);
$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',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/predictions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'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([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/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("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 = { '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 = {"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, 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["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.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("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' \
--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
wget --quiet \
--method POST \
--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 = ["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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"images": [
{
"image": {
"created": "2017-12-19T15:56:10Z",
"height": 900,
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"originalImageUri": "{Image Uri}",
"resizedImageUri": "{Resized Image Uri}",
"tags": [
{
"created": "2017-12-19T15:56:09Z",
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"tagName": "tag 1"
}
],
"thumbnailUri": "{Thumbnail Uri}",
"width": 1095
},
"sourceUrl": "\"hemlock_10.jpg\"",
"status": "OK"
}
],
"isBatchSuccessful": true
}
POST
Associate a set of images with a set of tags.
{{baseUrl}}/projects/:projectId/images/tags
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, "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" {:content-type :json
:form-params {:tags [{:imageId ""
:tagId ""}]}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/tags"
headers = HTTP::Headers{
"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"),
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("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("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
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("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("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("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/tags")
.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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/tags',
headers: {'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: {'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: {
'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("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: {
'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: {'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({
'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: {'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: {'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 = @{ @"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 (Header.init ()) "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"
],
]);
$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',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/tags');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'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([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}'
$headers=@{}
$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 = { '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 = {"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, 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["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.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("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' \
--data '{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}'
echo '{
"tags": [
{
"imageId": "",
"tagId": ""
}
]
}' | \
http POST {{baseUrl}}/projects/:projectId/images/tags \
content-type:application/json
wget --quiet \
--method POST \
--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 = ["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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": [
{
"imageId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a"
}
]
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": [
{
"imageId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a"
}
]
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": [
{
"imageId": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a"
}
]
}
POST
Create a set of image regions.
{{baseUrl}}/projects/:projectId/images/regions
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, "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" {:content-type :json
:form-params {:regions [{:height ""
:imageId ""
:left ""
:tagId ""
:top ""
:width ""}]}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/regions"
headers = HTTP::Headers{
"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"),
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("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("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
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("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("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("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/regions")
.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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/regions',
headers: {'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: {'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: {
'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("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: {
'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: {'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({
'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: {'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: {'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 = @{ @"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 (Header.init ()) "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"
],
]);
$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',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/regions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'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([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/regions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"regions": [
{
"height": "",
"imageId": "",
"left": "",
"tagId": "",
"top": "",
"width": ""
}
]
}'
$headers=@{}
$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 = { '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 = {"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, 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["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.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("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' \
--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
wget --quiet \
--method POST \
--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 = ["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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": [],
"duplicated": [],
"exceeded": []
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": [],
"duplicated": [],
"exceeded": []
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": [],
"duplicated": [],
"exceeded": []
}
DELETE
Delete a set of image regions.
{{baseUrl}}/projects/:projectId/images/regions
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=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/images/regions" {:query-params {:regionIds ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/regions?regionIds="
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/regions?regionIds="),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/images/regions?regionIds=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/regions?regionIds="))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/images/regions?regionIds=")
.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.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/images/regions',
params: {regionIds: ''}
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/regions?regionIds=")
.delete(null)
.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: {}
};
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: ''}
};
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.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: ''}
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/regions?regionIds="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images/regions?regionIds=" in
Client.call `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",
]);
$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=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/regions');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'regionIds' => ''
]);
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' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/regions?regionIds=' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/regions?regionIds=' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/images/regions?regionIds=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/regions"
querystring = {"regionIds":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/regions"
queryString <- list(regionIds = "")
response <- VERB("DELETE", url, query = queryString, 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)
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.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 client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/projects/:projectId/images/regions?regionIds='
http DELETE '{{baseUrl}}/projects/:projectId/images/regions?regionIds='
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/projects/:projectId/images/regions?regionIds='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/regions?regionIds=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete images from the set of training images.
{{baseUrl}}/projects/:projectId/images
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/images");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/images")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images"),
};
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.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId/images HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/images")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images"))
.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")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/images")
.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');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/images'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/images',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images")
.delete(null)
.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',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/images'
};
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.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'
};
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: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images" in
Client.call `DELETE 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 => "DELETE",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/images")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images"
response <- VERB("DELETE", url, 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::Delete.new(url)
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|
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 client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/projects/:projectId/images
http DELETE {{baseUrl}}/projects/:projectId/images
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/projects/:projectId/images
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Get count of images whose suggested tags match given tags and their probabilities are greater than or equal to the given threshold. Returns count as 0 if none found.
{{baseUrl}}/projects/:projectId/images/suggested/count
QUERY PARAMS
iterationId
projectId
BODY json
{
"tagIds": [],
"threshold": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tagIds\": [],\n \"threshold\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images/suggested/count" {:query-params {:iterationId ""}
:content-type :json
:form-params {:tagIds []
:threshold ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"tagIds\": [],\n \"threshold\": \"\"\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/suggested/count?iterationId="),
Content = new StringContent("{\n \"tagIds\": [],\n \"threshold\": \"\"\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/suggested/count?iterationId=");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tagIds\": [],\n \"threshold\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId="
payload := strings.NewReader("{\n \"tagIds\": [],\n \"threshold\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/images/suggested/count?iterationId= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"tagIds": [],
"threshold": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=")
.setHeader("content-type", "application/json")
.setBody("{\n \"tagIds\": [],\n \"threshold\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId="))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tagIds\": [],\n \"threshold\": \"\"\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 \"tagIds\": [],\n \"threshold\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=")
.header("content-type", "application/json")
.body("{\n \"tagIds\": [],\n \"threshold\": \"\"\n}")
.asString();
const data = JSON.stringify({
tagIds: [],
threshold: ''
});
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/suggested/count?iterationId=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/suggested/count',
params: {iterationId: ''},
headers: {'content-type': 'application/json'},
data: {tagIds: [], threshold: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tagIds":[],"threshold":""}'
};
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/suggested/count?iterationId=',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "tagIds": [],\n "threshold": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"tagIds\": [],\n \"threshold\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/suggested/count?iterationId=',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tagIds: [], threshold: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/suggested/count',
qs: {iterationId: ''},
headers: {'content-type': 'application/json'},
body: {tagIds: [], threshold: ''},
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/suggested/count');
req.query({
iterationId: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
tagIds: [],
threshold: ''
});
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/suggested/count',
params: {iterationId: ''},
headers: {'content-type': 'application/json'},
data: {tagIds: [], threshold: ''}
};
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/suggested/count?iterationId=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tagIds":[],"threshold":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tagIds": @[ ],
@"threshold": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId="]
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/suggested/count?iterationId=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"tagIds\": [],\n \"threshold\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=",
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([
'tagIds' => [
],
'threshold' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=', [
'body' => '{
"tagIds": [],
"threshold": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/suggested/count');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'iterationId' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tagIds' => [
],
'threshold' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tagIds' => [
],
'threshold' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/images/suggested/count');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'iterationId' => ''
]));
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tagIds": [],
"threshold": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tagIds": [],
"threshold": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tagIds\": [],\n \"threshold\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/images/suggested/count?iterationId=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/suggested/count"
querystring = {"iterationId":""}
payload = {
"tagIds": [],
"threshold": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/suggested/count"
queryString <- list(iterationId = "")
payload <- "{\n \"tagIds\": [],\n \"threshold\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"tagIds\": [],\n \"threshold\": \"\"\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/suggested/count') do |req|
req.params['iterationId'] = ''
req.body = "{\n \"tagIds\": [],\n \"threshold\": \"\"\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/suggested/count";
let querystring = [
("iterationId", ""),
];
let payload = json!({
"tagIds": (),
"threshold": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=' \
--header 'content-type: application/json' \
--data '{
"tagIds": [],
"threshold": ""
}'
echo '{
"tagIds": [],
"threshold": ""
}' | \
http POST '{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=' \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "tagIds": [],\n "threshold": ""\n}' \
--output-document \
- '{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"tagIds": [],
"threshold": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/suggested/count?iterationId=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"b5f7e6a2-a481-49a6-afec-a7cef1af3544": 1
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"b5f7e6a2-a481-49a6-afec-a7cef1af3544": 1
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"b5f7e6a2-a481-49a6-afec-a7cef1af3544": 1
}
GET
Get images by id for a given project iteration.
{{baseUrl}}/projects/:projectId/images/id
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/id")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/id"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/id"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/id")
.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.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/id'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/id")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images/id" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/images/id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/id"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/id
http GET {{baseUrl}}/projects/:projectId/images/id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/images/id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[]
GET
Get tagged images for a given project iteration.
{{baseUrl}}/projects/:projectId/images/tagged
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/tagged")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/tagged"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/tagged"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/tagged")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/tagged"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/tagged")
.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.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/tagged'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/tagged")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/tagged"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images/tagged" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/tagged');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/tagged');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/tagged' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/tagged' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/images/tagged")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/tagged"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/tagged"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/tagged";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/tagged
http GET {{baseUrl}}/projects/:projectId/images/tagged
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/images/tagged
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/tagged")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[]
GET
Get untagged images for a given project iteration.
{{baseUrl}}/projects/:projectId/images/untagged
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/untagged")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/untagged"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/untagged"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/untagged")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/untagged"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/untagged")
.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.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/untagged'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/untagged")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/untagged"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images/untagged" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/untagged');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/untagged');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/untagged' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/untagged' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/images/untagged")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/untagged"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/untagged"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/untagged";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/untagged
http GET {{baseUrl}}/projects/:projectId/images/untagged
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/images/untagged
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/untagged")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[]
POST
Get untagged images whose suggested tags match given tags. Returns empty array if no images are found.
{{baseUrl}}/projects/:projectId/images/suggested
QUERY PARAMS
iterationId
projectId
BODY json
{
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/images/suggested?iterationId=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images/suggested" {:query-params {:iterationId ""}
:content-type :json
:form-params {:continuation ""
:maxCount 0
:session ""
:sortBy ""
:tagIds []
:threshold ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/suggested?iterationId="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\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/suggested?iterationId="),
Content = new StringContent("{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\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/suggested?iterationId=");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/suggested?iterationId="
payload := strings.NewReader("{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/images/suggested?iterationId= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 109
{
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images/suggested?iterationId=")
.setHeader("content-type", "application/json")
.setBody("{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/suggested?iterationId="))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\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 \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/suggested?iterationId=")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/suggested?iterationId=")
.header("content-type", "application/json")
.body("{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}")
.asString();
const data = JSON.stringify({
continuation: '',
maxCount: 0,
session: '',
sortBy: '',
tagIds: [],
threshold: ''
});
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/suggested?iterationId=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/suggested',
params: {iterationId: ''},
headers: {'content-type': 'application/json'},
data: {
continuation: '',
maxCount: 0,
session: '',
sortBy: '',
tagIds: [],
threshold: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/suggested?iterationId=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"continuation":"","maxCount":0,"session":"","sortBy":"","tagIds":[],"threshold":""}'
};
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/suggested?iterationId=',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "continuation": "",\n "maxCount": 0,\n "session": "",\n "sortBy": "",\n "tagIds": [],\n "threshold": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/suggested?iterationId=")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/images/suggested?iterationId=',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
continuation: '',
maxCount: 0,
session: '',
sortBy: '',
tagIds: [],
threshold: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/suggested',
qs: {iterationId: ''},
headers: {'content-type': 'application/json'},
body: {
continuation: '',
maxCount: 0,
session: '',
sortBy: '',
tagIds: [],
threshold: ''
},
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/suggested');
req.query({
iterationId: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
continuation: '',
maxCount: 0,
session: '',
sortBy: '',
tagIds: [],
threshold: ''
});
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/suggested',
params: {iterationId: ''},
headers: {'content-type': 'application/json'},
data: {
continuation: '',
maxCount: 0,
session: '',
sortBy: '',
tagIds: [],
threshold: ''
}
};
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/suggested?iterationId=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"continuation":"","maxCount":0,"session":"","sortBy":"","tagIds":[],"threshold":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"continuation": @"",
@"maxCount": @0,
@"session": @"",
@"sortBy": @"",
@"tagIds": @[ ],
@"threshold": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/suggested?iterationId="]
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/suggested?iterationId=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/images/suggested?iterationId=",
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([
'continuation' => '',
'maxCount' => 0,
'session' => '',
'sortBy' => '',
'tagIds' => [
],
'threshold' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/images/suggested?iterationId=', [
'body' => '{
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/suggested');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'iterationId' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'continuation' => '',
'maxCount' => 0,
'session' => '',
'sortBy' => '',
'tagIds' => [
],
'threshold' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'continuation' => '',
'maxCount' => 0,
'session' => '',
'sortBy' => '',
'tagIds' => [
],
'threshold' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/images/suggested');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'iterationId' => ''
]));
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/suggested?iterationId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/suggested?iterationId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/images/suggested?iterationId=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/suggested"
querystring = {"iterationId":""}
payload = {
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/suggested"
queryString <- list(iterationId = "")
payload <- "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/suggested?iterationId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\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/suggested') do |req|
req.params['iterationId'] = ''
req.body = "{\n \"continuation\": \"\",\n \"maxCount\": 0,\n \"session\": \"\",\n \"sortBy\": \"\",\n \"tagIds\": [],\n \"threshold\": \"\"\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/suggested";
let querystring = [
("iterationId", ""),
];
let payload = json!({
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": (),
"threshold": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/:projectId/images/suggested?iterationId=' \
--header 'content-type: application/json' \
--data '{
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
}'
echo '{
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
}' | \
http POST '{{baseUrl}}/projects/:projectId/images/suggested?iterationId=' \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "continuation": "",\n "maxCount": 0,\n "session": "",\n "sortBy": "",\n "tagIds": [],\n "threshold": ""\n}' \
--output-document \
- '{{baseUrl}}/projects/:projectId/images/suggested?iterationId='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"continuation": "",
"maxCount": 0,
"session": "",
"sortBy": "",
"tagIds": [],
"threshold": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/suggested?iterationId=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"results": [
{
"created": "2018-01-31T20:18:26Z",
"domain": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"iteration": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66",
"originalImageUri": "",
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "8988643a-ae70-447d-9a22-15c4255e5ecb",
"resizedImageUri": "",
"thumbnailUri": ""
}
],
"token": {
"continuation": "",
"maxCount": 0,
"session": "1:286613",
"sortBy": "Newest",
"tagIds": [
"b5f7e6a2-a481-49a6-afec-a7cef1af3544"
]
}
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"results": [
{
"created": "2018-01-31T20:18:26Z",
"domain": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"iteration": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66",
"originalImageUri": "",
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "8988643a-ae70-447d-9a22-15c4255e5ecb",
"resizedImageUri": "",
"thumbnailUri": ""
}
],
"token": {
"continuation": "",
"maxCount": 0,
"session": "1:286613",
"sortBy": "Newest",
"tagIds": [
"b5f7e6a2-a481-49a6-afec-a7cef1af3544"
]
}
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"results": [
{
"created": "2018-01-31T20:18:26Z",
"domain": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"iteration": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66",
"originalImageUri": "",
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "8988643a-ae70-447d-9a22-15c4255e5ecb",
"resizedImageUri": "",
"thumbnailUri": ""
}
],
"token": {
"continuation": "",
"maxCount": 0,
"session": "1:286613",
"sortBy": "Newest",
"tagIds": [
"b5f7e6a2-a481-49a6-afec-a7cef1af3544"
]
}
}
GET
Gets the number of images tagged with the provided {tagIds}.
{{baseUrl}}/projects/:projectId/images/tagged/count
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/tagged/count")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/tagged/count"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/tagged/count"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/tagged/count")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/tagged/count"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/tagged/count")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/tagged/count")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/projects/:projectId/images/tagged/count');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/tagged/count'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/tagged/count")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/tagged/count"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images/tagged/count" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/tagged/count');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/tagged/count');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/tagged/count' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/tagged/count' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/images/tagged/count")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/tagged/count"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/tagged/count"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/tagged/count";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/tagged/count
http GET {{baseUrl}}/projects/:projectId/images/tagged/count
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/images/tagged/count
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/tagged/count")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
10
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
10
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
10
GET
Gets the number of untagged images.
{{baseUrl}}/projects/:projectId/images/untagged/count
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/images/untagged/count")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/untagged/count"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/untagged/count"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/images/untagged/count")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/untagged/count"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/untagged/count")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/images/untagged/count")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/projects/:projectId/images/untagged/count');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/images/untagged/count'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/untagged/count")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/untagged/count"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images/untagged/count" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/untagged/count');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/untagged/count');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/untagged/count' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/untagged/count' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/images/untagged/count")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/untagged/count"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/untagged/count"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/untagged/count";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/images/untagged/count
http GET {{baseUrl}}/projects/:projectId/images/untagged/count
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/images/untagged/count
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/untagged/count")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
10
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
10
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
10
DELETE
Remove a set of tags from a set of images.
{{baseUrl}}/projects/:projectId/images/tags
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=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/images/tags" {:query-params {:imageIds ""
:tagIds ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=")
.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.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/images/tags',
params: {imageIds: '', tagIds: ''}
};
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'};
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: {}
};
$.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)
.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: {}
};
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: ''}
};
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.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: ''}
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=" in
Client.call `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",
]);
$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=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/tags');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'imageIds' => '',
'tagIds' => ''
]);
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' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/images/tags?imageIds=&tagIds=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/tags"
querystring = {"imageIds":"","tagIds":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/tags"
queryString <- list(
imageIds = "",
tagIds = ""
)
response <- VERB("DELETE", url, query = queryString, 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)
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.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 client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds='
http DELETE '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds='
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/tags?imageIds=&tagIds=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Get region proposals for an image. Returns empty array if no proposals are found.
{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals
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}}/projects/:projectId/images/:imageId/regionproposals");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals"),
};
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/:imageId/regionproposals");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/images/:imageId/regionproposals HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals"))
.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/:imageId/regionproposals")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals")
.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/:imageId/regionproposals');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals")
.post(null)
.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/:imageId/regionproposals',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals'
};
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/:imageId/regionproposals');
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/:imageId/regionproposals'
};
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/:imageId/regionproposals';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/: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",
]);
$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/:imageId/regionproposals');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/projects/:projectId/images/:imageId/regionproposals")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/:projectId/images/:imageId/regionproposals') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/images/:imageId/regionproposals
http POST {{baseUrl}}/projects/:projectId/images/:imageId/regionproposals
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/projects/:projectId/images/:imageId/regionproposals
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/images/:imageId/regionproposals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"imageId": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"projectId": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"proposals": [
{
"boundingBox": {
"height": 0.25,
"left": 0.25,
"top": 0.25,
"width": 0.25
},
"confidence": 0.25
}
]
}
DELETE
Delete a set of predicted images and their associated prediction results.
{{baseUrl}}/projects/:projectId/predictions
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=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/predictions" {:query-params {:ids ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/predictions?ids="
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/predictions?ids="),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/predictions?ids=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/predictions?ids="))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/predictions?ids=")
.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.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/predictions',
params: {ids: ''}
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/predictions?ids=")
.delete(null)
.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: {}
};
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: ''}
};
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.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: ''}
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/predictions?ids="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/predictions?ids=" in
Client.call `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",
]);
$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=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/predictions');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'ids' => ''
]);
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' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/predictions?ids=' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/predictions?ids=' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/predictions?ids=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/predictions"
querystring = {"ids":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/predictions"
queryString <- list(ids = "")
response <- VERB("DELETE", url, query = queryString, 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)
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.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 client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/projects/:projectId/predictions?ids='
http DELETE '{{baseUrl}}/projects/:projectId/predictions?ids='
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/projects/:projectId/predictions?ids='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/predictions?ids=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Get images that were sent to your prediction endpoint.
{{baseUrl}}/projects/:projectId/predictions/query
QUERY PARAMS
projectId
BODY json
{
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
]
}
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, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/predictions/query" {:content-type :json
:form-params {:application ""
:continuation ""
:endTime ""
:iterationId ""
:maxCount 0
:orderBy ""
:session ""
:startTime ""
:tags [{:id ""
:maxThreshold ""
:minThreshold ""}]}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/predictions/query"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\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/predictions/query"),
Content = new StringContent("{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\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/predictions/query");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\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 \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/predictions/query HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 249
{
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/predictions/query")
.setHeader("content-type", "application/json")
.setBody("{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/predictions/query"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\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 \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/predictions/query")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/predictions/query")
.header("content-type", "application/json")
.body("{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: '',
tags: [
{
id: '',
maxThreshold: '',
minThreshold: ''
}
]
});
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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/predictions/query',
headers: {'content-type': 'application/json'},
data: {
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: '',
tags: [{id: '', maxThreshold: '', minThreshold: ''}]
}
};
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: {'content-type': 'application/json'},
body: '{"application":"","continuation":"","endTime":"","iterationId":"","maxCount":0,"orderBy":"","session":"","startTime":"","tags":[{"id":"","maxThreshold":"","minThreshold":""}]}'
};
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: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "application": "",\n "continuation": "",\n "endTime": "",\n "iterationId": "",\n "maxCount": 0,\n "orderBy": "",\n "session": "",\n "startTime": "",\n "tags": [\n {\n "id": "",\n "maxThreshold": "",\n "minThreshold": ""\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 \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/predictions/query")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/predictions/query',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: '',
tags: [{id: '', maxThreshold: '', minThreshold: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/predictions/query',
headers: {'content-type': 'application/json'},
body: {
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: '',
tags: [{id: '', maxThreshold: '', minThreshold: ''}]
},
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({
'content-type': 'application/json'
});
req.type('json');
req.send({
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: '',
tags: [
{
id: '',
maxThreshold: '',
minThreshold: ''
}
]
});
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: {'content-type': 'application/json'},
data: {
application: '',
continuation: '',
endTime: '',
iterationId: '',
maxCount: 0,
orderBy: '',
session: '',
startTime: '',
tags: [{id: '', maxThreshold: '', minThreshold: ''}]
}
};
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: {'content-type': 'application/json'},
body: '{"application":"","continuation":"","endTime":"","iterationId":"","maxCount":0,"orderBy":"","session":"","startTime":"","tags":[{"id":"","maxThreshold":"","minThreshold":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"application": @"",
@"continuation": @"",
@"endTime": @"",
@"iterationId": @"",
@"maxCount": @0,
@"orderBy": @"",
@"session": @"",
@"startTime": @"",
@"tags": @[ @{ @"id": @"", @"maxThreshold": @"", @"minThreshold": @"" } ] };
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 (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\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([
'application' => '',
'continuation' => '',
'endTime' => '',
'iterationId' => '',
'maxCount' => 0,
'orderBy' => '',
'session' => '',
'startTime' => '',
'tags' => [
[
'id' => '',
'maxThreshold' => '',
'minThreshold' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/predictions/query', [
'body' => '{
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/predictions/query');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'application' => '',
'continuation' => '',
'endTime' => '',
'iterationId' => '',
'maxCount' => 0,
'orderBy' => '',
'session' => '',
'startTime' => '',
'tags' => [
[
'id' => '',
'maxThreshold' => '',
'minThreshold' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'application' => '',
'continuation' => '',
'endTime' => '',
'iterationId' => '',
'maxCount' => 0,
'orderBy' => '',
'session' => '',
'startTime' => '',
'tags' => [
[
'id' => '',
'maxThreshold' => '',
'minThreshold' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/predictions/query');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/predictions/query' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/predictions/query' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\n}"
headers = { '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 = {
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
]
}
headers = {"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 \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/predictions/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\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/predictions/query') do |req|
req.body = "{\n \"application\": \"\",\n \"continuation\": \"\",\n \"endTime\": \"\",\n \"iterationId\": \"\",\n \"maxCount\": 0,\n \"orderBy\": \"\",\n \"session\": \"\",\n \"startTime\": \"\",\n \"tags\": [\n {\n \"id\": \"\",\n \"maxThreshold\": \"\",\n \"minThreshold\": \"\"\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/predictions/query";
let payload = json!({
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": (
json!({
"id": "",
"maxThreshold": "",
"minThreshold": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/predictions/query \
--header 'content-type: application/json' \
--data '{
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
]
}'
echo '{
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
{
"id": "",
"maxThreshold": "",
"minThreshold": ""
}
]
}' | \
http POST {{baseUrl}}/projects/:projectId/predictions/query \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "application": "",\n "continuation": "",\n "endTime": "",\n "iterationId": "",\n "maxCount": 0,\n "orderBy": "",\n "session": "",\n "startTime": "",\n "tags": [\n {\n "id": "",\n "maxThreshold": "",\n "minThreshold": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/predictions/query
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"application": "",
"continuation": "",
"endTime": "",
"iterationId": "",
"maxCount": 0,
"orderBy": "",
"session": "",
"startTime": "",
"tags": [
[
"id": "",
"maxThreshold": "",
"minThreshold": ""
]
]
] 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"results": [
{
"created": "2018-01-31T20:18:26Z",
"domain": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"iteration": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66",
"originalImageUri": "",
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "8988643a-ae70-447d-9a22-15c4255e5ecb",
"resizedImageUri": "",
"thumbnailUri": ""
}
],
"token": {
"application": "",
"continuation": "",
"maxCount": 0,
"orderBy": "Newest",
"session": "1:286613",
"tags": [
{
"id": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"maxThreshold": 1,
"minThreshold": 0.9
}
]
}
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"results": [
{
"created": "2018-01-31T20:18:26Z",
"domain": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"iteration": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66",
"originalImageUri": "",
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "8988643a-ae70-447d-9a22-15c4255e5ecb",
"resizedImageUri": "",
"thumbnailUri": ""
}
],
"token": {
"application": "",
"continuation": "",
"maxCount": 0,
"orderBy": "Newest",
"session": "1:286613",
"tags": [
{
"id": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"maxThreshold": 1,
"minThreshold": 0.9
}
]
}
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"results": [
{
"created": "2018-01-31T20:18:26Z",
"domain": "b30a91ae-e3c1-4f73-a81e-c270bff27c39",
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"iteration": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66",
"originalImageUri": "",
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "8988643a-ae70-447d-9a22-15c4255e5ecb",
"resizedImageUri": "",
"thumbnailUri": ""
}
],
"token": {
"application": "",
"continuation": "",
"maxCount": 0,
"orderBy": "Newest",
"session": "1:286613",
"tags": [
{
"id": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"maxThreshold": 1,
"minThreshold": 0.9
}
]
}
}
POST
Quick test an image url.
{{baseUrl}}/projects/:projectId/quicktest/url
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, "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" {:content-type :json
:form-params {:url ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/quicktest/url"
headers = HTTP::Headers{
"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"),
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("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("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
Content-Type: application/json
Host: example.com
Content-Length: 15
{
"url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/quicktest/url")
.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("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("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/quicktest/url")
.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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/quicktest/url',
headers: {'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: {'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: {
'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("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: {
'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: {'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({
'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: {'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: {'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 = @{ @"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 (Header.init ()) "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"
],
]);
$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',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/quicktest/url');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'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([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/quicktest/url' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"url": ""
}'
$headers=@{}
$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 = { '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 = {"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, 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["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.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("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' \
--data '{
"url": ""
}'
echo '{
"url": ""
}' | \
http POST {{baseUrl}}/projects/:projectId/quicktest/url \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "url": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/quicktest/url
import Foundation
let headers = ["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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2017-12-19T14:21:41Z",
"id": "951098b2-9b69-427b-bddb-d5cb618874e3",
"iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"predictions": [
{
"probability": 0.05149666,
"tagId": "e31ff107-5505-4753-be42-b369b21b026c",
"tagName": "Hemlock"
},
{
"probability": 0,
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"tagName": "Japanese Cherry"
}
],
"project": "64b822c5-8082-4b36-a426-27225f4aa18c"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2017-12-19T14:21:41Z",
"id": "951098b2-9b69-427b-bddb-d5cb618874e3",
"iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"predictions": [
{
"probability": 0.05149666,
"tagId": "e31ff107-5505-4753-be42-b369b21b026c",
"tagName": "Hemlock"
},
{
"probability": 0,
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"tagName": "Japanese Cherry"
}
],
"project": "64b822c5-8082-4b36-a426-27225f4aa18c"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2017-12-19T14:21:41Z",
"id": "951098b2-9b69-427b-bddb-d5cb618874e3",
"iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"predictions": [
{
"probability": 0.05149666,
"tagId": "e31ff107-5505-4753-be42-b369b21b026c",
"tagName": "Hemlock"
},
{
"probability": 0,
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"tagName": "Japanese Cherry"
}
],
"project": "64b822c5-8082-4b36-a426-27225f4aa18c"
}
POST
Quick test an image.
{{baseUrl}}/projects/:projectId/quicktest/image
QUERY PARAMS
projectId
BODY multipartForm
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, "content-type: multipart/form-data; boundary=---011000010111000001101001");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/quicktest/image" {:multipart [{:name "imageData"
:content ""}]})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/quicktest/image"
headers = HTTP::Headers{
"content-type" => "multipart/form-data; boundary=---011000010111000001101001"
}
reqBody = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\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/image"),
Content = new MultipartFormDataContent
{
new StringContent("")
{
Headers =
{
ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "imageData",
}
}
},
},
};
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("content-type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("multipart/form-data; boundary=---011000010111000001101001", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/quicktest/image"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
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
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: example.com
Content-Length: 118
-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/quicktest/image")
.setHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.setBody("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/quicktest/image"))
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.method("POST", HttpRequest.BodyPublishers.ofString("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/quicktest/image")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/quicktest/image")
.header("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
.asString();
const data = new FormData();
data.append('imageData', '');
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.send(data);
import axios from 'axios';
const form = new FormData();
form.append('imageData', '');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/quicktest/image',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '[form]'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/quicktest/image';
const form = new FormData();
form.append('imageData', '');
const options = {method: 'POST'};
options.body = form;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const form = new FormData();
form.append('imageData', '');
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/quicktest/image',
method: 'POST',
headers: {},
processData: false,
contentType: false,
mimeType: 'multipart/form-data',
data: form
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")
val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/quicktest/image")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.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: {
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
}
};
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('-----011000010111000001101001\r\nContent-Disposition: form-data; name="imageData"\r\n\r\n\r\n-----011000010111000001101001--\r\n');
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/quicktest/image',
headers: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
formData: {imageData: ''}
};
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({
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
});
req.multipart([]);
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: {'content-type': 'multipart/form-data; boundary=---011000010111000001101001'},
data: '-----011000010111000001101001\r\nContent-Disposition: form-data; name="imageData"\r\n\r\n\r\n-----011000010111000001101001--\r\n'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const FormData = require('form-data');
const fetch = require('node-fetch');
const formData = new FormData();
formData.append('imageData', '');
const url = '{{baseUrl}}/projects/:projectId/quicktest/image';
const options = {method: 'POST'};
options.body = formData;
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"multipart/form-data; boundary=---011000010111000001101001" };
NSArray *parameters = @[ @{ @"name": @"imageData", @"value": @"" } ];
NSString *boundary = @"---011000010111000001101001";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/quicktest/image"]
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/image" in
let headers = Header.add (Header.init ()) "content-type" "multipart/form-data; boundary=---011000010111000001101001" in
let body = Cohttp_lwt_body.of_string "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" in
Client.call ~headers ~body `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_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n",
CURLOPT_HTTPHEADER => [
"content-type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$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' => [
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/quicktest/image');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'multipart/form-data; boundary=---011000010111000001101001'
]);
$request->setBody('-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
addForm(null, null);
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/quicktest/image');
$request->setRequestMethod('POST');
$request->setBody($body);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/quicktest/image' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
'
$headers=@{}
$headers.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/quicktest/image' -Method POST -Headers $headers -ContentType 'multipart/form-data; boundary=---011000010111000001101001' -Body '-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = { 'content-type': "multipart/form-data; boundary=---011000010111000001101001" }
conn.request("POST", "/baseUrl/projects/:projectId/quicktest/image", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/quicktest/image"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
headers = {"content-type": "multipart/form-data; boundary=---011000010111000001101001"}
response = requests.post(url, data=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/quicktest/image"
payload <- "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
encode <- "multipart"
response <- VERB("POST", url, body = payload, content_type("multipart/form-data"), encode = encode)
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["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001'}
)
response = conn.post('/baseUrl/projects/:projectId/quicktest/image') do |req|
req.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imageData\"\r\n\r\n\r\n-----011000010111000001101001--\r\n"
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/quicktest/image";
let form = reqwest::multipart::Form::new()
.text("imageData", "");
let mut headers = reqwest::header::HeaderMap::new();
let client = reqwest::Client::new();
let response = client.post(url)
.multipart(form)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/quicktest/image \
--header 'content-type: multipart/form-data' \
--form imageData=
echo '-----011000010111000001101001
Content-Disposition: form-data; name="imageData"
-----011000010111000001101001--
' | \
http POST {{baseUrl}}/projects/:projectId/quicktest/image \
content-type:'multipart/form-data; boundary=---011000010111000001101001'
wget --quiet \
--method POST \
--header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
--body-data '-----011000010111000001101001\r\nContent-Disposition: form-data; name="imageData"\r\n\r\n\r\n-----011000010111000001101001--\r\n' \
--output-document \
- {{baseUrl}}/projects/:projectId/quicktest/image
import Foundation
let headers = ["content-type": "multipart/form-data; boundary=---011000010111000001101001"]
let parameters = [
[
"name": "imageData",
"value": ""
]
]
let boundary = "---011000010111000001101001"
var body = ""
var error: NSError? = nil
for param in parameters {
let paramName = param["name"]!
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(paramName)\""
if let filename = param["fileName"] {
let contentType = param["content-type"]!
let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
if (error != nil) {
print(error as Any)
}
body += "; filename=\"\(filename)\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
} else if let paramValue = param["value"] {
body += "\r\n\r\n\(paramValue)"
}
}
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/quicktest/image")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2017-12-19T14:21:41Z",
"id": "951098b2-9b69-427b-bddb-d5cb618874e3",
"iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"predictions": [
{
"probability": 0.05149666,
"tagId": "e31ff107-5505-4753-be42-b369b21b026c",
"tagName": "Hemlock"
},
{
"probability": 0,
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"tagName": "Japanese Cherry"
}
],
"project": "64b822c5-8082-4b36-a426-27225f4aa18c"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2017-12-19T14:21:41Z",
"id": "951098b2-9b69-427b-bddb-d5cb618874e3",
"iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"predictions": [
{
"probability": 0.05149666,
"tagId": "e31ff107-5505-4753-be42-b369b21b026c",
"tagName": "Hemlock"
},
{
"probability": 0,
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"tagName": "Japanese Cherry"
}
],
"project": "64b822c5-8082-4b36-a426-27225f4aa18c"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2017-12-19T14:21:41Z",
"id": "951098b2-9b69-427b-bddb-d5cb618874e3",
"iteration": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"predictions": [
{
"probability": 0.05149666,
"tagId": "e31ff107-5505-4753-be42-b369b21b026c",
"tagName": "Hemlock"
},
{
"probability": 0,
"tagId": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"tagName": "Japanese Cherry"
}
],
"project": "64b822c5-8082-4b36-a426-27225f4aa18c"
}
POST
Create a project.
{{baseUrl}}/projects
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=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects" {:query-params {:name ""}})
require "http/client"
url = "{{baseUrl}}/projects?name="
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects?name="),
};
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);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects?name="
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects?name= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects?name=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects?name="))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects?name=")
.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.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects',
params: {name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects?name=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects?name=',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects?name=")
.post(null)
.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: {}
};
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: ''}};
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.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: ''}
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects?name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects?name=" in
Client.call `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",
]);
$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=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'name' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'name' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects?name=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects?name=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/projects?name=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects"
querystring = {"name":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects"
queryString <- list(name = "")
response <- VERB("POST", url, query = queryString, 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)
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.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 client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects?name='
http POST '{{baseUrl}}/projects?name='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/projects?name='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects?name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2017-12-18T05:43:18Z",
"description": "A test project",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2017-12-18T05:43:18Z",
"description": "A test project",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2017-12-18T05:43:18Z",
"description": "A test project",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
DELETE
Delete a specific iteration of a project.
{{baseUrl}}/projects/:projectId/iterations/:iterationId
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/iterations/:iterationId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId"))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.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.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.delete(null)
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/iterations/:iterationId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
response <- VERB("DELETE", url, 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)
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|
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 client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId
http DELETE {{baseUrl}}/projects/:projectId/iterations/:iterationId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete a specific project.
{{baseUrl}}/projects/:projectId
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId"),
};
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);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId"))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId")
.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.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/projects/:projectId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.delete(null)
.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: {}
};
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'};
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.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'};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId"
response <- VERB("DELETE", url, 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)
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|
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 client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/projects/:projectId
http DELETE {{baseUrl}}/projects/:projectId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Export a trained iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/export
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=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export" {:query-params {:platform ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=")
.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.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export',
params: {platform: ''}
};
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'};
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: {}
};
$.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)
.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: {}
};
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: ''}
};
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.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: ''}
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=" in
Client.call `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",
]);
$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=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'platform' => ''
]);
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' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/projects/:projectId/iterations/:iterationId/export?platform=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
querystring = {"platform":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
queryString <- list(platform = "")
response <- VERB("POST", url, query = queryString, 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)
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.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 client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform='
http POST '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export?platform=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"downloadUri": "",
"newerVersionAvailable": false,
"platform": "TensorFlow",
"status": "Exporting"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"downloadUri": "",
"newerVersionAvailable": false,
"platform": "TensorFlow",
"status": "Exporting"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"downloadUri": "",
"newerVersionAvailable": false,
"platform": "TensorFlow",
"status": "Exporting"
}
GET
Exports a project.
{{baseUrl}}/projects/:projectId/export
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/export");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/export")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/export"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/export"),
};
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/export");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/export"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId/export HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/export")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/export"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/export")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/export")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/projects/:projectId/export');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId/export'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/export';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/export',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/export")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/export',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId/export'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/projects/:projectId/export');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId/export'};
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/export';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/export"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/export" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects/:projectId/export');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/export');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/export');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/export' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/export' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/export")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/export"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/export"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects/:projectId/export') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/export";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/export
http GET {{baseUrl}}/projects/:projectId/export
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/export
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/export")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"token": ""
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"token": ""
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"token": ""
}
GET
Get a specific iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.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.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:47:02Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:47:02Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:47:02Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
}
GET
Get a specific project.
{{baseUrl}}/projects/:projectId
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId"),
};
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);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects/:projectId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId")
.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.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.get()
.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: {}
};
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'};
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.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'};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId
http GET {{baseUrl}}/projects/:projectId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2017-12-18T05:43:18Z",
"description": "A test project",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2017-12-18T05:43:18Z",
"description": "A test project",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2017-12-18T05:43:18Z",
"description": "A test project",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
GET
Get detailed performance information about an iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")
.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.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId/performance")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"perTagPerformance": [
{
"id": "e31ff107-5505-4753-be42-b369b21b026c",
"name": "Hemlock",
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
},
{
"id": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"name": "Japanese Cherry",
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
}
],
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"perTagPerformance": [
{
"id": "e31ff107-5505-4753-be42-b369b21b026c",
"name": "Hemlock",
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
},
{
"id": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"name": "Japanese Cherry",
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
}
],
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"perTagPerformance": [
{
"id": "e31ff107-5505-4753-be42-b369b21b026c",
"name": "Hemlock",
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
},
{
"id": "349d72ac-0948-4d51-b1e4-c14a1f9b848a",
"name": "Japanese Cherry",
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
}
],
"precision": 1,
"precisionStdDeviation": 0,
"recall": 1,
"recallStdDeviation": 0
}
GET
Get image with its prediction for a given project iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")
.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.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId/performance/images")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images"
response <- VERB("GET", url, 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)
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|
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 client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"created": "2018-01-31T20:18:26Z",
"height": 1600,
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"imageUri": "",
"predictions": [
{
"boundingBox": {
"height": 0.25,
"left": 0.25,
"top": 0.25,
"width": 0.25
},
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
}
],
"regions": [],
"tags": [],
"thumbnailUri": "",
"width": 600
}
]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[
{
"created": "2018-01-31T20:18:26Z",
"height": 1600,
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"imageUri": "",
"predictions": [
{
"boundingBox": {
"height": 0.25,
"left": 0.25,
"top": 0.25,
"width": 0.25
},
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
}
],
"regions": [],
"tags": [],
"thumbnailUri": "",
"width": 600
}
]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[
{
"created": "2018-01-31T20:18:26Z",
"height": 1600,
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"imageUri": "",
"predictions": [
{
"boundingBox": {
"height": 0.25,
"left": 0.25,
"top": 0.25,
"width": 0.25
},
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
}
],
"regions": [],
"tags": [],
"thumbnailUri": "",
"width": 600
}
]
GET
Get iterations for the project.
{{baseUrl}}/projects/:projectId/iterations
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations")
.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.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/iterations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations
http GET {{baseUrl}}/projects/:projectId/iterations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"created": "2017-12-18T22:40:29Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"lastModified": "2017-12-18T22:40:41Z",
"name": "Iteration 1",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-18T22:40:41Z",
"trainingType": "Regular"
},
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:47:02Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "model1",
"reservedBudgetInHours": 5,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
},
{
"created": "2017-12-19T15:46:59Z",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "3adaf7b2-18fc-4376-9da4-b5ea160a7cf5",
"lastModified": "2017-12-19T15:46:59Z",
"name": "Iteration 3",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "New",
"trainingType": "Regular"
}
]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[
{
"created": "2017-12-18T22:40:29Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"lastModified": "2017-12-18T22:40:41Z",
"name": "Iteration 1",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-18T22:40:41Z",
"trainingType": "Regular"
},
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:47:02Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "model1",
"reservedBudgetInHours": 5,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
},
{
"created": "2017-12-19T15:46:59Z",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "3adaf7b2-18fc-4376-9da4-b5ea160a7cf5",
"lastModified": "2017-12-19T15:46:59Z",
"name": "Iteration 3",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "New",
"trainingType": "Regular"
}
]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[
{
"created": "2017-12-18T22:40:29Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "fe1e83c4-6f50-4899-9544-6bb08cf0e15a",
"lastModified": "2017-12-18T22:40:41Z",
"name": "Iteration 1",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-18T22:40:41Z",
"trainingType": "Regular"
},
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:47:02Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "model1",
"reservedBudgetInHours": 5,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
},
{
"created": "2017-12-19T15:46:59Z",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "3adaf7b2-18fc-4376-9da4-b5ea160a7cf5",
"lastModified": "2017-12-19T15:46:59Z",
"name": "Iteration 3",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "New",
"trainingType": "Regular"
}
]
GET
Get the list of exports for a specific iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/export
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/export');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/export' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId/export")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/export
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId/export
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/export
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/export")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"downloadUri": "{Download URI}",
"newerVersionAvailable": false,
"platform": "TensorFlow",
"status": "Done"
}
]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[
{
"downloadUri": "{Download URI}",
"newerVersionAvailable": false,
"platform": "TensorFlow",
"status": "Done"
}
]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[
{
"downloadUri": "{Download URI}",
"newerVersionAvailable": false,
"platform": "TensorFlow",
"status": "Done"
}
]
GET
Get your projects.
{{baseUrl}}/projects
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects")
require "http/client"
url = "{{baseUrl}}/projects"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects"),
};
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);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/projects HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects")
.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.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/projects'};
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.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'};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects" in
Client.call `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",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/projects');
echo $response->getBody();
setUrl('{{baseUrl}}/projects');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects"
response <- VERB("GET", url, 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)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/projects') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects
http GET {{baseUrl}}/projects
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"created": "2017-12-18T05:43:18Z",
"description": "",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[
{
"created": "2017-12-18T05:43:18Z",
"description": "",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[
{
"created": "2017-12-18T05:43:18Z",
"description": "",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:18Z",
"name": "My New Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
]
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
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count'
};
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'};
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: {}
};
$.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()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/iterations/:iterationId/performance/images/count")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count"
response <- VERB("GET", url, 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)
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|
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 client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count
http GET {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/performance/images/count")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
1
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
1
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
1
POST
Imports a project.
{{baseUrl}}/projects/import
QUERY PARAMS
token
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/import?token=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/import" {:query-params {:token ""}})
require "http/client"
url = "{{baseUrl}}/projects/import?token="
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/import?token="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/import?token=");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/import?token="
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/import?token= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/import?token=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/import?token="))
.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/import?token=")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/import?token=")
.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/import?token=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/import',
params: {token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/import?token=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/import?token=',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/import?token=")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/import?token=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/import',
qs: {token: ''}
};
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/import');
req.query({
token: ''
});
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/import',
params: {token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects/import?token=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/import?token="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/import?token=" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/import?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/import?token=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/import');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'token' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/import');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'token' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/import?token=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/import?token=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/projects/import?token=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/import"
querystring = {"token":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/import"
queryString <- list(token = "")
response <- VERB("POST", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/import?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/import') do |req|
req.params['token'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/import";
let querystring = [
("token", ""),
];
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/import?token='
http POST '{{baseUrl}}/projects/import?token='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/projects/import?token='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/import?token=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2019-10-06T05:43:18Z",
"description": "",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2019-10-06T05:43:18Z",
"name": "Import Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"status": "Importing",
"thumbnailUri": ""
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2019-10-06T05:43:18Z",
"description": "",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2019-10-06T05:43:18Z",
"name": "Import Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"status": "Importing",
"thumbnailUri": ""
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2019-10-06T05:43:18Z",
"description": "",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2019-10-06T05:43:18Z",
"name": "Import Project",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"status": "Importing",
"thumbnailUri": ""
}
POST
Publish a specific iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish
QUERY PARAMS
publishName
predictionId
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/publish?publishName=&predictionId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish" {:query-params {:publishName ""
:predictionId ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId="
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId="),
};
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/publish?publishName=&predictionId=");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId="
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId="))
.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/publish?publishName=&predictionId=")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=")
.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/publish?publishName=&predictionId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish',
params: {publishName: '', predictionId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=")
.post(null)
.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/publish?publishName=&predictionId=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish',
qs: {publishName: '', predictionId: ''}
};
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/publish');
req.query({
publishName: '',
predictionId: ''
});
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/publish',
params: {publishName: '', predictionId: ''}
};
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/publish?publishName=&predictionId=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'publishName' => '',
'predictionId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'publishName' => '',
'predictionId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"
querystring = {"publishName":"","predictionId":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"
queryString <- list(
publishName = "",
predictionId = ""
)
response <- VERB("POST", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/:projectId/iterations/:iterationId/publish') do |req|
req.params['publishName'] = ''
req.params['predictionId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish";
let querystring = [
("publishName", ""),
("predictionId", ""),
];
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId='
http POST '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish?publishName=&predictionId=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
true
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
true
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
true
POST
Queues project for training.
{{baseUrl}}/projects/:projectId/train
QUERY PARAMS
projectId
BODY json
{
"selectedTags": []
}
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, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"selectedTags\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/train" {:content-type :json
:form-params {:selectedTags []}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/train"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"selectedTags\": []\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/train"),
Content = new StringContent("{\n \"selectedTags\": []\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/train");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"selectedTags\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/train"
payload := strings.NewReader("{\n \"selectedTags\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/train HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"selectedTags": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/train")
.setHeader("content-type", "application/json")
.setBody("{\n \"selectedTags\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/train"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"selectedTags\": []\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 \"selectedTags\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/train")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/train")
.header("content-type", "application/json")
.body("{\n \"selectedTags\": []\n}")
.asString();
const data = JSON.stringify({
selectedTags: []
});
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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/train',
headers: {'content-type': 'application/json'},
data: {selectedTags: []}
};
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: {'content-type': 'application/json'},
body: '{"selectedTags":[]}'
};
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: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "selectedTags": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"selectedTags\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/train")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/train',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({selectedTags: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/train',
headers: {'content-type': 'application/json'},
body: {selectedTags: []},
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/train');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
selectedTags: []
});
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: {'content-type': 'application/json'},
data: {selectedTags: []}
};
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: {'content-type': 'application/json'},
body: '{"selectedTags":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"selectedTags": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/train"]
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/train" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"selectedTags\": []\n}" in
Client.call ~headers ~body `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_POSTFIELDS => json_encode([
'selectedTags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/train', [
'body' => '{
"selectedTags": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/train');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'selectedTags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'selectedTags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/train');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/train' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"selectedTags": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/train' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"selectedTags": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"selectedTags\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/train", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/train"
payload = { "selectedTags": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/train"
payload <- "{\n \"selectedTags\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/train")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"selectedTags\": []\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/train') do |req|
req.body = "{\n \"selectedTags\": []\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/train";
let payload = json!({"selectedTags": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/train \
--header 'content-type: application/json' \
--data '{
"selectedTags": []
}'
echo '{
"selectedTags": []
}' | \
http POST {{baseUrl}}/projects/:projectId/train \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "selectedTags": []\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/train
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["selectedTags": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/train")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2017-12-18T22:40:36Z",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:46:58Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Training",
"trainingType": "Regular"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2017-12-18T22:40:36Z",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:46:58Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Training",
"trainingType": "Regular"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2017-12-18T22:40:36Z",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:46:58Z",
"name": "Iteration 2",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Training",
"trainingType": "Regular"
}
DELETE
Unpublish a specific iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish
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/publish");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"),
};
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/publish");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/projects/:projectId/iterations/:iterationId/publish HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"))
.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/publish")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish")
.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/publish');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish")
.delete(null)
.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/publish',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish'
};
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/publish');
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/publish'
};
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/publish';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/iterations/:iterationId/publish")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/projects/:projectId/iterations/:iterationId/publish') do |req|
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/publish";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId/publish
http DELETE {{baseUrl}}/projects/:projectId/iterations/:iterationId/publish
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId/publish
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/iterations/:iterationId/publish")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
Update a specific iteration.
{{baseUrl}}/projects/:projectId/iterations/:iterationId
QUERY PARAMS
projectId
iterationId
BODY json
{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
}
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, "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 \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/projects/:projectId/iterations/:iterationId" {:content-type :json
:form-params {:classificationType ""
:created ""
:domainId ""
:exportable false
:exportableTo []
:id ""
:lastModified ""
:name ""
:originalPublishResourceId ""
:projectId ""
:publishName ""
:reservedBudgetInHours 0
:status ""
:trainedAt ""
:trainingTimeInMinutes 0
:trainingType ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/iterations/:iterationId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\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"),
Content = new StringContent("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\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("content-type", "application/json");
request.AddParameter("application/json", "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\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 \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/projects/:projectId/iterations/:iterationId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 350
{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.setHeader("content-type", "application/json")
.setBody("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/iterations/:iterationId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\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 \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.header("content-type", "application/json")
.body("{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\n}")
.asString();
const data = JSON.stringify({
classificationType: '',
created: '',
domainId: '',
exportable: false,
exportableTo: [],
id: '',
lastModified: '',
name: '',
originalPublishResourceId: '',
projectId: '',
publishName: '',
reservedBudgetInHours: 0,
status: '',
trainedAt: '',
trainingTimeInMinutes: 0,
trainingType: ''
});
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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId',
headers: {'content-type': 'application/json'},
data: {
classificationType: '',
created: '',
domainId: '',
exportable: false,
exportableTo: [],
id: '',
lastModified: '',
name: '',
originalPublishResourceId: '',
projectId: '',
publishName: '',
reservedBudgetInHours: 0,
status: '',
trainedAt: '',
trainingTimeInMinutes: 0,
trainingType: ''
}
};
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: {'content-type': 'application/json'},
body: '{"classificationType":"","created":"","domainId":"","exportable":false,"exportableTo":[],"id":"","lastModified":"","name":"","originalPublishResourceId":"","projectId":"","publishName":"","reservedBudgetInHours":0,"status":"","trainedAt":"","trainingTimeInMinutes":0,"trainingType":""}'
};
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: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "classificationType": "",\n "created": "",\n "domainId": "",\n "exportable": false,\n "exportableTo": [],\n "id": "",\n "lastModified": "",\n "name": "",\n "originalPublishResourceId": "",\n "projectId": "",\n "publishName": "",\n "reservedBudgetInHours": 0,\n "status": "",\n "trainedAt": "",\n "trainingTimeInMinutes": 0,\n "trainingType": ""\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 \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/iterations/:iterationId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
classificationType: '',
created: '',
domainId: '',
exportable: false,
exportableTo: [],
id: '',
lastModified: '',
name: '',
originalPublishResourceId: '',
projectId: '',
publishName: '',
reservedBudgetInHours: 0,
status: '',
trainedAt: '',
trainingTimeInMinutes: 0,
trainingType: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId/iterations/:iterationId',
headers: {'content-type': 'application/json'},
body: {
classificationType: '',
created: '',
domainId: '',
exportable: false,
exportableTo: [],
id: '',
lastModified: '',
name: '',
originalPublishResourceId: '',
projectId: '',
publishName: '',
reservedBudgetInHours: 0,
status: '',
trainedAt: '',
trainingTimeInMinutes: 0,
trainingType: ''
},
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({
'content-type': 'application/json'
});
req.type('json');
req.send({
classificationType: '',
created: '',
domainId: '',
exportable: false,
exportableTo: [],
id: '',
lastModified: '',
name: '',
originalPublishResourceId: '',
projectId: '',
publishName: '',
reservedBudgetInHours: 0,
status: '',
trainedAt: '',
trainingTimeInMinutes: 0,
trainingType: ''
});
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: {'content-type': 'application/json'},
data: {
classificationType: '',
created: '',
domainId: '',
exportable: false,
exportableTo: [],
id: '',
lastModified: '',
name: '',
originalPublishResourceId: '',
projectId: '',
publishName: '',
reservedBudgetInHours: 0,
status: '',
trainedAt: '',
trainingTimeInMinutes: 0,
trainingType: ''
}
};
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: {'content-type': 'application/json'},
body: '{"classificationType":"","created":"","domainId":"","exportable":false,"exportableTo":[],"id":"","lastModified":"","name":"","originalPublishResourceId":"","projectId":"","publishName":"","reservedBudgetInHours":0,"status":"","trainedAt":"","trainingTimeInMinutes":0,"trainingType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"classificationType": @"",
@"created": @"",
@"domainId": @"",
@"exportable": @NO,
@"exportableTo": @[ ],
@"id": @"",
@"lastModified": @"",
@"name": @"",
@"originalPublishResourceId": @"",
@"projectId": @"",
@"publishName": @"",
@"reservedBudgetInHours": @0,
@"status": @"",
@"trainedAt": @"",
@"trainingTimeInMinutes": @0,
@"trainingType": @"" };
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 (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\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,
'exportableTo' => [
],
'id' => '',
'lastModified' => '',
'name' => '',
'originalPublishResourceId' => '',
'projectId' => '',
'publishName' => '',
'reservedBudgetInHours' => 0,
'status' => '',
'trainedAt' => '',
'trainingTimeInMinutes' => 0,
'trainingType' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/projects/:projectId/iterations/:iterationId', [
'body' => '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'classificationType' => '',
'created' => '',
'domainId' => '',
'exportable' => null,
'exportableTo' => [
],
'id' => '',
'lastModified' => '',
'name' => '',
'originalPublishResourceId' => '',
'projectId' => '',
'publishName' => '',
'reservedBudgetInHours' => 0,
'status' => '',
'trainedAt' => '',
'trainingTimeInMinutes' => 0,
'trainingType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'classificationType' => '',
'created' => '',
'domainId' => '',
'exportable' => null,
'exportableTo' => [
],
'id' => '',
'lastModified' => '',
'name' => '',
'originalPublishResourceId' => '',
'projectId' => '',
'publishName' => '',
'reservedBudgetInHours' => 0,
'status' => '',
'trainedAt' => '',
'trainingTimeInMinutes' => 0,
'trainingType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/iterations/:iterationId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/iterations/:iterationId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
}'
$headers=@{}
$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,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\n}"
headers = { '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,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
}
headers = {"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 \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/iterations/:iterationId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\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.body = "{\n \"classificationType\": \"\",\n \"created\": \"\",\n \"domainId\": \"\",\n \"exportable\": false,\n \"exportableTo\": [],\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"originalPublishResourceId\": \"\",\n \"projectId\": \"\",\n \"publishName\": \"\",\n \"reservedBudgetInHours\": 0,\n \"status\": \"\",\n \"trainedAt\": \"\",\n \"trainingTimeInMinutes\": 0,\n \"trainingType\": \"\"\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,
"exportableTo": (),
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/projects/:projectId/iterations/:iterationId \
--header 'content-type: application/json' \
--data '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
}'
echo '{
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
}' | \
http PATCH {{baseUrl}}/projects/:projectId/iterations/:iterationId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "classificationType": "",\n "created": "",\n "domainId": "",\n "exportable": false,\n "exportableTo": [],\n "id": "",\n "lastModified": "",\n "name": "",\n "originalPublishResourceId": "",\n "projectId": "",\n "publishName": "",\n "reservedBudgetInHours": 0,\n "status": "",\n "trainedAt": "",\n "trainingTimeInMinutes": 0,\n "trainingType": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/iterations/:iterationId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"classificationType": "",
"created": "",
"domainId": "",
"exportable": false,
"exportableTo": [],
"id": "",
"lastModified": "",
"name": "",
"originalPublishResourceId": "",
"projectId": "",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "",
"trainedAt": "",
"trainingTimeInMinutes": 0,
"trainingType": ""
] 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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:53:07Z",
"name": "Best Iteration",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:53:07Z",
"name": "Best Iteration",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2017-12-18T22:40:36Z",
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31",
"exportable": false,
"exportableTo": [
"ONNX",
"DockerFile",
"TensorFlow",
"CoreML"
],
"id": "e31a14ab-5d78-4f7b-a267-3a1e4fd8a758",
"lastModified": "2017-12-19T15:53:07Z",
"name": "Best Iteration",
"projectId": "64b822c5-8082-4b36-a426-27225f4aa18c",
"publishName": "",
"reservedBudgetInHours": 0,
"status": "Completed",
"trainedAt": "2017-12-19T15:47:02Z",
"trainingType": "Regular"
}
PATCH
Update a specific project.
{{baseUrl}}/projects/:projectId
QUERY PARAMS
projectId
BODY json
{
"created": "",
"description": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": {
"augmentationMethods": {}
},
"targetExportPlatforms": [],
"useNegativeSet": false
},
"status": "",
"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, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\n \"thumbnailUri\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/projects/:projectId" {:content-type :json
:form-params {:created ""
:description ""
:drModeEnabled false
:id ""
:lastModified ""
:name ""
:settings {:classificationType ""
:detectionParameters ""
:domainId ""
:imageProcessingSettings {:augmentationMethods {}}
:targetExportPlatforms []
:useNegativeSet false}
:status ""
:thumbnailUri ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\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"),
Content = new StringContent("{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\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("content-type", "application/json");
request.AddParameter("application/json", "{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\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 \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\n \"thumbnailUri\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/projects/:projectId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 387
{
"created": "",
"description": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": {
"augmentationMethods": {}
},
"targetExportPlatforms": [],
"useNegativeSet": false
},
"status": "",
"thumbnailUri": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/projects/:projectId")
.setHeader("content-type", "application/json")
.setBody("{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\n \"thumbnailUri\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\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 \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\n \"thumbnailUri\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/projects/:projectId")
.header("content-type", "application/json")
.body("{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\n \"thumbnailUri\": \"\"\n}")
.asString();
const data = JSON.stringify({
created: '',
description: '',
drModeEnabled: false,
id: '',
lastModified: '',
name: '',
settings: {
classificationType: '',
detectionParameters: '',
domainId: '',
imageProcessingSettings: {
augmentationMethods: {}
},
targetExportPlatforms: [],
useNegativeSet: false
},
status: '',
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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId',
headers: {'content-type': 'application/json'},
data: {
created: '',
description: '',
drModeEnabled: false,
id: '',
lastModified: '',
name: '',
settings: {
classificationType: '',
detectionParameters: '',
domainId: '',
imageProcessingSettings: {augmentationMethods: {}},
targetExportPlatforms: [],
useNegativeSet: false
},
status: '',
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: {'content-type': 'application/json'},
body: '{"created":"","description":"","drModeEnabled":false,"id":"","lastModified":"","name":"","settings":{"classificationType":"","detectionParameters":"","domainId":"","imageProcessingSettings":{"augmentationMethods":{}},"targetExportPlatforms":[],"useNegativeSet":false},"status":"","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: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "created": "",\n "description": "",\n "drModeEnabled": false,\n "id": "",\n "lastModified": "",\n "name": "",\n "settings": {\n "classificationType": "",\n "detectionParameters": "",\n "domainId": "",\n "imageProcessingSettings": {\n "augmentationMethods": {}\n },\n "targetExportPlatforms": [],\n "useNegativeSet": false\n },\n "status": "",\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 \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\n \"thumbnailUri\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
created: '',
description: '',
drModeEnabled: false,
id: '',
lastModified: '',
name: '',
settings: {
classificationType: '',
detectionParameters: '',
domainId: '',
imageProcessingSettings: {augmentationMethods: {}},
targetExportPlatforms: [],
useNegativeSet: false
},
status: '',
thumbnailUri: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId',
headers: {'content-type': 'application/json'},
body: {
created: '',
description: '',
drModeEnabled: false,
id: '',
lastModified: '',
name: '',
settings: {
classificationType: '',
detectionParameters: '',
domainId: '',
imageProcessingSettings: {augmentationMethods: {}},
targetExportPlatforms: [],
useNegativeSet: false
},
status: '',
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({
'content-type': 'application/json'
});
req.type('json');
req.send({
created: '',
description: '',
drModeEnabled: false,
id: '',
lastModified: '',
name: '',
settings: {
classificationType: '',
detectionParameters: '',
domainId: '',
imageProcessingSettings: {
augmentationMethods: {}
},
targetExportPlatforms: [],
useNegativeSet: false
},
status: '',
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: {'content-type': 'application/json'},
data: {
created: '',
description: '',
drModeEnabled: false,
id: '',
lastModified: '',
name: '',
settings: {
classificationType: '',
detectionParameters: '',
domainId: '',
imageProcessingSettings: {augmentationMethods: {}},
targetExportPlatforms: [],
useNegativeSet: false
},
status: '',
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: {'content-type': 'application/json'},
body: '{"created":"","description":"","drModeEnabled":false,"id":"","lastModified":"","name":"","settings":{"classificationType":"","detectionParameters":"","domainId":"","imageProcessingSettings":{"augmentationMethods":{}},"targetExportPlatforms":[],"useNegativeSet":false},"status":"","thumbnailUri":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"created": @"",
@"description": @"",
@"drModeEnabled": @NO,
@"id": @"",
@"lastModified": @"",
@"name": @"",
@"settings": @{ @"classificationType": @"", @"detectionParameters": @"", @"domainId": @"", @"imageProcessingSettings": @{ @"augmentationMethods": @{ } }, @"targetExportPlatforms": @[ ], @"useNegativeSet": @NO },
@"status": @"",
@"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 (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\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' => '',
'drModeEnabled' => null,
'id' => '',
'lastModified' => '',
'name' => '',
'settings' => [
'classificationType' => '',
'detectionParameters' => '',
'domainId' => '',
'imageProcessingSettings' => [
'augmentationMethods' => [
]
],
'targetExportPlatforms' => [
],
'useNegativeSet' => null
],
'status' => '',
'thumbnailUri' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/projects/:projectId', [
'body' => '{
"created": "",
"description": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": {
"augmentationMethods": {}
},
"targetExportPlatforms": [],
"useNegativeSet": false
},
"status": "",
"thumbnailUri": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'created' => '',
'description' => '',
'drModeEnabled' => null,
'id' => '',
'lastModified' => '',
'name' => '',
'settings' => [
'classificationType' => '',
'detectionParameters' => '',
'domainId' => '',
'imageProcessingSettings' => [
'augmentationMethods' => [
]
],
'targetExportPlatforms' => [
],
'useNegativeSet' => null
],
'status' => '',
'thumbnailUri' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'created' => '',
'description' => '',
'drModeEnabled' => null,
'id' => '',
'lastModified' => '',
'name' => '',
'settings' => [
'classificationType' => '',
'detectionParameters' => '',
'domainId' => '',
'imageProcessingSettings' => [
'augmentationMethods' => [
]
],
'targetExportPlatforms' => [
],
'useNegativeSet' => null
],
'status' => '',
'thumbnailUri' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created": "",
"description": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": {
"augmentationMethods": {}
},
"targetExportPlatforms": [],
"useNegativeSet": false
},
"status": "",
"thumbnailUri": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"created": "",
"description": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": {
"augmentationMethods": {}
},
"targetExportPlatforms": [],
"useNegativeSet": false
},
"status": "",
"thumbnailUri": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\n \"thumbnailUri\": \"\"\n}"
headers = { '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": "",
"drModeEnabled": False,
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": { "augmentationMethods": {} },
"targetExportPlatforms": [],
"useNegativeSet": False
},
"status": "",
"thumbnailUri": ""
}
headers = {"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 \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\n \"thumbnailUri\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\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.body = "{\n \"created\": \"\",\n \"description\": \"\",\n \"drModeEnabled\": false,\n \"id\": \"\",\n \"lastModified\": \"\",\n \"name\": \"\",\n \"settings\": {\n \"classificationType\": \"\",\n \"detectionParameters\": \"\",\n \"domainId\": \"\",\n \"imageProcessingSettings\": {\n \"augmentationMethods\": {}\n },\n \"targetExportPlatforms\": [],\n \"useNegativeSet\": false\n },\n \"status\": \"\",\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": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": json!({
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": json!({"augmentationMethods": json!({})}),
"targetExportPlatforms": (),
"useNegativeSet": false
}),
"status": "",
"thumbnailUri": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/projects/:projectId \
--header 'content-type: application/json' \
--data '{
"created": "",
"description": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": {
"augmentationMethods": {}
},
"targetExportPlatforms": [],
"useNegativeSet": false
},
"status": "",
"thumbnailUri": ""
}'
echo '{
"created": "",
"description": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": {
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": {
"augmentationMethods": {}
},
"targetExportPlatforms": [],
"useNegativeSet": false
},
"status": "",
"thumbnailUri": ""
}' | \
http PATCH {{baseUrl}}/projects/:projectId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "created": "",\n "description": "",\n "drModeEnabled": false,\n "id": "",\n "lastModified": "",\n "name": "",\n "settings": {\n "classificationType": "",\n "detectionParameters": "",\n "domainId": "",\n "imageProcessingSettings": {\n "augmentationMethods": {}\n },\n "targetExportPlatforms": [],\n "useNegativeSet": false\n },\n "status": "",\n "thumbnailUri": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"created": "",
"description": "",
"drModeEnabled": false,
"id": "",
"lastModified": "",
"name": "",
"settings": [
"classificationType": "",
"detectionParameters": "",
"domainId": "",
"imageProcessingSettings": ["augmentationMethods": []],
"targetExportPlatforms": [],
"useNegativeSet": false
],
"status": "",
"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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created": "2017-12-18T05:43:18Z",
"description": "A new Description",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:19Z",
"name": "New Project Name",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"created": "2017-12-18T05:43:18Z",
"description": "A new Description",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:19Z",
"name": "New Project Name",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"created": "2017-12-18T05:43:18Z",
"description": "A new Description",
"id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
"lastModified": "2017-12-18T05:43:19Z",
"name": "New Project Name",
"settings": {
"domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
},
"thumbnailUri": ""
}
POST
Suggest tags and regions for an array-batch of untagged images. Returns empty array if no tags are found.
{{baseUrl}}/projects/:projectId/tagsandregions/suggestions
QUERY PARAMS
iterationId
imageIds
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions" {:query-params {:iterationId ""
:imageIds ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds="
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds="),
};
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/tagsandregions/suggestions?iterationId=&imageIds=");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds="
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds="))
.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/tagsandregions/suggestions?iterationId=&imageIds=")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=")
.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/tagsandregions/suggestions?iterationId=&imageIds=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions',
params: {iterationId: '', imageIds: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions',
qs: {iterationId: '', imageIds: ''}
};
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/tagsandregions/suggestions');
req.query({
iterationId: '',
imageIds: ''
});
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/tagsandregions/suggestions',
params: {iterationId: '', imageIds: ''}
};
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/tagsandregions/suggestions?iterationId=&imageIds=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tagsandregions/suggestions');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'iterationId' => '',
'imageIds' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/tagsandregions/suggestions');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'iterationId' => '',
'imageIds' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions"
querystring = {"iterationId":"","imageIds":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions"
queryString <- list(
iterationId = "",
imageIds = ""
)
response <- VERB("POST", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/projects/:projectId/tagsandregions/suggestions') do |req|
req.params['iterationId'] = ''
req.params['imageIds'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions";
let querystring = [
("iterationId", ""),
("imageIds", ""),
];
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds='
http POST '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tagsandregions/suggestions?iterationId=&imageIds=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"created": "2019-07-08T13:43:18Z",
"id": "8497e814-23cc-47d7-b24b-691cef0bcec9",
"iteration": "ce271ee4-cc13-460f-b66f-993f8005522d",
"predictionUncertainty": 0.32,
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "bc3f7dad-5544-468c-8573-3ef04d55463e"
}
]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[
{
"created": "2019-07-08T13:43:18Z",
"id": "8497e814-23cc-47d7-b24b-691cef0bcec9",
"iteration": "ce271ee4-cc13-460f-b66f-993f8005522d",
"predictionUncertainty": 0.32,
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "bc3f7dad-5544-468c-8573-3ef04d55463e"
}
]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[
{
"created": "2019-07-08T13:43:18Z",
"id": "8497e814-23cc-47d7-b24b-691cef0bcec9",
"iteration": "ce271ee4-cc13-460f-b66f-993f8005522d",
"predictionUncertainty": 0.32,
"predictions": [
{
"probability": 1,
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1"
},
{
"probability": 3.60627153e-12,
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2"
}
],
"project": "bc3f7dad-5544-468c-8573-3ef04d55463e"
}
]
POST
Create a tag for the project.
{{baseUrl}}/projects/:projectId/tags
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=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/tags" {:query-params {:name ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags?name="
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tags?name="),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/tags?name=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags?name="))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/tags?name=")
.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.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/tags',
params: {name: ''}
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags?name=")
.post(null)
.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: {}
};
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: ''}
};
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.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: ''}
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags?name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/tags?name=" in
Client.call `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",
]);
$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=');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'name' => ''
]);
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' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags?name=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags?name=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/projects/:projectId/tags?name=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags"
querystring = {"name":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags"
queryString <- list(name = "")
response <- VERB("POST", url, query = queryString, 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)
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.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 client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/projects/:projectId/tags?name='
http POST '{{baseUrl}}/projects/:projectId/tags?name='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/projects/:projectId/tags?name='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags?name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
DELETE
Delete a tag from the project.
{{baseUrl}}/projects/:projectId/tags/:tagId
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/projects/:projectId/tags/:tagId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tags/:tagId"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/projects/:projectId/tags/:tagId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags/:tagId"))
.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)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/projects/:projectId/tags/:tagId")
.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.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/projects/:projectId/tags/:tagId'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags/:tagId")
.delete(null)
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags/:tagId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/tags/:tagId" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/projects/:projectId/tags/:tagId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags/:tagId"
response <- VERB("DELETE", url, 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)
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|
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 client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/projects/:projectId/tags/:tagId
http DELETE {{baseUrl}}/projects/:projectId/tags/:tagId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/projects/:projectId/tags/:tagId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags/:tagId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get information about a specific tag.
{{baseUrl}}/projects/:projectId/tags/:tagId
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/tags/:tagId")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tags/:tagId"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/tags/:tagId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags/:tagId"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/tags/:tagId")
.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.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects/:projectId/tags/:tagId'
};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags/:tagId")
.get()
.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: {}
};
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'
};
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.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'
};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags/:tagId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/tags/:tagId" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/tags/:tagId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags/:tagId"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/tags/:tagId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/tags/:tagId
http GET {{baseUrl}}/projects/:projectId/tags/:tagId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/tags/:tagId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags/:tagId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
GET
Get the tags for a given project and iteration.
{{baseUrl}}/projects/:projectId/tags
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");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/tags")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/tags"),
};
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);
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)
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
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/tags")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/tags"))
.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()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/tags")
.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.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId/tags'};
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'};
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: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/tags")
.get()
.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: {}
};
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'};
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.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'};
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'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/tags"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/tags" in
Client.call `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",
]);
$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');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/tags');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/tags' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/tags")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/tags"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/tags"
response <- VERB("GET", url, 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)
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|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/tags";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/projects/:projectId/tags
http GET {{baseUrl}}/projects/:projectId/tags
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/tags
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/tags")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
[
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
]
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
[
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
]
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
[
{
"description": "Description of Tag1",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Tag1",
"type": "Regular"
}
]
PATCH
Update a tag.
{{baseUrl}}/projects/:projectId/tags/:tagId
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, "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" {:content-type :json
:form-params {:description ""
:id ""
:imageCount 0
:name ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/tags/:tagId"
headers = HTTP::Headers{
"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"),
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("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("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
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("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("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("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/projects/:projectId/tags/:tagId")
.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('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/projects/:projectId/tags/:tagId',
headers: {'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: {'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: {
'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("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: {
'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: {'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({
'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: {'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: {'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 = @{ @"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 (Header.init ()) "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"
],
]);
$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',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/tags/:tagId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'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([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/tags/:tagId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"id": "",
"imageCount": 0,
"name": "",
"type": ""
}'
$headers=@{}
$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 = { '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 = {"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, 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["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.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("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' \
--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
wget --quiet \
--method PATCH \
--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 = ["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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"description": "Better description",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Better Tag Name",
"type": "Regular"
}
RESPONSE HEADERS
Content-Type
application/xml
RESPONSE BODY xml
{
"description": "Better description",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Better Tag Name",
"type": "Regular"
}
RESPONSE HEADERS
Content-Type
text/xml
RESPONSE BODY xml
{
"description": "Better description",
"id": "9e27bc1b-7ae7-4e3b-a4e5-36153479dc01",
"imageCount": 0,
"name": "Better Tag Name",
"type": "Regular"
}