AWS IoT SiteWise
AWS IoT SiteWisev2019-12-02
Welcome to the IoT SiteWise API Reference. IoT SiteWise is an Amazon Web Services service that connects Industrial Internet of Things (IIoT) devices to the power of the Amazon Web Services Cloud. For more information, see the IoT SiteWise User Guide . For information about IoT SiteWise quotas, see Quotas in the IoT SiteWise User Guide .
- Endpoints
- 73 (33 GET, 23 POST, 9 PUT, 8 DELETE)
- Base URL
http://iotsitewise.{region}.amazonaws.com- Authentication
- API key
- Spec format
- OpenAPI 3.0.0
- API version
- 2019-12-02
- Provider
- amazonaws.com
- License
- Apache 2.0 License
- Categories
- Cloud & Infrastructure
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttp://iotsitewise.{region}.amazonaws.com) and your API key credentials, then send requests.
POST
AssociateAssets
{{baseUrl}}/assets/:assetId/associate
QUERY PARAMS
assetId
BODY json
{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId/associate");
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 \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/assets/:assetId/associate" {:content-type :json
:form-params {:hierarchyId ""
:childAssetId ""
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/assets/:assetId/associate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/assets/:assetId/associate"),
Content = new StringContent("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets/:assetId/associate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId/associate"
payload := strings.NewReader("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/assets/:assetId/associate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 66
{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/assets/:assetId/associate")
.setHeader("content-type", "application/json")
.setBody("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId/associate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/assets/:assetId/associate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/assets/:assetId/associate")
.header("content-type", "application/json")
.body("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
hierarchyId: '',
childAssetId: '',
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/assets/:assetId/associate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/assets/:assetId/associate',
headers: {'content-type': 'application/json'},
data: {hierarchyId: '', childAssetId: '', clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId/associate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"hierarchyId":"","childAssetId":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/assets/:assetId/associate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "hierarchyId": "",\n "childAssetId": "",\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId/associate")
.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/assets/:assetId/associate',
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({hierarchyId: '', childAssetId: '', clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/assets/:assetId/associate',
headers: {'content-type': 'application/json'},
body: {hierarchyId: '', childAssetId: '', clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/assets/:assetId/associate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
hierarchyId: '',
childAssetId: '',
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/assets/:assetId/associate',
headers: {'content-type': 'application/json'},
data: {hierarchyId: '', childAssetId: '', clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId/associate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"hierarchyId":"","childAssetId":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"hierarchyId": @"",
@"childAssetId": @"",
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/assets/:assetId/associate"]
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}}/assets/:assetId/associate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId/associate",
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([
'hierarchyId' => '',
'childAssetId' => '',
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/assets/:assetId/associate', [
'body' => '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId/associate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'hierarchyId' => '',
'childAssetId' => '',
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'hierarchyId' => '',
'childAssetId' => '',
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/assets/:assetId/associate');
$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}}/assets/:assetId/associate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId/associate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/assets/:assetId/associate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId/associate"
payload = {
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId/associate"
payload <- "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId/associate")
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 \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/assets/:assetId/associate') do |req|
req.body = "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets/:assetId/associate";
let payload = json!({
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/assets/:assetId/associate \
--header 'content-type: application/json' \
--data '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}'
echo '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}' | \
http POST {{baseUrl}}/assets/:assetId/associate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "hierarchyId": "",\n "childAssetId": "",\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/assets/:assetId/associate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId/associate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
AssociateTimeSeriesToAssetProperty
{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId
QUERY PARAMS
alias
assetId
propertyId
BODY json
{
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId");
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 \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId" {:query-params {:alias ""
:assetId ""
:propertyId ""}
:content-type :json
:form-params {:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"),
Content = new StringContent("{\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"
payload := strings.NewReader("{\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/timeseries/associate/?alias=&assetId=&propertyId= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId',
params: {alias: '', assetId: '', propertyId: ''},
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
.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/timeseries/associate/?alias=&assetId=&propertyId=',
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({clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId',
qs: {alias: '', assetId: '', propertyId: ''},
headers: {'content-type': 'application/json'},
body: {clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId');
req.query({
alias: '',
assetId: '',
propertyId: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId',
params: {alias: '', assetId: '', propertyId: ''},
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"]
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}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId",
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([
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId', [
'body' => '{
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'alias' => '',
'assetId' => '',
'propertyId' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'alias' => '',
'assetId' => '',
'propertyId' => ''
]));
$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}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/timeseries/associate/?alias=&assetId=&propertyId=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId"
querystring = {"alias":"","assetId":"","propertyId":""}
payload = { "clientToken": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId"
queryString <- list(
alias = "",
assetId = "",
propertyId = ""
)
payload <- "{\n \"clientToken\": \"\"\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}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
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 \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/timeseries/associate/') do |req|
req.params['alias'] = ''
req.params['assetId'] = ''
req.params['propertyId'] = ''
req.body = "{\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/timeseries/associate/#alias&assetId&propertyId";
let querystring = [
("alias", ""),
("assetId", ""),
("propertyId", ""),
];
let payload = json!({"clientToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId' \
--header 'content-type: application/json' \
--data '{
"clientToken": ""
}'
echo '{
"clientToken": ""
}' | \
http POST '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId' \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": ""\n}' \
--output-document \
- '{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId'
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clientToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/timeseries/associate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
BatchAssociateProjectAssets
{{baseUrl}}/projects/:projectId/assets/associate
QUERY PARAMS
projectId
BODY json
{
"assetIds": [],
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/assets/associate");
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 \"assetIds\": [],\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/assets/associate" {:content-type :json
:form-params {:assetIds []
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/assets/associate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/assets/associate"),
Content = new StringContent("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/assets/associate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/assets/associate"
payload := strings.NewReader("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/assets/associate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 41
{
"assetIds": [],
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/assets/associate")
.setHeader("content-type", "application/json")
.setBody("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/assets/associate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/assets/associate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/assets/associate")
.header("content-type", "application/json")
.body("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
assetIds: [],
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/assets/associate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/assets/associate',
headers: {'content-type': 'application/json'},
data: {assetIds: [], clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/assets/associate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetIds":[],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/assets/associate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assetIds": [],\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/assets/associate")
.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/assets/associate',
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({assetIds: [], clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/assets/associate',
headers: {'content-type': 'application/json'},
body: {assetIds: [], clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/assets/associate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assetIds: [],
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/assets/associate',
headers: {'content-type': 'application/json'},
data: {assetIds: [], clientToken: ''}
};
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/assets/associate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetIds":[],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assetIds": @[ ],
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/assets/associate"]
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/assets/associate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/assets/associate",
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([
'assetIds' => [
],
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/assets/associate', [
'body' => '{
"assetIds": [],
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/assets/associate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assetIds' => [
],
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assetIds' => [
],
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/assets/associate');
$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/assets/associate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetIds": [],
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/assets/associate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetIds": [],
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/assets/associate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/assets/associate"
payload = {
"assetIds": [],
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/assets/associate"
payload <- "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/assets/associate")
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 \"assetIds\": [],\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects/:projectId/assets/associate') do |req|
req.body = "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/assets/associate";
let payload = json!({
"assetIds": (),
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/assets/associate \
--header 'content-type: application/json' \
--data '{
"assetIds": [],
"clientToken": ""
}'
echo '{
"assetIds": [],
"clientToken": ""
}' | \
http POST {{baseUrl}}/projects/:projectId/assets/associate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assetIds": [],\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/assets/associate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assetIds": [],
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/assets/associate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
BatchDisassociateProjectAssets
{{baseUrl}}/projects/:projectId/assets/disassociate
QUERY PARAMS
projectId
BODY json
{
"assetIds": [],
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects/:projectId/assets/disassociate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects/:projectId/assets/disassociate" {:content-type :json
:form-params {:assetIds []
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId/assets/disassociate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId/assets/disassociate"),
Content = new StringContent("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId/assets/disassociate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/assets/disassociate"
payload := strings.NewReader("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects/:projectId/assets/disassociate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 41
{
"assetIds": [],
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects/:projectId/assets/disassociate")
.setHeader("content-type", "application/json")
.setBody("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/assets/disassociate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId/assets/disassociate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects/:projectId/assets/disassociate")
.header("content-type", "application/json")
.body("{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
assetIds: [],
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects/:projectId/assets/disassociate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/assets/disassociate',
headers: {'content-type': 'application/json'},
data: {assetIds: [], clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/assets/disassociate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetIds":[],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId/assets/disassociate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assetIds": [],\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/assets/disassociate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects/:projectId/assets/disassociate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({assetIds: [], clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/assets/disassociate',
headers: {'content-type': 'application/json'},
body: {assetIds: [], clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects/:projectId/assets/disassociate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assetIds: [],
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/projects/:projectId/assets/disassociate',
headers: {'content-type': 'application/json'},
data: {assetIds: [], clientToken: ''}
};
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/assets/disassociate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetIds":[],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assetIds": @[ ],
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects/:projectId/assets/disassociate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId/assets/disassociate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/assets/disassociate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'assetIds' => [
],
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects/:projectId/assets/disassociate', [
'body' => '{
"assetIds": [],
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/assets/disassociate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assetIds' => [
],
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assetIds' => [
],
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId/assets/disassociate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/assets/disassociate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetIds": [],
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/assets/disassociate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetIds": [],
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects/:projectId/assets/disassociate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/assets/disassociate"
payload = {
"assetIds": [],
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/assets/disassociate"
payload <- "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/assets/disassociate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects/:projectId/assets/disassociate') do |req|
req.body = "{\n \"assetIds\": [],\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/assets/disassociate";
let payload = json!({
"assetIds": (),
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects/:projectId/assets/disassociate \
--header 'content-type: application/json' \
--data '{
"assetIds": [],
"clientToken": ""
}'
echo '{
"assetIds": [],
"clientToken": ""
}' | \
http POST {{baseUrl}}/projects/:projectId/assets/disassociate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assetIds": [],\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId/assets/disassociate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assetIds": [],
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/assets/disassociate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
BatchGetAssetPropertyAggregates
{{baseUrl}}/properties/batch/aggregates
BODY json
{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/properties/batch/aggregates");
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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/properties/batch/aggregates" {:content-type :json
:form-params {:entries [{:entryId ""
:assetId ""
:propertyId ""
:propertyAlias ""
:aggregateTypes ""
:resolution ""
:startDate ""
:endDate ""
:qualities ""
:timeOrdering ""}]
:nextToken ""
:maxResults 0}})
require "http/client"
url = "{{baseUrl}}/properties/batch/aggregates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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}}/properties/batch/aggregates"),
Content = new StringContent("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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}}/properties/batch/aggregates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/properties/batch/aggregates"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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/properties/batch/aggregates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 309
{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/properties/batch/aggregates")
.setHeader("content-type", "application/json")
.setBody("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/properties/batch/aggregates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/properties/batch/aggregates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/properties/batch/aggregates")
.header("content-type", "application/json")
.body("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}")
.asString();
const data = JSON.stringify({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
aggregateTypes: '',
resolution: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/properties/batch/aggregates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/properties/batch/aggregates',
headers: {'content-type': 'application/json'},
data: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
aggregateTypes: '',
resolution: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/properties/batch/aggregates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entries":[{"entryId":"","assetId":"","propertyId":"","propertyAlias":"","aggregateTypes":"","resolution":"","startDate":"","endDate":"","qualities":"","timeOrdering":""}],"nextToken":"","maxResults":0}'
};
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}}/properties/batch/aggregates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entries": [\n {\n "entryId": "",\n "assetId": "",\n "propertyId": "",\n "propertyAlias": "",\n "aggregateTypes": "",\n "resolution": "",\n "startDate": "",\n "endDate": "",\n "qualities": "",\n "timeOrdering": ""\n }\n ],\n "nextToken": "",\n "maxResults": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/properties/batch/aggregates")
.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/properties/batch/aggregates',
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({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
aggregateTypes: '',
resolution: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/properties/batch/aggregates',
headers: {'content-type': 'application/json'},
body: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
aggregateTypes: '',
resolution: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
},
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}}/properties/batch/aggregates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
aggregateTypes: '',
resolution: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
});
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}}/properties/batch/aggregates',
headers: {'content-type': 'application/json'},
data: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
aggregateTypes: '',
resolution: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/properties/batch/aggregates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entries":[{"entryId":"","assetId":"","propertyId":"","propertyAlias":"","aggregateTypes":"","resolution":"","startDate":"","endDate":"","qualities":"","timeOrdering":""}],"nextToken":"","maxResults":0}'
};
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 = @{ @"entries": @[ @{ @"entryId": @"", @"assetId": @"", @"propertyId": @"", @"propertyAlias": @"", @"aggregateTypes": @"", @"resolution": @"", @"startDate": @"", @"endDate": @"", @"qualities": @"", @"timeOrdering": @"" } ],
@"nextToken": @"",
@"maxResults": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/properties/batch/aggregates"]
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}}/properties/batch/aggregates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/properties/batch/aggregates",
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([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'aggregateTypes' => '',
'resolution' => '',
'startDate' => '',
'endDate' => '',
'qualities' => '',
'timeOrdering' => ''
]
],
'nextToken' => '',
'maxResults' => 0
]),
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}}/properties/batch/aggregates', [
'body' => '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/properties/batch/aggregates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'aggregateTypes' => '',
'resolution' => '',
'startDate' => '',
'endDate' => '',
'qualities' => '',
'timeOrdering' => ''
]
],
'nextToken' => '',
'maxResults' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'aggregateTypes' => '',
'resolution' => '',
'startDate' => '',
'endDate' => '',
'qualities' => '',
'timeOrdering' => ''
]
],
'nextToken' => '',
'maxResults' => 0
]));
$request->setRequestUrl('{{baseUrl}}/properties/batch/aggregates');
$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}}/properties/batch/aggregates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/properties/batch/aggregates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/properties/batch/aggregates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/properties/batch/aggregates"
payload = {
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/properties/batch/aggregates"
payload <- "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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}}/properties/batch/aggregates")
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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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/properties/batch/aggregates') do |req|
req.body = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"aggregateTypes\": \"\",\n \"resolution\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/properties/batch/aggregates";
let payload = json!({
"entries": (
json!({
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
})
),
"nextToken": "",
"maxResults": 0
});
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}}/properties/batch/aggregates \
--header 'content-type: application/json' \
--data '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}'
echo '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}' | \
http POST {{baseUrl}}/properties/batch/aggregates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entries": [\n {\n "entryId": "",\n "assetId": "",\n "propertyId": "",\n "propertyAlias": "",\n "aggregateTypes": "",\n "resolution": "",\n "startDate": "",\n "endDate": "",\n "qualities": "",\n "timeOrdering": ""\n }\n ],\n "nextToken": "",\n "maxResults": 0\n}' \
--output-document \
- {{baseUrl}}/properties/batch/aggregates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entries": [
[
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"aggregateTypes": "",
"resolution": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
]
],
"nextToken": "",
"maxResults": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/properties/batch/aggregates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
BatchGetAssetPropertyValue
{{baseUrl}}/properties/batch/latest
BODY json
{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
}
],
"nextToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/properties/batch/latest");
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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/properties/batch/latest" {:content-type :json
:form-params {:entries [{:entryId ""
:assetId ""
:propertyId ""
:propertyAlias ""}]
:nextToken ""}})
require "http/client"
url = "{{baseUrl}}/properties/batch/latest"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/properties/batch/latest"),
Content = new StringContent("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/properties/batch/latest");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/properties/batch/latest"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/properties/batch/latest HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 145
{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
}
],
"nextToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/properties/batch/latest")
.setHeader("content-type", "application/json")
.setBody("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/properties/batch/latest"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/properties/batch/latest")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/properties/batch/latest")
.header("content-type", "application/json")
.body("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: ''
}
],
nextToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/properties/batch/latest');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/properties/batch/latest',
headers: {'content-type': 'application/json'},
data: {
entries: [{entryId: '', assetId: '', propertyId: '', propertyAlias: ''}],
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/properties/batch/latest';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entries":[{"entryId":"","assetId":"","propertyId":"","propertyAlias":""}],"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/properties/batch/latest',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entries": [\n {\n "entryId": "",\n "assetId": "",\n "propertyId": "",\n "propertyAlias": ""\n }\n ],\n "nextToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/properties/batch/latest")
.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/properties/batch/latest',
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({
entries: [{entryId: '', assetId: '', propertyId: '', propertyAlias: ''}],
nextToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/properties/batch/latest',
headers: {'content-type': 'application/json'},
body: {
entries: [{entryId: '', assetId: '', propertyId: '', propertyAlias: ''}],
nextToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/properties/batch/latest');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: ''
}
],
nextToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/properties/batch/latest',
headers: {'content-type': 'application/json'},
data: {
entries: [{entryId: '', assetId: '', propertyId: '', propertyAlias: ''}],
nextToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/properties/batch/latest';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entries":[{"entryId":"","assetId":"","propertyId":"","propertyAlias":""}],"nextToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"entries": @[ @{ @"entryId": @"", @"assetId": @"", @"propertyId": @"", @"propertyAlias": @"" } ],
@"nextToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/properties/batch/latest"]
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}}/properties/batch/latest" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/properties/batch/latest",
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([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => ''
]
],
'nextToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/properties/batch/latest', [
'body' => '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
}
],
"nextToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/properties/batch/latest');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => ''
]
],
'nextToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => ''
]
],
'nextToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/properties/batch/latest');
$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}}/properties/batch/latest' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
}
],
"nextToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/properties/batch/latest' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
}
],
"nextToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/properties/batch/latest", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/properties/batch/latest"
payload = {
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
}
],
"nextToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/properties/batch/latest"
payload <- "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/properties/batch/latest")
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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/properties/batch/latest') do |req|
req.body = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\"\n }\n ],\n \"nextToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/properties/batch/latest";
let payload = json!({
"entries": (
json!({
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
})
),
"nextToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/properties/batch/latest \
--header 'content-type: application/json' \
--data '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
}
],
"nextToken": ""
}'
echo '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
}
],
"nextToken": ""
}' | \
http POST {{baseUrl}}/properties/batch/latest \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entries": [\n {\n "entryId": "",\n "assetId": "",\n "propertyId": "",\n "propertyAlias": ""\n }\n ],\n "nextToken": ""\n}' \
--output-document \
- {{baseUrl}}/properties/batch/latest
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entries": [
[
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": ""
]
],
"nextToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/properties/batch/latest")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
BatchGetAssetPropertyValueHistory
{{baseUrl}}/properties/batch/history
BODY json
{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/properties/batch/history");
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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/properties/batch/history" {:content-type :json
:form-params {:entries [{:entryId ""
:assetId ""
:propertyId ""
:propertyAlias ""
:startDate ""
:endDate ""
:qualities ""
:timeOrdering ""}]
:nextToken ""
:maxResults 0}})
require "http/client"
url = "{{baseUrl}}/properties/batch/history"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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}}/properties/batch/history"),
Content = new StringContent("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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}}/properties/batch/history");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/properties/batch/history"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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/properties/batch/history HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 257
{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/properties/batch/history")
.setHeader("content-type", "application/json")
.setBody("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/properties/batch/history"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/properties/batch/history")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/properties/batch/history")
.header("content-type", "application/json")
.body("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}")
.asString();
const data = JSON.stringify({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/properties/batch/history');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/properties/batch/history',
headers: {'content-type': 'application/json'},
data: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/properties/batch/history';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entries":[{"entryId":"","assetId":"","propertyId":"","propertyAlias":"","startDate":"","endDate":"","qualities":"","timeOrdering":""}],"nextToken":"","maxResults":0}'
};
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}}/properties/batch/history',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entries": [\n {\n "entryId": "",\n "assetId": "",\n "propertyId": "",\n "propertyAlias": "",\n "startDate": "",\n "endDate": "",\n "qualities": "",\n "timeOrdering": ""\n }\n ],\n "nextToken": "",\n "maxResults": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/properties/batch/history")
.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/properties/batch/history',
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({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/properties/batch/history',
headers: {'content-type': 'application/json'},
body: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
},
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}}/properties/batch/history');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
});
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}}/properties/batch/history',
headers: {'content-type': 'application/json'},
data: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
startDate: '',
endDate: '',
qualities: '',
timeOrdering: ''
}
],
nextToken: '',
maxResults: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/properties/batch/history';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entries":[{"entryId":"","assetId":"","propertyId":"","propertyAlias":"","startDate":"","endDate":"","qualities":"","timeOrdering":""}],"nextToken":"","maxResults":0}'
};
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 = @{ @"entries": @[ @{ @"entryId": @"", @"assetId": @"", @"propertyId": @"", @"propertyAlias": @"", @"startDate": @"", @"endDate": @"", @"qualities": @"", @"timeOrdering": @"" } ],
@"nextToken": @"",
@"maxResults": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/properties/batch/history"]
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}}/properties/batch/history" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/properties/batch/history",
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([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'startDate' => '',
'endDate' => '',
'qualities' => '',
'timeOrdering' => ''
]
],
'nextToken' => '',
'maxResults' => 0
]),
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}}/properties/batch/history', [
'body' => '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/properties/batch/history');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'startDate' => '',
'endDate' => '',
'qualities' => '',
'timeOrdering' => ''
]
],
'nextToken' => '',
'maxResults' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'startDate' => '',
'endDate' => '',
'qualities' => '',
'timeOrdering' => ''
]
],
'nextToken' => '',
'maxResults' => 0
]));
$request->setRequestUrl('{{baseUrl}}/properties/batch/history');
$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}}/properties/batch/history' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/properties/batch/history' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/properties/batch/history", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/properties/batch/history"
payload = {
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/properties/batch/history"
payload <- "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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}}/properties/batch/history")
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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\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/properties/batch/history') do |req|
req.body = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"startDate\": \"\",\n \"endDate\": \"\",\n \"qualities\": \"\",\n \"timeOrdering\": \"\"\n }\n ],\n \"nextToken\": \"\",\n \"maxResults\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/properties/batch/history";
let payload = json!({
"entries": (
json!({
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
})
),
"nextToken": "",
"maxResults": 0
});
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}}/properties/batch/history \
--header 'content-type: application/json' \
--data '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}'
echo '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
}
],
"nextToken": "",
"maxResults": 0
}' | \
http POST {{baseUrl}}/properties/batch/history \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entries": [\n {\n "entryId": "",\n "assetId": "",\n "propertyId": "",\n "propertyAlias": "",\n "startDate": "",\n "endDate": "",\n "qualities": "",\n "timeOrdering": ""\n }\n ],\n "nextToken": "",\n "maxResults": 0\n}' \
--output-document \
- {{baseUrl}}/properties/batch/history
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"entries": [
[
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"startDate": "",
"endDate": "",
"qualities": "",
"timeOrdering": ""
]
],
"nextToken": "",
"maxResults": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/properties/batch/history")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
BatchPutAssetPropertyValue
{{baseUrl}}/properties
BODY json
{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/properties");
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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/properties" {:content-type :json
:form-params {:entries [{:entryId ""
:assetId ""
:propertyId ""
:propertyAlias ""
:propertyValues ""}]}})
require "http/client"
url = "{{baseUrl}}/properties"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\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}}/properties"),
Content = new StringContent("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\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}}/properties");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/properties"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\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/properties HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 154
{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/properties")
.setHeader("content-type", "application/json")
.setBody("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/properties"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/properties")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/properties")
.header("content-type", "application/json")
.body("{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
propertyValues: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/properties');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/properties',
headers: {'content-type': 'application/json'},
data: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
propertyValues: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/properties';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entries":[{"entryId":"","assetId":"","propertyId":"","propertyAlias":"","propertyValues":""}]}'
};
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}}/properties',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "entries": [\n {\n "entryId": "",\n "assetId": "",\n "propertyId": "",\n "propertyAlias": "",\n "propertyValues": ""\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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/properties")
.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/properties',
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({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
propertyValues: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/properties',
headers: {'content-type': 'application/json'},
body: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
propertyValues: ''
}
]
},
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}}/properties');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
propertyValues: ''
}
]
});
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}}/properties',
headers: {'content-type': 'application/json'},
data: {
entries: [
{
entryId: '',
assetId: '',
propertyId: '',
propertyAlias: '',
propertyValues: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/properties';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"entries":[{"entryId":"","assetId":"","propertyId":"","propertyAlias":"","propertyValues":""}]}'
};
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 = @{ @"entries": @[ @{ @"entryId": @"", @"assetId": @"", @"propertyId": @"", @"propertyAlias": @"", @"propertyValues": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/properties"]
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}}/properties" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/properties",
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([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'propertyValues' => ''
]
]
]),
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}}/properties', [
'body' => '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/properties');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'propertyValues' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'entries' => [
[
'entryId' => '',
'assetId' => '',
'propertyId' => '',
'propertyAlias' => '',
'propertyValues' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/properties');
$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}}/properties' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/properties' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/properties", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/properties"
payload = { "entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/properties"
payload <- "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\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}}/properties")
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 \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\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/properties') do |req|
req.body = "{\n \"entries\": [\n {\n \"entryId\": \"\",\n \"assetId\": \"\",\n \"propertyId\": \"\",\n \"propertyAlias\": \"\",\n \"propertyValues\": \"\"\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}}/properties";
let payload = json!({"entries": (
json!({
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
})
)});
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}}/properties \
--header 'content-type: application/json' \
--data '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
}
]
}'
echo '{
"entries": [
{
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
}
]
}' | \
http POST {{baseUrl}}/properties \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "entries": [\n {\n "entryId": "",\n "assetId": "",\n "propertyId": "",\n "propertyAlias": "",\n "propertyValues": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/properties
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["entries": [
[
"entryId": "",
"assetId": "",
"propertyId": "",
"propertyAlias": "",
"propertyValues": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/properties")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateAccessPolicy
{{baseUrl}}/access-policies
BODY json
{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/access-policies");
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 \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/access-policies" {:content-type :json
:form-params {:accessPolicyIdentity {:user ""
:group ""
:iamUser ""
:iamRole ""}
:accessPolicyResource {:portal ""
:project ""}
:accessPolicyPermission ""
:clientToken ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/access-policies"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/access-policies"),
Content = new StringContent("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/access-policies");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/access-policies"
payload := strings.NewReader("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/access-policies HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 241
{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/access-policies")
.setHeader("content-type", "application/json")
.setBody("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/access-policies"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/access-policies")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/access-policies")
.header("content-type", "application/json")
.body("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
accessPolicyIdentity: {
user: '',
group: '',
iamUser: '',
iamRole: ''
},
accessPolicyResource: {
portal: '',
project: ''
},
accessPolicyPermission: '',
clientToken: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/access-policies');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/access-policies',
headers: {'content-type': 'application/json'},
data: {
accessPolicyIdentity: {user: '', group: '', iamUser: '', iamRole: ''},
accessPolicyResource: {portal: '', project: ''},
accessPolicyPermission: '',
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/access-policies';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accessPolicyIdentity":{"user":"","group":"","iamUser":"","iamRole":""},"accessPolicyResource":{"portal":"","project":""},"accessPolicyPermission":"","clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/access-policies',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accessPolicyIdentity": {\n "user": "",\n "group": "",\n "iamUser": "",\n "iamRole": ""\n },\n "accessPolicyResource": {\n "portal": "",\n "project": ""\n },\n "accessPolicyPermission": "",\n "clientToken": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/access-policies")
.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/access-policies',
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({
accessPolicyIdentity: {user: '', group: '', iamUser: '', iamRole: ''},
accessPolicyResource: {portal: '', project: ''},
accessPolicyPermission: '',
clientToken: '',
tags: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/access-policies',
headers: {'content-type': 'application/json'},
body: {
accessPolicyIdentity: {user: '', group: '', iamUser: '', iamRole: ''},
accessPolicyResource: {portal: '', project: ''},
accessPolicyPermission: '',
clientToken: '',
tags: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/access-policies');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accessPolicyIdentity: {
user: '',
group: '',
iamUser: '',
iamRole: ''
},
accessPolicyResource: {
portal: '',
project: ''
},
accessPolicyPermission: '',
clientToken: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/access-policies',
headers: {'content-type': 'application/json'},
data: {
accessPolicyIdentity: {user: '', group: '', iamUser: '', iamRole: ''},
accessPolicyResource: {portal: '', project: ''},
accessPolicyPermission: '',
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/access-policies';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accessPolicyIdentity":{"user":"","group":"","iamUser":"","iamRole":""},"accessPolicyResource":{"portal":"","project":""},"accessPolicyPermission":"","clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accessPolicyIdentity": @{ @"user": @"", @"group": @"", @"iamUser": @"", @"iamRole": @"" },
@"accessPolicyResource": @{ @"portal": @"", @"project": @"" },
@"accessPolicyPermission": @"",
@"clientToken": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/access-policies"]
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}}/access-policies" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/access-policies",
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([
'accessPolicyIdentity' => [
'user' => '',
'group' => '',
'iamUser' => '',
'iamRole' => ''
],
'accessPolicyResource' => [
'portal' => '',
'project' => ''
],
'accessPolicyPermission' => '',
'clientToken' => '',
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/access-policies', [
'body' => '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/access-policies');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accessPolicyIdentity' => [
'user' => '',
'group' => '',
'iamUser' => '',
'iamRole' => ''
],
'accessPolicyResource' => [
'portal' => '',
'project' => ''
],
'accessPolicyPermission' => '',
'clientToken' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accessPolicyIdentity' => [
'user' => '',
'group' => '',
'iamUser' => '',
'iamRole' => ''
],
'accessPolicyResource' => [
'portal' => '',
'project' => ''
],
'accessPolicyPermission' => '',
'clientToken' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/access-policies');
$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}}/access-policies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/access-policies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/access-policies", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/access-policies"
payload = {
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/access-policies"
payload <- "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/access-policies")
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 \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/access-policies') do |req|
req.body = "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/access-policies";
let payload = json!({
"accessPolicyIdentity": json!({
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
}),
"accessPolicyResource": json!({
"portal": "",
"project": ""
}),
"accessPolicyPermission": "",
"clientToken": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/access-policies \
--header 'content-type: application/json' \
--data '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": "",
"tags": {}
}'
echo '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": "",
"tags": {}
}' | \
http POST {{baseUrl}}/access-policies \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accessPolicyIdentity": {\n "user": "",\n "group": "",\n "iamUser": "",\n "iamRole": ""\n },\n "accessPolicyResource": {\n "portal": "",\n "project": ""\n },\n "accessPolicyPermission": "",\n "clientToken": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/access-policies
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accessPolicyIdentity": [
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
],
"accessPolicyResource": [
"portal": "",
"project": ""
],
"accessPolicyPermission": "",
"clientToken": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/access-policies")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateAsset
{{baseUrl}}/assets
BODY json
{
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": {},
"assetDescription": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets");
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 \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/assets" {:content-type :json
:form-params {:assetName ""
:assetModelId ""
:clientToken ""
:tags {}
:assetDescription ""}})
require "http/client"
url = "{{baseUrl}}/assets"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\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}}/assets"),
Content = new StringContent("{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\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}}/assets");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets"
payload := strings.NewReader("{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\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/assets HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 104
{
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": {},
"assetDescription": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/assets")
.setHeader("content-type", "application/json")
.setBody("{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\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 \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/assets")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/assets")
.header("content-type", "application/json")
.body("{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}")
.asString();
const data = JSON.stringify({
assetName: '',
assetModelId: '',
clientToken: '',
tags: {},
assetDescription: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/assets');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/assets',
headers: {'content-type': 'application/json'},
data: {
assetName: '',
assetModelId: '',
clientToken: '',
tags: {},
assetDescription: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetName":"","assetModelId":"","clientToken":"","tags":{},"assetDescription":""}'
};
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}}/assets',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assetName": "",\n "assetModelId": "",\n "clientToken": "",\n "tags": {},\n "assetDescription": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/assets")
.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/assets',
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({
assetName: '',
assetModelId: '',
clientToken: '',
tags: {},
assetDescription: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/assets',
headers: {'content-type': 'application/json'},
body: {
assetName: '',
assetModelId: '',
clientToken: '',
tags: {},
assetDescription: ''
},
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}}/assets');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assetName: '',
assetModelId: '',
clientToken: '',
tags: {},
assetDescription: ''
});
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}}/assets',
headers: {'content-type': 'application/json'},
data: {
assetName: '',
assetModelId: '',
clientToken: '',
tags: {},
assetDescription: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetName":"","assetModelId":"","clientToken":"","tags":{},"assetDescription":""}'
};
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 = @{ @"assetName": @"",
@"assetModelId": @"",
@"clientToken": @"",
@"tags": @{ },
@"assetDescription": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/assets"]
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}}/assets" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets",
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([
'assetName' => '',
'assetModelId' => '',
'clientToken' => '',
'tags' => [
],
'assetDescription' => ''
]),
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}}/assets', [
'body' => '{
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": {},
"assetDescription": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/assets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assetName' => '',
'assetModelId' => '',
'clientToken' => '',
'tags' => [
],
'assetDescription' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assetName' => '',
'assetModelId' => '',
'clientToken' => '',
'tags' => [
],
'assetDescription' => ''
]));
$request->setRequestUrl('{{baseUrl}}/assets');
$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}}/assets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": {},
"assetDescription": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": {},
"assetDescription": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/assets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets"
payload = {
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": {},
"assetDescription": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets"
payload <- "{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\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}}/assets")
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 \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\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/assets') do |req|
req.body = "{\n \"assetName\": \"\",\n \"assetModelId\": \"\",\n \"clientToken\": \"\",\n \"tags\": {},\n \"assetDescription\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets";
let payload = json!({
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": json!({}),
"assetDescription": ""
});
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}}/assets \
--header 'content-type: application/json' \
--data '{
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": {},
"assetDescription": ""
}'
echo '{
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": {},
"assetDescription": ""
}' | \
http POST {{baseUrl}}/assets \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assetName": "",\n "assetModelId": "",\n "clientToken": "",\n "tags": {},\n "assetDescription": ""\n}' \
--output-document \
- {{baseUrl}}/assets
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assetName": "",
"assetModelId": "",
"clientToken": "",
"tags": [],
"assetDescription": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateAssetModel
{{baseUrl}}/asset-models
BODY json
{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": ""
}
],
"clientToken": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset-models");
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 \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset-models" {:content-type :json
:form-params {:assetModelName ""
:assetModelDescription ""
:assetModelProperties [{:name ""
:dataType ""
:dataTypeSpec ""
:unit ""
:type ""}]
:assetModelHierarchies [{:name ""
:childAssetModelId ""}]
:assetModelCompositeModels [{:name ""
:description ""
:type ""
:properties ""}]
:clientToken ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/asset-models"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset-models"),
Content = new StringContent("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset-models");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset-models"
payload := strings.NewReader("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset-models HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 466
{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": ""
}
],
"clientToken": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset-models")
.setHeader("content-type", "application/json")
.setBody("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset-models"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset-models")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset-models")
.header("content-type", "application/json")
.body("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [
{
name: '',
dataType: '',
dataTypeSpec: '',
unit: '',
type: ''
}
],
assetModelHierarchies: [
{
name: '',
childAssetModelId: ''
}
],
assetModelCompositeModels: [
{
name: '',
description: '',
type: '',
properties: ''
}
],
clientToken: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset-models');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset-models',
headers: {'content-type': 'application/json'},
data: {
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [{name: '', dataType: '', dataTypeSpec: '', unit: '', type: ''}],
assetModelHierarchies: [{name: '', childAssetModelId: ''}],
assetModelCompositeModels: [{name: '', description: '', type: '', properties: ''}],
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset-models';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetModelName":"","assetModelDescription":"","assetModelProperties":[{"name":"","dataType":"","dataTypeSpec":"","unit":"","type":""}],"assetModelHierarchies":[{"name":"","childAssetModelId":""}],"assetModelCompositeModels":[{"name":"","description":"","type":"","properties":""}],"clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset-models',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assetModelName": "",\n "assetModelDescription": "",\n "assetModelProperties": [\n {\n "name": "",\n "dataType": "",\n "dataTypeSpec": "",\n "unit": "",\n "type": ""\n }\n ],\n "assetModelHierarchies": [\n {\n "name": "",\n "childAssetModelId": ""\n }\n ],\n "assetModelCompositeModels": [\n {\n "name": "",\n "description": "",\n "type": "",\n "properties": ""\n }\n ],\n "clientToken": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset-models")
.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/asset-models',
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({
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [{name: '', dataType: '', dataTypeSpec: '', unit: '', type: ''}],
assetModelHierarchies: [{name: '', childAssetModelId: ''}],
assetModelCompositeModels: [{name: '', description: '', type: '', properties: ''}],
clientToken: '',
tags: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset-models',
headers: {'content-type': 'application/json'},
body: {
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [{name: '', dataType: '', dataTypeSpec: '', unit: '', type: ''}],
assetModelHierarchies: [{name: '', childAssetModelId: ''}],
assetModelCompositeModels: [{name: '', description: '', type: '', properties: ''}],
clientToken: '',
tags: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset-models');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [
{
name: '',
dataType: '',
dataTypeSpec: '',
unit: '',
type: ''
}
],
assetModelHierarchies: [
{
name: '',
childAssetModelId: ''
}
],
assetModelCompositeModels: [
{
name: '',
description: '',
type: '',
properties: ''
}
],
clientToken: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset-models',
headers: {'content-type': 'application/json'},
data: {
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [{name: '', dataType: '', dataTypeSpec: '', unit: '', type: ''}],
assetModelHierarchies: [{name: '', childAssetModelId: ''}],
assetModelCompositeModels: [{name: '', description: '', type: '', properties: ''}],
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset-models';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assetModelName":"","assetModelDescription":"","assetModelProperties":[{"name":"","dataType":"","dataTypeSpec":"","unit":"","type":""}],"assetModelHierarchies":[{"name":"","childAssetModelId":""}],"assetModelCompositeModels":[{"name":"","description":"","type":"","properties":""}],"clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assetModelName": @"",
@"assetModelDescription": @"",
@"assetModelProperties": @[ @{ @"name": @"", @"dataType": @"", @"dataTypeSpec": @"", @"unit": @"", @"type": @"" } ],
@"assetModelHierarchies": @[ @{ @"name": @"", @"childAssetModelId": @"" } ],
@"assetModelCompositeModels": @[ @{ @"name": @"", @"description": @"", @"type": @"", @"properties": @"" } ],
@"clientToken": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset-models"]
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}}/asset-models" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset-models",
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([
'assetModelName' => '',
'assetModelDescription' => '',
'assetModelProperties' => [
[
'name' => '',
'dataType' => '',
'dataTypeSpec' => '',
'unit' => '',
'type' => ''
]
],
'assetModelHierarchies' => [
[
'name' => '',
'childAssetModelId' => ''
]
],
'assetModelCompositeModels' => [
[
'name' => '',
'description' => '',
'type' => '',
'properties' => ''
]
],
'clientToken' => '',
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset-models', [
'body' => '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": ""
}
],
"clientToken": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset-models');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assetModelName' => '',
'assetModelDescription' => '',
'assetModelProperties' => [
[
'name' => '',
'dataType' => '',
'dataTypeSpec' => '',
'unit' => '',
'type' => ''
]
],
'assetModelHierarchies' => [
[
'name' => '',
'childAssetModelId' => ''
]
],
'assetModelCompositeModels' => [
[
'name' => '',
'description' => '',
'type' => '',
'properties' => ''
]
],
'clientToken' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assetModelName' => '',
'assetModelDescription' => '',
'assetModelProperties' => [
[
'name' => '',
'dataType' => '',
'dataTypeSpec' => '',
'unit' => '',
'type' => ''
]
],
'assetModelHierarchies' => [
[
'name' => '',
'childAssetModelId' => ''
]
],
'assetModelCompositeModels' => [
[
'name' => '',
'description' => '',
'type' => '',
'properties' => ''
]
],
'clientToken' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/asset-models');
$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}}/asset-models' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": ""
}
],
"clientToken": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset-models' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": ""
}
],
"clientToken": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset-models", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset-models"
payload = {
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": ""
}
],
"clientToken": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset-models"
payload <- "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset-models")
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 \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset-models') do |req|
req.body = "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\"\n }\n ],\n \"clientToken\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset-models";
let payload = json!({
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": (
json!({
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
})
),
"assetModelHierarchies": (
json!({
"name": "",
"childAssetModelId": ""
})
),
"assetModelCompositeModels": (
json!({
"name": "",
"description": "",
"type": "",
"properties": ""
})
),
"clientToken": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset-models \
--header 'content-type: application/json' \
--data '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": ""
}
],
"clientToken": "",
"tags": {}
}'
echo '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": ""
}
],
"clientToken": "",
"tags": {}
}' | \
http POST {{baseUrl}}/asset-models \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assetModelName": "",\n "assetModelDescription": "",\n "assetModelProperties": [\n {\n "name": "",\n "dataType": "",\n "dataTypeSpec": "",\n "unit": "",\n "type": ""\n }\n ],\n "assetModelHierarchies": [\n {\n "name": "",\n "childAssetModelId": ""\n }\n ],\n "assetModelCompositeModels": [\n {\n "name": "",\n "description": "",\n "type": "",\n "properties": ""\n }\n ],\n "clientToken": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/asset-models
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
[
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
]
],
"assetModelHierarchies": [
[
"name": "",
"childAssetModelId": ""
]
],
"assetModelCompositeModels": [
[
"name": "",
"description": "",
"type": "",
"properties": ""
]
],
"clientToken": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset-models")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateBulkImportJob
{{baseUrl}}/jobs
BODY json
{
"jobName": "",
"jobRoleArn": "",
"files": [
{
"bucket": "",
"key": "",
"versionId": ""
}
],
"errorReportLocation": {
"bucket": "",
"prefix": ""
},
"jobConfiguration": {
"fileFormat": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs");
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 \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/jobs" {:content-type :json
:form-params {:jobName ""
:jobRoleArn ""
:files [{:bucket ""
:key ""
:versionId ""}]
:errorReportLocation {:bucket ""
:prefix ""}
:jobConfiguration {:fileFormat ""}}})
require "http/client"
url = "{{baseUrl}}/jobs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\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}}/jobs"),
Content = new StringContent("{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\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}}/jobs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs"
payload := strings.NewReader("{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\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/jobs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 245
{
"jobName": "",
"jobRoleArn": "",
"files": [
{
"bucket": "",
"key": "",
"versionId": ""
}
],
"errorReportLocation": {
"bucket": "",
"prefix": ""
},
"jobConfiguration": {
"fileFormat": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/jobs")
.setHeader("content-type", "application/json")
.setBody("{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\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 \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/jobs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/jobs")
.header("content-type", "application/json")
.body("{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
jobName: '',
jobRoleArn: '',
files: [
{
bucket: '',
key: '',
versionId: ''
}
],
errorReportLocation: {
bucket: '',
prefix: ''
},
jobConfiguration: {
fileFormat: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/jobs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/jobs',
headers: {'content-type': 'application/json'},
data: {
jobName: '',
jobRoleArn: '',
files: [{bucket: '', key: '', versionId: ''}],
errorReportLocation: {bucket: '', prefix: ''},
jobConfiguration: {fileFormat: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobName":"","jobRoleArn":"","files":[{"bucket":"","key":"","versionId":""}],"errorReportLocation":{"bucket":"","prefix":""},"jobConfiguration":{"fileFormat":""}}'
};
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}}/jobs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "jobName": "",\n "jobRoleArn": "",\n "files": [\n {\n "bucket": "",\n "key": "",\n "versionId": ""\n }\n ],\n "errorReportLocation": {\n "bucket": "",\n "prefix": ""\n },\n "jobConfiguration": {\n "fileFormat": ""\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 \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/jobs")
.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/jobs',
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({
jobName: '',
jobRoleArn: '',
files: [{bucket: '', key: '', versionId: ''}],
errorReportLocation: {bucket: '', prefix: ''},
jobConfiguration: {fileFormat: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/jobs',
headers: {'content-type': 'application/json'},
body: {
jobName: '',
jobRoleArn: '',
files: [{bucket: '', key: '', versionId: ''}],
errorReportLocation: {bucket: '', prefix: ''},
jobConfiguration: {fileFormat: ''}
},
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}}/jobs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
jobName: '',
jobRoleArn: '',
files: [
{
bucket: '',
key: '',
versionId: ''
}
],
errorReportLocation: {
bucket: '',
prefix: ''
},
jobConfiguration: {
fileFormat: ''
}
});
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}}/jobs',
headers: {'content-type': 'application/json'},
data: {
jobName: '',
jobRoleArn: '',
files: [{bucket: '', key: '', versionId: ''}],
errorReportLocation: {bucket: '', prefix: ''},
jobConfiguration: {fileFormat: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"jobName":"","jobRoleArn":"","files":[{"bucket":"","key":"","versionId":""}],"errorReportLocation":{"bucket":"","prefix":""},"jobConfiguration":{"fileFormat":""}}'
};
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 = @{ @"jobName": @"",
@"jobRoleArn": @"",
@"files": @[ @{ @"bucket": @"", @"key": @"", @"versionId": @"" } ],
@"errorReportLocation": @{ @"bucket": @"", @"prefix": @"" },
@"jobConfiguration": @{ @"fileFormat": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/jobs"]
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}}/jobs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs",
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([
'jobName' => '',
'jobRoleArn' => '',
'files' => [
[
'bucket' => '',
'key' => '',
'versionId' => ''
]
],
'errorReportLocation' => [
'bucket' => '',
'prefix' => ''
],
'jobConfiguration' => [
'fileFormat' => ''
]
]),
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}}/jobs', [
'body' => '{
"jobName": "",
"jobRoleArn": "",
"files": [
{
"bucket": "",
"key": "",
"versionId": ""
}
],
"errorReportLocation": {
"bucket": "",
"prefix": ""
},
"jobConfiguration": {
"fileFormat": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/jobs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'jobName' => '',
'jobRoleArn' => '',
'files' => [
[
'bucket' => '',
'key' => '',
'versionId' => ''
]
],
'errorReportLocation' => [
'bucket' => '',
'prefix' => ''
],
'jobConfiguration' => [
'fileFormat' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'jobName' => '',
'jobRoleArn' => '',
'files' => [
[
'bucket' => '',
'key' => '',
'versionId' => ''
]
],
'errorReportLocation' => [
'bucket' => '',
'prefix' => ''
],
'jobConfiguration' => [
'fileFormat' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/jobs');
$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}}/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobName": "",
"jobRoleArn": "",
"files": [
{
"bucket": "",
"key": "",
"versionId": ""
}
],
"errorReportLocation": {
"bucket": "",
"prefix": ""
},
"jobConfiguration": {
"fileFormat": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"jobName": "",
"jobRoleArn": "",
"files": [
{
"bucket": "",
"key": "",
"versionId": ""
}
],
"errorReportLocation": {
"bucket": "",
"prefix": ""
},
"jobConfiguration": {
"fileFormat": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/jobs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs"
payload = {
"jobName": "",
"jobRoleArn": "",
"files": [
{
"bucket": "",
"key": "",
"versionId": ""
}
],
"errorReportLocation": {
"bucket": "",
"prefix": ""
},
"jobConfiguration": { "fileFormat": "" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs"
payload <- "{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\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}}/jobs")
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 \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\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/jobs') do |req|
req.body = "{\n \"jobName\": \"\",\n \"jobRoleArn\": \"\",\n \"files\": [\n {\n \"bucket\": \"\",\n \"key\": \"\",\n \"versionId\": \"\"\n }\n ],\n \"errorReportLocation\": {\n \"bucket\": \"\",\n \"prefix\": \"\"\n },\n \"jobConfiguration\": {\n \"fileFormat\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/jobs";
let payload = json!({
"jobName": "",
"jobRoleArn": "",
"files": (
json!({
"bucket": "",
"key": "",
"versionId": ""
})
),
"errorReportLocation": json!({
"bucket": "",
"prefix": ""
}),
"jobConfiguration": json!({"fileFormat": ""})
});
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}}/jobs \
--header 'content-type: application/json' \
--data '{
"jobName": "",
"jobRoleArn": "",
"files": [
{
"bucket": "",
"key": "",
"versionId": ""
}
],
"errorReportLocation": {
"bucket": "",
"prefix": ""
},
"jobConfiguration": {
"fileFormat": ""
}
}'
echo '{
"jobName": "",
"jobRoleArn": "",
"files": [
{
"bucket": "",
"key": "",
"versionId": ""
}
],
"errorReportLocation": {
"bucket": "",
"prefix": ""
},
"jobConfiguration": {
"fileFormat": ""
}
}' | \
http POST {{baseUrl}}/jobs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "jobName": "",\n "jobRoleArn": "",\n "files": [\n {\n "bucket": "",\n "key": "",\n "versionId": ""\n }\n ],\n "errorReportLocation": {\n "bucket": "",\n "prefix": ""\n },\n "jobConfiguration": {\n "fileFormat": ""\n }\n}' \
--output-document \
- {{baseUrl}}/jobs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"jobName": "",
"jobRoleArn": "",
"files": [
[
"bucket": "",
"key": "",
"versionId": ""
]
],
"errorReportLocation": [
"bucket": "",
"prefix": ""
],
"jobConfiguration": ["fileFormat": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateDashboard
{{baseUrl}}/dashboards
BODY json
{
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dashboards");
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 \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/dashboards" {:content-type :json
:form-params {:projectId ""
:dashboardName ""
:dashboardDescription ""
:dashboardDefinition ""
:clientToken ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/dashboards"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/dashboards"),
Content = new StringContent("{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dashboards");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dashboards"
payload := strings.NewReader("{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/dashboards HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 138
{
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/dashboards")
.setHeader("content-type", "application/json")
.setBody("{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dashboards"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/dashboards")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/dashboards")
.header("content-type", "application/json")
.body("{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
projectId: '',
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/dashboards');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboards',
headers: {'content-type': 'application/json'},
data: {
projectId: '',
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dashboards';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"projectId":"","dashboardName":"","dashboardDescription":"","dashboardDefinition":"","clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/dashboards',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "projectId": "",\n "dashboardName": "",\n "dashboardDescription": "",\n "dashboardDefinition": "",\n "clientToken": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/dashboards")
.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/dashboards',
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({
projectId: '',
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: '',
tags: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboards',
headers: {'content-type': 'application/json'},
body: {
projectId: '',
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: '',
tags: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/dashboards');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
projectId: '',
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboards',
headers: {'content-type': 'application/json'},
data: {
projectId: '',
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dashboards';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"projectId":"","dashboardName":"","dashboardDescription":"","dashboardDefinition":"","clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"projectId": @"",
@"dashboardName": @"",
@"dashboardDescription": @"",
@"dashboardDefinition": @"",
@"clientToken": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/dashboards"]
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}}/dashboards" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dashboards",
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([
'projectId' => '',
'dashboardName' => '',
'dashboardDescription' => '',
'dashboardDefinition' => '',
'clientToken' => '',
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/dashboards', [
'body' => '{
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/dashboards');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'projectId' => '',
'dashboardName' => '',
'dashboardDescription' => '',
'dashboardDefinition' => '',
'clientToken' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'projectId' => '',
'dashboardName' => '',
'dashboardDescription' => '',
'dashboardDefinition' => '',
'clientToken' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/dashboards');
$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}}/dashboards' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dashboards' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/dashboards", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dashboards"
payload = {
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dashboards"
payload <- "{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dashboards")
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 \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/dashboards') do |req|
req.body = "{\n \"projectId\": \"\",\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dashboards";
let payload = json!({
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/dashboards \
--header 'content-type: application/json' \
--data '{
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": {}
}'
echo '{
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": {}
}' | \
http POST {{baseUrl}}/dashboards \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "projectId": "",\n "dashboardName": "",\n "dashboardDescription": "",\n "dashboardDefinition": "",\n "clientToken": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/dashboards
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"projectId": "",
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dashboards")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateGateway
{{baseUrl}}/20200301/gateways
BODY json
{
"gatewayName": "",
"gatewayPlatform": {
"greengrass": "",
"greengrassV2": ""
},
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/20200301/gateways");
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 \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/20200301/gateways" {:content-type :json
:form-params {:gatewayName ""
:gatewayPlatform {:greengrass ""
:greengrassV2 ""}
:tags {}}})
require "http/client"
url = "{{baseUrl}}/20200301/gateways"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/20200301/gateways"),
Content = new StringContent("{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/20200301/gateways");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/20200301/gateways"
payload := strings.NewReader("{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/20200301/gateways HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 110
{
"gatewayName": "",
"gatewayPlatform": {
"greengrass": "",
"greengrassV2": ""
},
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/20200301/gateways")
.setHeader("content-type", "application/json")
.setBody("{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/20200301/gateways"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/20200301/gateways")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/20200301/gateways")
.header("content-type", "application/json")
.body("{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
gatewayName: '',
gatewayPlatform: {
greengrass: '',
greengrassV2: ''
},
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/20200301/gateways');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/20200301/gateways',
headers: {'content-type': 'application/json'},
data: {gatewayName: '', gatewayPlatform: {greengrass: '', greengrassV2: ''}, tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/20200301/gateways';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"gatewayName":"","gatewayPlatform":{"greengrass":"","greengrassV2":""},"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/20200301/gateways',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "gatewayName": "",\n "gatewayPlatform": {\n "greengrass": "",\n "greengrassV2": ""\n },\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/20200301/gateways")
.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/20200301/gateways',
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({gatewayName: '', gatewayPlatform: {greengrass: '', greengrassV2: ''}, tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/20200301/gateways',
headers: {'content-type': 'application/json'},
body: {gatewayName: '', gatewayPlatform: {greengrass: '', greengrassV2: ''}, tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/20200301/gateways');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
gatewayName: '',
gatewayPlatform: {
greengrass: '',
greengrassV2: ''
},
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/20200301/gateways',
headers: {'content-type': 'application/json'},
data: {gatewayName: '', gatewayPlatform: {greengrass: '', greengrassV2: ''}, tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/20200301/gateways';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"gatewayName":"","gatewayPlatform":{"greengrass":"","greengrassV2":""},"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"gatewayName": @"",
@"gatewayPlatform": @{ @"greengrass": @"", @"greengrassV2": @"" },
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/20200301/gateways"]
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}}/20200301/gateways" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/20200301/gateways",
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([
'gatewayName' => '',
'gatewayPlatform' => [
'greengrass' => '',
'greengrassV2' => ''
],
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/20200301/gateways', [
'body' => '{
"gatewayName": "",
"gatewayPlatform": {
"greengrass": "",
"greengrassV2": ""
},
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/20200301/gateways');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'gatewayName' => '',
'gatewayPlatform' => [
'greengrass' => '',
'greengrassV2' => ''
],
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'gatewayName' => '',
'gatewayPlatform' => [
'greengrass' => '',
'greengrassV2' => ''
],
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/20200301/gateways');
$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}}/20200301/gateways' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"gatewayName": "",
"gatewayPlatform": {
"greengrass": "",
"greengrassV2": ""
},
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/20200301/gateways' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"gatewayName": "",
"gatewayPlatform": {
"greengrass": "",
"greengrassV2": ""
},
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/20200301/gateways", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/20200301/gateways"
payload = {
"gatewayName": "",
"gatewayPlatform": {
"greengrass": "",
"greengrassV2": ""
},
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/20200301/gateways"
payload <- "{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/20200301/gateways")
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 \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/20200301/gateways') do |req|
req.body = "{\n \"gatewayName\": \"\",\n \"gatewayPlatform\": {\n \"greengrass\": \"\",\n \"greengrassV2\": \"\"\n },\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/20200301/gateways";
let payload = json!({
"gatewayName": "",
"gatewayPlatform": json!({
"greengrass": "",
"greengrassV2": ""
}),
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/20200301/gateways \
--header 'content-type: application/json' \
--data '{
"gatewayName": "",
"gatewayPlatform": {
"greengrass": "",
"greengrassV2": ""
},
"tags": {}
}'
echo '{
"gatewayName": "",
"gatewayPlatform": {
"greengrass": "",
"greengrassV2": ""
},
"tags": {}
}' | \
http POST {{baseUrl}}/20200301/gateways \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "gatewayName": "",\n "gatewayPlatform": {\n "greengrass": "",\n "greengrassV2": ""\n },\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/20200301/gateways
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"gatewayName": "",
"gatewayPlatform": [
"greengrass": "",
"greengrassV2": ""
],
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/20200301/gateways")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreatePortal
{{baseUrl}}/portals
BODY json
{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": {
"data": "",
"type": ""
},
"roleArn": "",
"tags": {},
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/portals");
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 \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/portals" {:content-type :json
:form-params {:portalName ""
:portalDescription ""
:portalContactEmail ""
:clientToken ""
:portalLogoImageFile {:data ""
:type ""}
:roleArn ""
:tags {}
:portalAuthMode ""
:notificationSenderEmail ""
:alarms {:alarmRoleArn ""
:notificationLambdaArn ""}}})
require "http/client"
url = "{{baseUrl}}/portals"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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}}/portals"),
Content = new StringContent("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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}}/portals");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/portals"
payload := strings.NewReader("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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/portals HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 324
{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": {
"data": "",
"type": ""
},
"roleArn": "",
"tags": {},
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/portals")
.setHeader("content-type", "application/json")
.setBody("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/portals"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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 \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/portals")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/portals")
.header("content-type", "application/json")
.body("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
portalName: '',
portalDescription: '',
portalContactEmail: '',
clientToken: '',
portalLogoImageFile: {
data: '',
type: ''
},
roleArn: '',
tags: {},
portalAuthMode: '',
notificationSenderEmail: '',
alarms: {
alarmRoleArn: '',
notificationLambdaArn: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/portals');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/portals',
headers: {'content-type': 'application/json'},
data: {
portalName: '',
portalDescription: '',
portalContactEmail: '',
clientToken: '',
portalLogoImageFile: {data: '', type: ''},
roleArn: '',
tags: {},
portalAuthMode: '',
notificationSenderEmail: '',
alarms: {alarmRoleArn: '', notificationLambdaArn: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/portals';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"portalName":"","portalDescription":"","portalContactEmail":"","clientToken":"","portalLogoImageFile":{"data":"","type":""},"roleArn":"","tags":{},"portalAuthMode":"","notificationSenderEmail":"","alarms":{"alarmRoleArn":"","notificationLambdaArn":""}}'
};
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}}/portals',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "portalName": "",\n "portalDescription": "",\n "portalContactEmail": "",\n "clientToken": "",\n "portalLogoImageFile": {\n "data": "",\n "type": ""\n },\n "roleArn": "",\n "tags": {},\n "portalAuthMode": "",\n "notificationSenderEmail": "",\n "alarms": {\n "alarmRoleArn": "",\n "notificationLambdaArn": ""\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 \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/portals")
.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/portals',
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({
portalName: '',
portalDescription: '',
portalContactEmail: '',
clientToken: '',
portalLogoImageFile: {data: '', type: ''},
roleArn: '',
tags: {},
portalAuthMode: '',
notificationSenderEmail: '',
alarms: {alarmRoleArn: '', notificationLambdaArn: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/portals',
headers: {'content-type': 'application/json'},
body: {
portalName: '',
portalDescription: '',
portalContactEmail: '',
clientToken: '',
portalLogoImageFile: {data: '', type: ''},
roleArn: '',
tags: {},
portalAuthMode: '',
notificationSenderEmail: '',
alarms: {alarmRoleArn: '', notificationLambdaArn: ''}
},
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}}/portals');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
portalName: '',
portalDescription: '',
portalContactEmail: '',
clientToken: '',
portalLogoImageFile: {
data: '',
type: ''
},
roleArn: '',
tags: {},
portalAuthMode: '',
notificationSenderEmail: '',
alarms: {
alarmRoleArn: '',
notificationLambdaArn: ''
}
});
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}}/portals',
headers: {'content-type': 'application/json'},
data: {
portalName: '',
portalDescription: '',
portalContactEmail: '',
clientToken: '',
portalLogoImageFile: {data: '', type: ''},
roleArn: '',
tags: {},
portalAuthMode: '',
notificationSenderEmail: '',
alarms: {alarmRoleArn: '', notificationLambdaArn: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/portals';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"portalName":"","portalDescription":"","portalContactEmail":"","clientToken":"","portalLogoImageFile":{"data":"","type":""},"roleArn":"","tags":{},"portalAuthMode":"","notificationSenderEmail":"","alarms":{"alarmRoleArn":"","notificationLambdaArn":""}}'
};
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 = @{ @"portalName": @"",
@"portalDescription": @"",
@"portalContactEmail": @"",
@"clientToken": @"",
@"portalLogoImageFile": @{ @"data": @"", @"type": @"" },
@"roleArn": @"",
@"tags": @{ },
@"portalAuthMode": @"",
@"notificationSenderEmail": @"",
@"alarms": @{ @"alarmRoleArn": @"", @"notificationLambdaArn": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/portals"]
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}}/portals" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/portals",
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([
'portalName' => '',
'portalDescription' => '',
'portalContactEmail' => '',
'clientToken' => '',
'portalLogoImageFile' => [
'data' => '',
'type' => ''
],
'roleArn' => '',
'tags' => [
],
'portalAuthMode' => '',
'notificationSenderEmail' => '',
'alarms' => [
'alarmRoleArn' => '',
'notificationLambdaArn' => ''
]
]),
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}}/portals', [
'body' => '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": {
"data": "",
"type": ""
},
"roleArn": "",
"tags": {},
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/portals');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'portalName' => '',
'portalDescription' => '',
'portalContactEmail' => '',
'clientToken' => '',
'portalLogoImageFile' => [
'data' => '',
'type' => ''
],
'roleArn' => '',
'tags' => [
],
'portalAuthMode' => '',
'notificationSenderEmail' => '',
'alarms' => [
'alarmRoleArn' => '',
'notificationLambdaArn' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'portalName' => '',
'portalDescription' => '',
'portalContactEmail' => '',
'clientToken' => '',
'portalLogoImageFile' => [
'data' => '',
'type' => ''
],
'roleArn' => '',
'tags' => [
],
'portalAuthMode' => '',
'notificationSenderEmail' => '',
'alarms' => [
'alarmRoleArn' => '',
'notificationLambdaArn' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/portals');
$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}}/portals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": {
"data": "",
"type": ""
},
"roleArn": "",
"tags": {},
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/portals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": {
"data": "",
"type": ""
},
"roleArn": "",
"tags": {},
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/portals", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/portals"
payload = {
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": {
"data": "",
"type": ""
},
"roleArn": "",
"tags": {},
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/portals"
payload <- "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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}}/portals")
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 \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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/portals') do |req|
req.body = "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"clientToken\": \"\",\n \"portalLogoImageFile\": {\n \"data\": \"\",\n \"type\": \"\"\n },\n \"roleArn\": \"\",\n \"tags\": {},\n \"portalAuthMode\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/portals";
let payload = json!({
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": json!({
"data": "",
"type": ""
}),
"roleArn": "",
"tags": json!({}),
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": json!({
"alarmRoleArn": "",
"notificationLambdaArn": ""
})
});
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}}/portals \
--header 'content-type: application/json' \
--data '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": {
"data": "",
"type": ""
},
"roleArn": "",
"tags": {},
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}'
echo '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": {
"data": "",
"type": ""
},
"roleArn": "",
"tags": {},
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}' | \
http POST {{baseUrl}}/portals \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "portalName": "",\n "portalDescription": "",\n "portalContactEmail": "",\n "clientToken": "",\n "portalLogoImageFile": {\n "data": "",\n "type": ""\n },\n "roleArn": "",\n "tags": {},\n "portalAuthMode": "",\n "notificationSenderEmail": "",\n "alarms": {\n "alarmRoleArn": "",\n "notificationLambdaArn": ""\n }\n}' \
--output-document \
- {{baseUrl}}/portals
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"clientToken": "",
"portalLogoImageFile": [
"data": "",
"type": ""
],
"roleArn": "",
"tags": [],
"portalAuthMode": "",
"notificationSenderEmail": "",
"alarms": [
"alarmRoleArn": "",
"notificationLambdaArn": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/portals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateProject
{{baseUrl}}/projects
BODY json
{
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects");
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 \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/projects" {:content-type :json
:form-params {:portalId ""
:projectName ""
:projectDescription ""
:clientToken ""
:tags {}}})
require "http/client"
url = "{{baseUrl}}/projects"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/projects"),
Content = new StringContent("{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects"
payload := strings.NewReader("{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/projects HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 104
{
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/projects")
.setHeader("content-type", "application/json")
.setBody("{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/projects")
.header("content-type", "application/json")
.body("{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
portalId: '',
projectName: '',
projectDescription: '',
clientToken: '',
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/projects');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/projects',
headers: {'content-type': 'application/json'},
data: {
portalId: '',
projectName: '',
projectDescription: '',
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"portalId":"","projectName":"","projectDescription":"","clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "portalId": "",\n "projectName": "",\n "projectDescription": "",\n "clientToken": "",\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects")
.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',
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({
portalId: '',
projectName: '',
projectDescription: '',
clientToken: '',
tags: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/projects',
headers: {'content-type': 'application/json'},
body: {
portalId: '',
projectName: '',
projectDescription: '',
clientToken: '',
tags: {}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/projects');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
portalId: '',
projectName: '',
projectDescription: '',
clientToken: '',
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/projects',
headers: {'content-type': 'application/json'},
data: {
portalId: '',
projectName: '',
projectDescription: '',
clientToken: '',
tags: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"portalId":"","projectName":"","projectDescription":"","clientToken":"","tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"portalId": @"",
@"projectName": @"",
@"projectDescription": @"",
@"clientToken": @"",
@"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/projects"]
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" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST 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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'portalId' => '',
'projectName' => '',
'projectDescription' => '',
'clientToken' => '',
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/projects', [
'body' => '{
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'portalId' => '',
'projectName' => '',
'projectDescription' => '',
'clientToken' => '',
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'portalId' => '',
'projectName' => '',
'projectDescription' => '',
'clientToken' => '',
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/projects');
$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' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/projects", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects"
payload = {
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects"
payload <- "{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects")
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 \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/projects') do |req|
req.body = "{\n \"portalId\": \"\",\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\",\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects";
let payload = json!({
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/projects \
--header 'content-type: application/json' \
--data '{
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": {}
}'
echo '{
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": {}
}' | \
http POST {{baseUrl}}/projects \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "portalId": "",\n "projectName": "",\n "projectDescription": "",\n "clientToken": "",\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/projects
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"portalId": "",
"projectName": "",
"projectDescription": "",
"clientToken": "",
"tags": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteAccessPolicy
{{baseUrl}}/access-policies/:accessPolicyId
QUERY PARAMS
accessPolicyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/access-policies/:accessPolicyId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/access-policies/:accessPolicyId")
require "http/client"
url = "{{baseUrl}}/access-policies/:accessPolicyId"
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}}/access-policies/:accessPolicyId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/access-policies/:accessPolicyId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/access-policies/:accessPolicyId"
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/access-policies/:accessPolicyId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/access-policies/:accessPolicyId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/access-policies/:accessPolicyId"))
.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}}/access-policies/:accessPolicyId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/access-policies/:accessPolicyId")
.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}}/access-policies/:accessPolicyId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/access-policies/:accessPolicyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/access-policies/:accessPolicyId';
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}}/access-policies/:accessPolicyId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/access-policies/:accessPolicyId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/access-policies/:accessPolicyId',
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}}/access-policies/:accessPolicyId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/access-policies/:accessPolicyId');
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}}/access-policies/:accessPolicyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/access-policies/:accessPolicyId';
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}}/access-policies/:accessPolicyId"]
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}}/access-policies/:accessPolicyId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/access-policies/:accessPolicyId",
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}}/access-policies/:accessPolicyId');
echo $response->getBody();
setUrl('{{baseUrl}}/access-policies/:accessPolicyId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/access-policies/:accessPolicyId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/access-policies/:accessPolicyId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/access-policies/:accessPolicyId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/access-policies/:accessPolicyId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/access-policies/:accessPolicyId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/access-policies/:accessPolicyId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/access-policies/:accessPolicyId")
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/access-policies/:accessPolicyId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/access-policies/:accessPolicyId";
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}}/access-policies/:accessPolicyId
http DELETE {{baseUrl}}/access-policies/:accessPolicyId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/access-policies/:accessPolicyId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/access-policies/:accessPolicyId")! 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
DeleteAsset
{{baseUrl}}/assets/:assetId
QUERY PARAMS
assetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/assets/:assetId")
require "http/client"
url = "{{baseUrl}}/assets/:assetId"
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}}/assets/:assetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets/:assetId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId"
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/assets/:assetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/assets/:assetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId"))
.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}}/assets/:assetId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/assets/:assetId")
.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}}/assets/:assetId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/assets/:assetId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId';
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}}/assets/:assetId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId',
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}}/assets/:assetId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/assets/:assetId');
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}}/assets/:assetId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId';
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}}/assets/:assetId"]
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}}/assets/:assetId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId",
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}}/assets/:assetId');
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/assets/:assetId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/assets/:assetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId")
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/assets/:assetId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets/:assetId";
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}}/assets/:assetId
http DELETE {{baseUrl}}/assets/:assetId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/assets/:assetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId")! 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
DeleteAssetModel
{{baseUrl}}/asset-models/:assetModelId
QUERY PARAMS
assetModelId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset-models/:assetModelId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/asset-models/:assetModelId")
require "http/client"
url = "{{baseUrl}}/asset-models/:assetModelId"
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}}/asset-models/:assetModelId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset-models/:assetModelId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset-models/:assetModelId"
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/asset-models/:assetModelId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/asset-models/:assetModelId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset-models/:assetModelId"))
.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}}/asset-models/:assetModelId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/asset-models/:assetModelId")
.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}}/asset-models/:assetModelId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/asset-models/:assetModelId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset-models/:assetModelId';
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}}/asset-models/:assetModelId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/asset-models/:assetModelId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset-models/:assetModelId',
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}}/asset-models/:assetModelId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/asset-models/:assetModelId');
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}}/asset-models/:assetModelId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset-models/:assetModelId';
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}}/asset-models/:assetModelId"]
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}}/asset-models/:assetModelId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset-models/:assetModelId",
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}}/asset-models/:assetModelId');
echo $response->getBody();
setUrl('{{baseUrl}}/asset-models/:assetModelId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/asset-models/:assetModelId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset-models/:assetModelId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset-models/:assetModelId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/asset-models/:assetModelId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset-models/:assetModelId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset-models/:assetModelId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset-models/:assetModelId")
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/asset-models/:assetModelId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset-models/:assetModelId";
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}}/asset-models/:assetModelId
http DELETE {{baseUrl}}/asset-models/:assetModelId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/asset-models/:assetModelId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset-models/:assetModelId")! 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
DeleteDashboard
{{baseUrl}}/dashboards/:dashboardId
QUERY PARAMS
dashboardId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dashboards/:dashboardId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/dashboards/:dashboardId")
require "http/client"
url = "{{baseUrl}}/dashboards/:dashboardId"
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}}/dashboards/:dashboardId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dashboards/:dashboardId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dashboards/:dashboardId"
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/dashboards/:dashboardId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/dashboards/:dashboardId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dashboards/:dashboardId"))
.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}}/dashboards/:dashboardId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/dashboards/:dashboardId")
.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}}/dashboards/:dashboardId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/dashboards/:dashboardId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dashboards/:dashboardId';
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}}/dashboards/:dashboardId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dashboards/:dashboardId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/dashboards/:dashboardId',
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}}/dashboards/:dashboardId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/dashboards/:dashboardId');
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}}/dashboards/:dashboardId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dashboards/:dashboardId';
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}}/dashboards/:dashboardId"]
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}}/dashboards/:dashboardId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dashboards/:dashboardId",
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}}/dashboards/:dashboardId');
echo $response->getBody();
setUrl('{{baseUrl}}/dashboards/:dashboardId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dashboards/:dashboardId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dashboards/:dashboardId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dashboards/:dashboardId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/dashboards/:dashboardId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dashboards/:dashboardId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dashboards/:dashboardId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dashboards/:dashboardId")
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/dashboards/:dashboardId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dashboards/:dashboardId";
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}}/dashboards/:dashboardId
http DELETE {{baseUrl}}/dashboards/:dashboardId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/dashboards/:dashboardId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dashboards/:dashboardId")! 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
DeleteGateway
{{baseUrl}}/20200301/gateways/:gatewayId
QUERY PARAMS
gatewayId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/20200301/gateways/:gatewayId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/20200301/gateways/:gatewayId")
require "http/client"
url = "{{baseUrl}}/20200301/gateways/:gatewayId"
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}}/20200301/gateways/:gatewayId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/20200301/gateways/:gatewayId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/20200301/gateways/:gatewayId"
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/20200301/gateways/:gatewayId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/20200301/gateways/:gatewayId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/20200301/gateways/:gatewayId"))
.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}}/20200301/gateways/:gatewayId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/20200301/gateways/:gatewayId")
.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}}/20200301/gateways/:gatewayId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/20200301/gateways/:gatewayId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/20200301/gateways/:gatewayId';
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}}/20200301/gateways/:gatewayId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/20200301/gateways/:gatewayId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/20200301/gateways/:gatewayId',
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}}/20200301/gateways/:gatewayId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/20200301/gateways/:gatewayId');
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}}/20200301/gateways/:gatewayId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/20200301/gateways/:gatewayId';
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}}/20200301/gateways/:gatewayId"]
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}}/20200301/gateways/:gatewayId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/20200301/gateways/:gatewayId",
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}}/20200301/gateways/:gatewayId');
echo $response->getBody();
setUrl('{{baseUrl}}/20200301/gateways/:gatewayId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/20200301/gateways/:gatewayId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/20200301/gateways/:gatewayId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/20200301/gateways/:gatewayId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/20200301/gateways/:gatewayId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/20200301/gateways/:gatewayId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/20200301/gateways/:gatewayId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/20200301/gateways/:gatewayId")
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/20200301/gateways/:gatewayId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/20200301/gateways/:gatewayId";
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}}/20200301/gateways/:gatewayId
http DELETE {{baseUrl}}/20200301/gateways/:gatewayId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/20200301/gateways/:gatewayId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/20200301/gateways/:gatewayId")! 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
DeletePortal
{{baseUrl}}/portals/:portalId
QUERY PARAMS
portalId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/portals/:portalId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/portals/:portalId")
require "http/client"
url = "{{baseUrl}}/portals/:portalId"
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}}/portals/:portalId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/portals/:portalId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/portals/:portalId"
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/portals/:portalId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/portals/:portalId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/portals/:portalId"))
.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}}/portals/:portalId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/portals/:portalId")
.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}}/portals/:portalId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/portals/:portalId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/portals/:portalId';
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}}/portals/:portalId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/portals/:portalId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/portals/:portalId',
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}}/portals/:portalId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/portals/:portalId');
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}}/portals/:portalId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/portals/:portalId';
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}}/portals/:portalId"]
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}}/portals/:portalId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/portals/:portalId",
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}}/portals/:portalId');
echo $response->getBody();
setUrl('{{baseUrl}}/portals/:portalId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/portals/:portalId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/portals/:portalId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/portals/:portalId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/portals/:portalId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/portals/:portalId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/portals/:portalId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/portals/:portalId")
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/portals/:portalId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/portals/:portalId";
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}}/portals/:portalId
http DELETE {{baseUrl}}/portals/:portalId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/portals/:portalId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/portals/:portalId")! 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
DeleteProject
{{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
DeleteTimeSeries
{{baseUrl}}/timeseries/delete/
BODY json
{
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/timeseries/delete/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/timeseries/delete/" {:content-type :json
:form-params {:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/timeseries/delete/"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/timeseries/delete/"),
Content = new StringContent("{\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/timeseries/delete/");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/timeseries/delete/"
payload := strings.NewReader("{\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/timeseries/delete/ HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/timeseries/delete/")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/timeseries/delete/"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/timeseries/delete/")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/timeseries/delete/")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/timeseries/delete/');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/delete/',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/timeseries/delete/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/timeseries/delete/',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/timeseries/delete/")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/timeseries/delete/',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/delete/',
headers: {'content-type': 'application/json'},
body: {clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/timeseries/delete/');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/delete/',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/timeseries/delete/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/timeseries/delete/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/timeseries/delete/" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/timeseries/delete/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/timeseries/delete/', [
'body' => '{
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/timeseries/delete/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/timeseries/delete/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/timeseries/delete/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/timeseries/delete/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/timeseries/delete/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/timeseries/delete/"
payload = { "clientToken": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/timeseries/delete/"
payload <- "{\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/timeseries/delete/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/timeseries/delete/') do |req|
req.body = "{\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/timeseries/delete/";
let payload = json!({"clientToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/timeseries/delete/ \
--header 'content-type: application/json' \
--data '{
"clientToken": ""
}'
echo '{
"clientToken": ""
}' | \
http POST {{baseUrl}}/timeseries/delete/ \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/timeseries/delete/
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clientToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/timeseries/delete/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeAccessPolicy
{{baseUrl}}/access-policies/:accessPolicyId
QUERY PARAMS
accessPolicyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/access-policies/:accessPolicyId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/access-policies/:accessPolicyId")
require "http/client"
url = "{{baseUrl}}/access-policies/:accessPolicyId"
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}}/access-policies/:accessPolicyId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/access-policies/:accessPolicyId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/access-policies/:accessPolicyId"
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/access-policies/:accessPolicyId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/access-policies/:accessPolicyId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/access-policies/:accessPolicyId"))
.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}}/access-policies/:accessPolicyId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/access-policies/:accessPolicyId")
.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}}/access-policies/:accessPolicyId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/access-policies/:accessPolicyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/access-policies/:accessPolicyId';
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}}/access-policies/:accessPolicyId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/access-policies/:accessPolicyId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/access-policies/:accessPolicyId',
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}}/access-policies/:accessPolicyId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/access-policies/:accessPolicyId');
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}}/access-policies/:accessPolicyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/access-policies/:accessPolicyId';
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}}/access-policies/:accessPolicyId"]
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}}/access-policies/:accessPolicyId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/access-policies/:accessPolicyId",
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}}/access-policies/:accessPolicyId');
echo $response->getBody();
setUrl('{{baseUrl}}/access-policies/:accessPolicyId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/access-policies/:accessPolicyId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/access-policies/:accessPolicyId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/access-policies/:accessPolicyId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/access-policies/:accessPolicyId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/access-policies/:accessPolicyId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/access-policies/:accessPolicyId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/access-policies/:accessPolicyId")
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/access-policies/:accessPolicyId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/access-policies/:accessPolicyId";
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}}/access-policies/:accessPolicyId
http GET {{baseUrl}}/access-policies/:accessPolicyId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/access-policies/:accessPolicyId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/access-policies/:accessPolicyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeAsset
{{baseUrl}}/assets/:assetId
QUERY PARAMS
assetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/assets/:assetId")
require "http/client"
url = "{{baseUrl}}/assets/:assetId"
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}}/assets/:assetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets/:assetId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId"
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/assets/:assetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/assets/:assetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId"))
.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}}/assets/:assetId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/assets/:assetId")
.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}}/assets/:assetId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/assets/:assetId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId';
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}}/assets/:assetId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId',
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}}/assets/:assetId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/assets/:assetId');
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}}/assets/:assetId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId';
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}}/assets/:assetId"]
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}}/assets/:assetId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId",
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}}/assets/:assetId');
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/assets/:assetId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/assets/:assetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId")
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/assets/:assetId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets/:assetId";
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}}/assets/:assetId
http GET {{baseUrl}}/assets/:assetId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/assets/:assetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeAssetModel
{{baseUrl}}/asset-models/:assetModelId
QUERY PARAMS
assetModelId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset-models/:assetModelId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/asset-models/:assetModelId")
require "http/client"
url = "{{baseUrl}}/asset-models/:assetModelId"
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}}/asset-models/:assetModelId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset-models/:assetModelId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset-models/:assetModelId"
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/asset-models/:assetModelId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/asset-models/:assetModelId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset-models/:assetModelId"))
.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}}/asset-models/:assetModelId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/asset-models/:assetModelId")
.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}}/asset-models/:assetModelId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/asset-models/:assetModelId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset-models/:assetModelId';
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}}/asset-models/:assetModelId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/asset-models/:assetModelId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset-models/:assetModelId',
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}}/asset-models/:assetModelId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/asset-models/:assetModelId');
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}}/asset-models/:assetModelId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset-models/:assetModelId';
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}}/asset-models/:assetModelId"]
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}}/asset-models/:assetModelId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset-models/:assetModelId",
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}}/asset-models/:assetModelId');
echo $response->getBody();
setUrl('{{baseUrl}}/asset-models/:assetModelId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/asset-models/:assetModelId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset-models/:assetModelId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset-models/:assetModelId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/asset-models/:assetModelId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset-models/:assetModelId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset-models/:assetModelId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset-models/:assetModelId")
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/asset-models/:assetModelId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset-models/:assetModelId";
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}}/asset-models/:assetModelId
http GET {{baseUrl}}/asset-models/:assetModelId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/asset-models/:assetModelId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset-models/:assetModelId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeAssetProperty
{{baseUrl}}/assets/:assetId/properties/:propertyId
QUERY PARAMS
assetId
propertyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId/properties/:propertyId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/assets/:assetId/properties/:propertyId")
require "http/client"
url = "{{baseUrl}}/assets/:assetId/properties/:propertyId"
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}}/assets/:assetId/properties/:propertyId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets/:assetId/properties/:propertyId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId/properties/:propertyId"
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/assets/:assetId/properties/:propertyId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/assets/:assetId/properties/:propertyId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId/properties/:propertyId"))
.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}}/assets/:assetId/properties/:propertyId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/assets/:assetId/properties/:propertyId")
.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}}/assets/:assetId/properties/:propertyId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/assets/:assetId/properties/:propertyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId/properties/:propertyId';
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}}/assets/:assetId/properties/:propertyId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId/properties/:propertyId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId/properties/:propertyId',
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}}/assets/:assetId/properties/:propertyId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/assets/:assetId/properties/:propertyId');
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}}/assets/:assetId/properties/:propertyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId/properties/:propertyId';
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}}/assets/:assetId/properties/:propertyId"]
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}}/assets/:assetId/properties/:propertyId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId/properties/:propertyId",
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}}/assets/:assetId/properties/:propertyId');
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId/properties/:propertyId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/assets/:assetId/properties/:propertyId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId/properties/:propertyId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId/properties/:propertyId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/assets/:assetId/properties/:propertyId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId/properties/:propertyId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId/properties/:propertyId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId/properties/:propertyId")
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/assets/:assetId/properties/:propertyId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets/:assetId/properties/:propertyId";
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}}/assets/:assetId/properties/:propertyId
http GET {{baseUrl}}/assets/:assetId/properties/:propertyId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/assets/:assetId/properties/:propertyId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId/properties/:propertyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeBulkImportJob
{{baseUrl}}/jobs/:jobId
QUERY PARAMS
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs/:jobId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/jobs/:jobId")
require "http/client"
url = "{{baseUrl}}/jobs/:jobId"
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}}/jobs/:jobId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs/:jobId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs/:jobId"
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/jobs/:jobId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/jobs/:jobId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs/:jobId"))
.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}}/jobs/:jobId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/jobs/:jobId")
.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}}/jobs/:jobId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/jobs/:jobId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs/:jobId';
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}}/jobs/:jobId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/jobs/:jobId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/jobs/:jobId',
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}}/jobs/:jobId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/jobs/:jobId');
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}}/jobs/:jobId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs/:jobId';
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}}/jobs/:jobId"]
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}}/jobs/:jobId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs/:jobId",
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}}/jobs/:jobId');
echo $response->getBody();
setUrl('{{baseUrl}}/jobs/:jobId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/jobs/:jobId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/jobs/:jobId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs/:jobId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/jobs/:jobId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs/:jobId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs/:jobId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs/:jobId")
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/jobs/:jobId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/jobs/:jobId";
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}}/jobs/:jobId
http GET {{baseUrl}}/jobs/:jobId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/jobs/:jobId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs/:jobId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeDashboard
{{baseUrl}}/dashboards/:dashboardId
QUERY PARAMS
dashboardId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dashboards/:dashboardId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/dashboards/:dashboardId")
require "http/client"
url = "{{baseUrl}}/dashboards/:dashboardId"
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}}/dashboards/:dashboardId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dashboards/:dashboardId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dashboards/:dashboardId"
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/dashboards/:dashboardId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/dashboards/:dashboardId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dashboards/:dashboardId"))
.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}}/dashboards/:dashboardId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/dashboards/:dashboardId")
.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}}/dashboards/:dashboardId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/dashboards/:dashboardId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dashboards/:dashboardId';
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}}/dashboards/:dashboardId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dashboards/:dashboardId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/dashboards/:dashboardId',
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}}/dashboards/:dashboardId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/dashboards/:dashboardId');
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}}/dashboards/:dashboardId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dashboards/:dashboardId';
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}}/dashboards/:dashboardId"]
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}}/dashboards/:dashboardId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dashboards/:dashboardId",
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}}/dashboards/:dashboardId');
echo $response->getBody();
setUrl('{{baseUrl}}/dashboards/:dashboardId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dashboards/:dashboardId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dashboards/:dashboardId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dashboards/:dashboardId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/dashboards/:dashboardId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dashboards/:dashboardId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dashboards/:dashboardId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dashboards/:dashboardId")
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/dashboards/:dashboardId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dashboards/:dashboardId";
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}}/dashboards/:dashboardId
http GET {{baseUrl}}/dashboards/:dashboardId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/dashboards/:dashboardId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dashboards/:dashboardId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeDefaultEncryptionConfiguration
{{baseUrl}}/configuration/account/encryption
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/configuration/account/encryption");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/configuration/account/encryption")
require "http/client"
url = "{{baseUrl}}/configuration/account/encryption"
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}}/configuration/account/encryption"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/configuration/account/encryption");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/configuration/account/encryption"
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/configuration/account/encryption HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/configuration/account/encryption")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/configuration/account/encryption"))
.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}}/configuration/account/encryption")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/configuration/account/encryption")
.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}}/configuration/account/encryption');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/configuration/account/encryption'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/configuration/account/encryption';
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}}/configuration/account/encryption',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/configuration/account/encryption")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/configuration/account/encryption',
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}}/configuration/account/encryption'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/configuration/account/encryption');
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}}/configuration/account/encryption'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/configuration/account/encryption';
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}}/configuration/account/encryption"]
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}}/configuration/account/encryption" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/configuration/account/encryption",
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}}/configuration/account/encryption');
echo $response->getBody();
setUrl('{{baseUrl}}/configuration/account/encryption');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/configuration/account/encryption');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/configuration/account/encryption' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/configuration/account/encryption' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/configuration/account/encryption")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/configuration/account/encryption"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/configuration/account/encryption"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/configuration/account/encryption")
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/configuration/account/encryption') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/configuration/account/encryption";
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}}/configuration/account/encryption
http GET {{baseUrl}}/configuration/account/encryption
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/configuration/account/encryption
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/configuration/account/encryption")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeGateway
{{baseUrl}}/20200301/gateways/:gatewayId
QUERY PARAMS
gatewayId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/20200301/gateways/:gatewayId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/20200301/gateways/:gatewayId")
require "http/client"
url = "{{baseUrl}}/20200301/gateways/:gatewayId"
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}}/20200301/gateways/:gatewayId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/20200301/gateways/:gatewayId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/20200301/gateways/:gatewayId"
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/20200301/gateways/:gatewayId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/20200301/gateways/:gatewayId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/20200301/gateways/:gatewayId"))
.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}}/20200301/gateways/:gatewayId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/20200301/gateways/:gatewayId")
.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}}/20200301/gateways/:gatewayId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/20200301/gateways/:gatewayId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/20200301/gateways/:gatewayId';
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}}/20200301/gateways/:gatewayId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/20200301/gateways/:gatewayId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/20200301/gateways/:gatewayId',
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}}/20200301/gateways/:gatewayId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/20200301/gateways/:gatewayId');
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}}/20200301/gateways/:gatewayId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/20200301/gateways/:gatewayId';
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}}/20200301/gateways/:gatewayId"]
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}}/20200301/gateways/:gatewayId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/20200301/gateways/:gatewayId",
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}}/20200301/gateways/:gatewayId');
echo $response->getBody();
setUrl('{{baseUrl}}/20200301/gateways/:gatewayId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/20200301/gateways/:gatewayId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/20200301/gateways/:gatewayId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/20200301/gateways/:gatewayId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/20200301/gateways/:gatewayId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/20200301/gateways/:gatewayId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/20200301/gateways/:gatewayId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/20200301/gateways/:gatewayId")
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/20200301/gateways/:gatewayId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/20200301/gateways/:gatewayId";
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}}/20200301/gateways/:gatewayId
http GET {{baseUrl}}/20200301/gateways/:gatewayId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/20200301/gateways/:gatewayId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/20200301/gateways/:gatewayId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeGatewayCapabilityConfiguration
{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace
QUERY PARAMS
gatewayId
capabilityNamespace
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace")
require "http/client"
url = "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace"
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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace"
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/20200301/gateways/:gatewayId/capability/:capabilityNamespace HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace"))
.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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace")
.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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace';
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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/20200301/gateways/:gatewayId/capability/:capabilityNamespace',
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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace');
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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace';
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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace"]
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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace",
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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace');
echo $response->getBody();
setUrl('{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/20200301/gateways/:gatewayId/capability/:capabilityNamespace")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace")
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/20200301/gateways/:gatewayId/capability/:capabilityNamespace') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace";
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}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace
http GET {{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/20200301/gateways/:gatewayId/capability/:capabilityNamespace")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeLoggingOptions
{{baseUrl}}/logging
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/logging");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/logging")
require "http/client"
url = "{{baseUrl}}/logging"
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}}/logging"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/logging");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/logging"
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/logging HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/logging")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/logging"))
.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}}/logging")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/logging")
.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}}/logging');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/logging'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/logging';
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}}/logging',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/logging")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/logging',
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}}/logging'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/logging');
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}}/logging'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/logging';
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}}/logging"]
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}}/logging" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/logging",
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}}/logging');
echo $response->getBody();
setUrl('{{baseUrl}}/logging');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/logging');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/logging' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/logging' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/logging")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/logging"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/logging"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/logging")
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/logging') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/logging";
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}}/logging
http GET {{baseUrl}}/logging
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/logging
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/logging")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribePortal
{{baseUrl}}/portals/:portalId
QUERY PARAMS
portalId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/portals/:portalId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/portals/:portalId")
require "http/client"
url = "{{baseUrl}}/portals/:portalId"
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}}/portals/:portalId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/portals/:portalId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/portals/:portalId"
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/portals/:portalId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/portals/:portalId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/portals/:portalId"))
.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}}/portals/:portalId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/portals/:portalId")
.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}}/portals/:portalId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/portals/:portalId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/portals/:portalId';
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}}/portals/:portalId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/portals/:portalId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/portals/:portalId',
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}}/portals/:portalId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/portals/:portalId');
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}}/portals/:portalId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/portals/:portalId';
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}}/portals/:portalId"]
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}}/portals/:portalId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/portals/:portalId",
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}}/portals/:portalId');
echo $response->getBody();
setUrl('{{baseUrl}}/portals/:portalId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/portals/:portalId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/portals/:portalId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/portals/:portalId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/portals/:portalId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/portals/:portalId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/portals/:portalId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/portals/:portalId")
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/portals/:portalId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/portals/:portalId";
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}}/portals/:portalId
http GET {{baseUrl}}/portals/:portalId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/portals/:portalId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/portals/:portalId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeProject
{{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()
GET
DescribeStorageConfiguration
{{baseUrl}}/configuration/account/storage
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/configuration/account/storage");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/configuration/account/storage")
require "http/client"
url = "{{baseUrl}}/configuration/account/storage"
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}}/configuration/account/storage"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/configuration/account/storage");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/configuration/account/storage"
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/configuration/account/storage HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/configuration/account/storage")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/configuration/account/storage"))
.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}}/configuration/account/storage")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/configuration/account/storage")
.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}}/configuration/account/storage');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/configuration/account/storage'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/configuration/account/storage';
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}}/configuration/account/storage',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/configuration/account/storage")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/configuration/account/storage',
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}}/configuration/account/storage'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/configuration/account/storage');
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}}/configuration/account/storage'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/configuration/account/storage';
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}}/configuration/account/storage"]
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}}/configuration/account/storage" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/configuration/account/storage",
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}}/configuration/account/storage');
echo $response->getBody();
setUrl('{{baseUrl}}/configuration/account/storage');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/configuration/account/storage');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/configuration/account/storage' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/configuration/account/storage' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/configuration/account/storage")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/configuration/account/storage"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/configuration/account/storage"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/configuration/account/storage")
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/configuration/account/storage') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/configuration/account/storage";
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}}/configuration/account/storage
http GET {{baseUrl}}/configuration/account/storage
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/configuration/account/storage
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/configuration/account/storage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeTimeSeries
{{baseUrl}}/timeseries/describe/
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/timeseries/describe/");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/timeseries/describe/")
require "http/client"
url = "{{baseUrl}}/timeseries/describe/"
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}}/timeseries/describe/"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/timeseries/describe/");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/timeseries/describe/"
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/timeseries/describe/ HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/timeseries/describe/")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/timeseries/describe/"))
.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}}/timeseries/describe/")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/timeseries/describe/")
.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}}/timeseries/describe/');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/timeseries/describe/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/timeseries/describe/';
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}}/timeseries/describe/',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/timeseries/describe/")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/timeseries/describe/',
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}}/timeseries/describe/'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/timeseries/describe/');
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}}/timeseries/describe/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/timeseries/describe/';
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}}/timeseries/describe/"]
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}}/timeseries/describe/" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/timeseries/describe/",
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}}/timeseries/describe/');
echo $response->getBody();
setUrl('{{baseUrl}}/timeseries/describe/');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/timeseries/describe/');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/timeseries/describe/' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/timeseries/describe/' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/timeseries/describe/")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/timeseries/describe/"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/timeseries/describe/"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/timeseries/describe/")
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/timeseries/describe/') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/timeseries/describe/";
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}}/timeseries/describe/
http GET {{baseUrl}}/timeseries/describe/
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/timeseries/describe/
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/timeseries/describe/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DisassociateAssets
{{baseUrl}}/assets/:assetId/disassociate
QUERY PARAMS
assetId
BODY json
{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId/disassociate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/assets/:assetId/disassociate" {:content-type :json
:form-params {:hierarchyId ""
:childAssetId ""
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/assets/:assetId/disassociate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/assets/:assetId/disassociate"),
Content = new StringContent("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets/:assetId/disassociate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId/disassociate"
payload := strings.NewReader("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/assets/:assetId/disassociate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 66
{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/assets/:assetId/disassociate")
.setHeader("content-type", "application/json")
.setBody("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId/disassociate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/assets/:assetId/disassociate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/assets/:assetId/disassociate")
.header("content-type", "application/json")
.body("{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
hierarchyId: '',
childAssetId: '',
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/assets/:assetId/disassociate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/assets/:assetId/disassociate',
headers: {'content-type': 'application/json'},
data: {hierarchyId: '', childAssetId: '', clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId/disassociate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"hierarchyId":"","childAssetId":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/assets/:assetId/disassociate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "hierarchyId": "",\n "childAssetId": "",\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId/disassociate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId/disassociate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({hierarchyId: '', childAssetId: '', clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/assets/:assetId/disassociate',
headers: {'content-type': 'application/json'},
body: {hierarchyId: '', childAssetId: '', clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/assets/:assetId/disassociate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
hierarchyId: '',
childAssetId: '',
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/assets/:assetId/disassociate',
headers: {'content-type': 'application/json'},
data: {hierarchyId: '', childAssetId: '', clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId/disassociate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"hierarchyId":"","childAssetId":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"hierarchyId": @"",
@"childAssetId": @"",
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/assets/:assetId/disassociate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/assets/:assetId/disassociate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId/disassociate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'hierarchyId' => '',
'childAssetId' => '',
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/assets/:assetId/disassociate', [
'body' => '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId/disassociate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'hierarchyId' => '',
'childAssetId' => '',
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'hierarchyId' => '',
'childAssetId' => '',
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/assets/:assetId/disassociate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId/disassociate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId/disassociate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/assets/:assetId/disassociate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId/disassociate"
payload = {
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId/disassociate"
payload <- "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId/disassociate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/assets/:assetId/disassociate') do |req|
req.body = "{\n \"hierarchyId\": \"\",\n \"childAssetId\": \"\",\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets/:assetId/disassociate";
let payload = json!({
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/assets/:assetId/disassociate \
--header 'content-type: application/json' \
--data '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}'
echo '{
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
}' | \
http POST {{baseUrl}}/assets/:assetId/disassociate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "hierarchyId": "",\n "childAssetId": "",\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/assets/:assetId/disassociate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"hierarchyId": "",
"childAssetId": "",
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId/disassociate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
DisassociateTimeSeriesFromAssetProperty
{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId
QUERY PARAMS
alias
assetId
propertyId
BODY json
{
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId");
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 \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId" {:query-params {:alias ""
:assetId ""
:propertyId ""}
:content-type :json
:form-params {:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"),
Content = new StringContent("{\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"
payload := strings.NewReader("{\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/timeseries/disassociate/?alias=&assetId=&propertyId= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId',
params: {alias: '', assetId: '', propertyId: ''},
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
.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/timeseries/disassociate/?alias=&assetId=&propertyId=',
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({clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId',
qs: {alias: '', assetId: '', propertyId: ''},
headers: {'content-type': 'application/json'},
body: {clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId');
req.query({
alias: '',
assetId: '',
propertyId: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId',
params: {alias: '', assetId: '', propertyId: ''},
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId"]
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}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId",
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([
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId', [
'body' => '{
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'alias' => '',
'assetId' => '',
'propertyId' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'alias' => '',
'assetId' => '',
'propertyId' => ''
]));
$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}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/timeseries/disassociate/?alias=&assetId=&propertyId=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId"
querystring = {"alias":"","assetId":"","propertyId":""}
payload = { "clientToken": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId"
queryString <- list(
alias = "",
assetId = "",
propertyId = ""
)
payload <- "{\n \"clientToken\": \"\"\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}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")
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 \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/timeseries/disassociate/') do |req|
req.params['alias'] = ''
req.params['assetId'] = ''
req.params['propertyId'] = ''
req.body = "{\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/timeseries/disassociate/#alias&assetId&propertyId";
let querystring = [
("alias", ""),
("assetId", ""),
("propertyId", ""),
];
let payload = json!({"clientToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId' \
--header 'content-type: application/json' \
--data '{
"clientToken": ""
}'
echo '{
"clientToken": ""
}' | \
http POST '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId' \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": ""\n}' \
--output-document \
- '{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId'
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clientToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/timeseries/disassociate/?alias=&assetId=&propertyId=#alias&assetId&propertyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetAssetPropertyAggregates
{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate
QUERY PARAMS
aggregateTypes
resolution
startDate
endDate
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate" {:query-params {:aggregateTypes ""
:resolution ""
:startDate ""
:endDate ""}})
require "http/client"
url = "{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate"
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}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate"
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/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate"))
.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}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate")
.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}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate',
params: {aggregateTypes: '', resolution: '', startDate: '', endDate: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate';
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}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=',
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}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate',
qs: {aggregateTypes: '', resolution: '', startDate: '', endDate: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate');
req.query({
aggregateTypes: '',
resolution: '',
startDate: '',
endDate: ''
});
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}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate',
params: {aggregateTypes: '', resolution: '', startDate: '', endDate: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate';
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}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate"]
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}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate",
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}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate');
echo $response->getBody();
setUrl('{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'aggregateTypes' => '',
'resolution' => '',
'startDate' => '',
'endDate' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'aggregateTypes' => '',
'resolution' => '',
'startDate' => '',
'endDate' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate"
querystring = {"aggregateTypes":"","resolution":"","startDate":"","endDate":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate"
queryString <- list(
aggregateTypes = "",
resolution = "",
startDate = "",
endDate = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate")
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/properties/aggregates') do |req|
req.params['aggregateTypes'] = ''
req.params['resolution'] = ''
req.params['startDate'] = ''
req.params['endDate'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/properties/aggregates#aggregateTypes&resolution&startDate&endDate";
let querystring = [
("aggregateTypes", ""),
("resolution", ""),
("startDate", ""),
("endDate", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate'
http GET '{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/properties/aggregates?aggregateTypes=&resolution=&startDate=&endDate=#aggregateTypes&resolution&startDate&endDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetAssetPropertyValue
{{baseUrl}}/properties/latest
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/properties/latest");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/properties/latest")
require "http/client"
url = "{{baseUrl}}/properties/latest"
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}}/properties/latest"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/properties/latest");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/properties/latest"
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/properties/latest HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/properties/latest")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/properties/latest"))
.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}}/properties/latest")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/properties/latest")
.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}}/properties/latest');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/properties/latest'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/properties/latest';
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}}/properties/latest',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/properties/latest")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/properties/latest',
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}}/properties/latest'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/properties/latest');
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}}/properties/latest'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/properties/latest';
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}}/properties/latest"]
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}}/properties/latest" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/properties/latest",
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}}/properties/latest');
echo $response->getBody();
setUrl('{{baseUrl}}/properties/latest');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/properties/latest');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/properties/latest' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/properties/latest' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/properties/latest")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/properties/latest"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/properties/latest"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/properties/latest")
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/properties/latest') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/properties/latest";
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}}/properties/latest
http GET {{baseUrl}}/properties/latest
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/properties/latest
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/properties/latest")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetAssetPropertyValueHistory
{{baseUrl}}/properties/history
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/properties/history");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/properties/history")
require "http/client"
url = "{{baseUrl}}/properties/history"
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}}/properties/history"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/properties/history");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/properties/history"
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/properties/history HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/properties/history")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/properties/history"))
.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}}/properties/history")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/properties/history")
.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}}/properties/history');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/properties/history'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/properties/history';
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}}/properties/history',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/properties/history")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/properties/history',
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}}/properties/history'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/properties/history');
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}}/properties/history'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/properties/history';
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}}/properties/history"]
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}}/properties/history" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/properties/history",
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}}/properties/history');
echo $response->getBody();
setUrl('{{baseUrl}}/properties/history');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/properties/history');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/properties/history' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/properties/history' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/properties/history")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/properties/history"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/properties/history"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/properties/history")
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/properties/history') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/properties/history";
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}}/properties/history
http GET {{baseUrl}}/properties/history
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/properties/history
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/properties/history")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetInterpolatedAssetPropertyValues
{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type
QUERY PARAMS
startTimeInSeconds
endTimeInSeconds
quality
intervalInSeconds
type
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type" {:query-params {:startTimeInSeconds ""
:endTimeInSeconds ""
:quality ""
:intervalInSeconds ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type"
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}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type"
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/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type"))
.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}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type")
.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}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type',
params: {
startTimeInSeconds: '',
endTimeInSeconds: '',
quality: '',
intervalInSeconds: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type';
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}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=',
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}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type',
qs: {
startTimeInSeconds: '',
endTimeInSeconds: '',
quality: '',
intervalInSeconds: '',
type: ''
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type');
req.query({
startTimeInSeconds: '',
endTimeInSeconds: '',
quality: '',
intervalInSeconds: '',
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: 'GET',
url: '{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type',
params: {
startTimeInSeconds: '',
endTimeInSeconds: '',
quality: '',
intervalInSeconds: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type';
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}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type"]
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}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type",
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}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type');
echo $response->getBody();
setUrl('{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'startTimeInSeconds' => '',
'endTimeInSeconds' => '',
'quality' => '',
'intervalInSeconds' => '',
'type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'startTimeInSeconds' => '',
'endTimeInSeconds' => '',
'quality' => '',
'intervalInSeconds' => '',
'type' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type"
querystring = {"startTimeInSeconds":"","endTimeInSeconds":"","quality":"","intervalInSeconds":"","type":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type"
queryString <- list(
startTimeInSeconds = "",
endTimeInSeconds = "",
quality = "",
intervalInSeconds = "",
type = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type")
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/properties/interpolated') do |req|
req.params['startTimeInSeconds'] = ''
req.params['endTimeInSeconds'] = ''
req.params['quality'] = ''
req.params['intervalInSeconds'] = ''
req.params['type'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/properties/interpolated#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type";
let querystring = [
("startTimeInSeconds", ""),
("endTimeInSeconds", ""),
("quality", ""),
("intervalInSeconds", ""),
("type", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type'
http GET '{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/properties/interpolated?startTimeInSeconds=&endTimeInSeconds=&quality=&intervalInSeconds=&type=#startTimeInSeconds&endTimeInSeconds&quality&intervalInSeconds&type")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListAccessPolicies
{{baseUrl}}/access-policies
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/access-policies");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/access-policies")
require "http/client"
url = "{{baseUrl}}/access-policies"
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}}/access-policies"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/access-policies");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/access-policies"
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/access-policies HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/access-policies")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/access-policies"))
.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}}/access-policies")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/access-policies")
.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}}/access-policies');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/access-policies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/access-policies';
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}}/access-policies',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/access-policies")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/access-policies',
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}}/access-policies'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/access-policies');
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}}/access-policies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/access-policies';
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}}/access-policies"]
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}}/access-policies" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/access-policies",
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}}/access-policies');
echo $response->getBody();
setUrl('{{baseUrl}}/access-policies');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/access-policies');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/access-policies' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/access-policies' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/access-policies")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/access-policies"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/access-policies"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/access-policies")
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/access-policies') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/access-policies";
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}}/access-policies
http GET {{baseUrl}}/access-policies
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/access-policies
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/access-policies")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListAssetModelProperties
{{baseUrl}}/asset-models/:assetModelId/properties
QUERY PARAMS
assetModelId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset-models/:assetModelId/properties");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/asset-models/:assetModelId/properties")
require "http/client"
url = "{{baseUrl}}/asset-models/:assetModelId/properties"
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}}/asset-models/:assetModelId/properties"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset-models/:assetModelId/properties");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset-models/:assetModelId/properties"
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/asset-models/:assetModelId/properties HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/asset-models/:assetModelId/properties")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset-models/:assetModelId/properties"))
.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}}/asset-models/:assetModelId/properties")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/asset-models/:assetModelId/properties")
.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}}/asset-models/:assetModelId/properties');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/asset-models/:assetModelId/properties'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset-models/:assetModelId/properties';
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}}/asset-models/:assetModelId/properties',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/asset-models/:assetModelId/properties")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset-models/:assetModelId/properties',
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}}/asset-models/:assetModelId/properties'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/asset-models/:assetModelId/properties');
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}}/asset-models/:assetModelId/properties'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset-models/:assetModelId/properties';
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}}/asset-models/:assetModelId/properties"]
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}}/asset-models/:assetModelId/properties" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset-models/:assetModelId/properties",
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}}/asset-models/:assetModelId/properties');
echo $response->getBody();
setUrl('{{baseUrl}}/asset-models/:assetModelId/properties');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/asset-models/:assetModelId/properties');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset-models/:assetModelId/properties' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset-models/:assetModelId/properties' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/asset-models/:assetModelId/properties")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset-models/:assetModelId/properties"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset-models/:assetModelId/properties"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset-models/:assetModelId/properties")
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/asset-models/:assetModelId/properties') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset-models/:assetModelId/properties";
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}}/asset-models/:assetModelId/properties
http GET {{baseUrl}}/asset-models/:assetModelId/properties
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/asset-models/:assetModelId/properties
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset-models/:assetModelId/properties")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListAssetModels
{{baseUrl}}/asset-models
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset-models");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/asset-models")
require "http/client"
url = "{{baseUrl}}/asset-models"
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}}/asset-models"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset-models");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset-models"
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/asset-models HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/asset-models")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset-models"))
.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}}/asset-models")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/asset-models")
.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}}/asset-models');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/asset-models'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset-models';
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}}/asset-models',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/asset-models")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset-models',
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}}/asset-models'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/asset-models');
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}}/asset-models'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset-models';
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}}/asset-models"]
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}}/asset-models" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset-models",
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}}/asset-models');
echo $response->getBody();
setUrl('{{baseUrl}}/asset-models');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/asset-models');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset-models' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset-models' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/asset-models")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset-models"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset-models"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset-models")
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/asset-models') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset-models";
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}}/asset-models
http GET {{baseUrl}}/asset-models
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/asset-models
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset-models")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListAssetProperties
{{baseUrl}}/assets/:assetId/properties
QUERY PARAMS
assetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId/properties");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/assets/:assetId/properties")
require "http/client"
url = "{{baseUrl}}/assets/:assetId/properties"
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}}/assets/:assetId/properties"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets/:assetId/properties");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId/properties"
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/assets/:assetId/properties HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/assets/:assetId/properties")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId/properties"))
.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}}/assets/:assetId/properties")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/assets/:assetId/properties")
.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}}/assets/:assetId/properties');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/assets/:assetId/properties'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId/properties';
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}}/assets/:assetId/properties',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId/properties")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId/properties',
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}}/assets/:assetId/properties'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/assets/:assetId/properties');
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}}/assets/:assetId/properties'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId/properties';
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}}/assets/:assetId/properties"]
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}}/assets/:assetId/properties" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId/properties",
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}}/assets/:assetId/properties');
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId/properties');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/assets/:assetId/properties');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId/properties' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId/properties' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/assets/:assetId/properties")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId/properties"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId/properties"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId/properties")
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/assets/:assetId/properties') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets/:assetId/properties";
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}}/assets/:assetId/properties
http GET {{baseUrl}}/assets/:assetId/properties
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/assets/:assetId/properties
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId/properties")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListAssetRelationships
{{baseUrl}}/assets/:assetId/assetRelationships#traversalType
QUERY PARAMS
traversalType
assetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/assets/:assetId/assetRelationships#traversalType" {:query-params {:traversalType ""}})
require "http/client"
url = "{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType"
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}}/assets/:assetId/assetRelationships?traversalType=#traversalType"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType"
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/assets/:assetId/assetRelationships?traversalType= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType"))
.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}}/assets/:assetId/assetRelationships?traversalType=#traversalType")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType")
.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}}/assets/:assetId/assetRelationships?traversalType=#traversalType');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/assets/:assetId/assetRelationships#traversalType',
params: {traversalType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType';
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}}/assets/:assetId/assetRelationships?traversalType=#traversalType',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId/assetRelationships?traversalType=',
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}}/assets/:assetId/assetRelationships#traversalType',
qs: {traversalType: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/assets/:assetId/assetRelationships#traversalType');
req.query({
traversalType: ''
});
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}}/assets/:assetId/assetRelationships#traversalType',
params: {traversalType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType';
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}}/assets/:assetId/assetRelationships?traversalType=#traversalType"]
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}}/assets/:assetId/assetRelationships?traversalType=#traversalType" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType",
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}}/assets/:assetId/assetRelationships?traversalType=#traversalType');
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId/assetRelationships#traversalType');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'traversalType' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/assets/:assetId/assetRelationships#traversalType');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'traversalType' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/assets/:assetId/assetRelationships?traversalType=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId/assetRelationships#traversalType"
querystring = {"traversalType":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId/assetRelationships#traversalType"
queryString <- list(traversalType = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType")
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/assets/:assetId/assetRelationships') do |req|
req.params['traversalType'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets/:assetId/assetRelationships#traversalType";
let querystring = [
("traversalType", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType'
http GET '{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId/assetRelationships?traversalType=#traversalType")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListAssets
{{baseUrl}}/assets
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/assets")
require "http/client"
url = "{{baseUrl}}/assets"
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}}/assets"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets"
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/assets HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/assets")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets"))
.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}}/assets")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/assets")
.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}}/assets');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/assets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets';
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}}/assets',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/assets")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets',
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}}/assets'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/assets');
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}}/assets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets';
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}}/assets"]
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}}/assets" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets",
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}}/assets');
echo $response->getBody();
setUrl('{{baseUrl}}/assets');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/assets');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/assets")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets")
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/assets') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets";
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}}/assets
http GET {{baseUrl}}/assets
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/assets
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListAssociatedAssets
{{baseUrl}}/assets/:assetId/hierarchies
QUERY PARAMS
assetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId/hierarchies");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/assets/:assetId/hierarchies")
require "http/client"
url = "{{baseUrl}}/assets/:assetId/hierarchies"
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}}/assets/:assetId/hierarchies"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/assets/:assetId/hierarchies");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId/hierarchies"
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/assets/:assetId/hierarchies HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/assets/:assetId/hierarchies")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId/hierarchies"))
.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}}/assets/:assetId/hierarchies")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/assets/:assetId/hierarchies")
.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}}/assets/:assetId/hierarchies');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/assets/:assetId/hierarchies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId/hierarchies';
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}}/assets/:assetId/hierarchies',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId/hierarchies")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId/hierarchies',
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}}/assets/:assetId/hierarchies'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/assets/:assetId/hierarchies');
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}}/assets/:assetId/hierarchies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId/hierarchies';
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}}/assets/:assetId/hierarchies"]
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}}/assets/:assetId/hierarchies" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId/hierarchies",
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}}/assets/:assetId/hierarchies');
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId/hierarchies');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/assets/:assetId/hierarchies');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId/hierarchies' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId/hierarchies' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/assets/:assetId/hierarchies")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId/hierarchies"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId/hierarchies"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId/hierarchies")
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/assets/:assetId/hierarchies') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/assets/:assetId/hierarchies";
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}}/assets/:assetId/hierarchies
http GET {{baseUrl}}/assets/:assetId/hierarchies
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/assets/:assetId/hierarchies
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId/hierarchies")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListBulkImportJobs
{{baseUrl}}/jobs
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/jobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/jobs")
require "http/client"
url = "{{baseUrl}}/jobs"
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}}/jobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/jobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/jobs"
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/jobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/jobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/jobs"))
.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}}/jobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/jobs")
.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}}/jobs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/jobs';
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}}/jobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/jobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/jobs',
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}}/jobs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/jobs');
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}}/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/jobs';
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}}/jobs"]
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}}/jobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/jobs",
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}}/jobs');
echo $response->getBody();
setUrl('{{baseUrl}}/jobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/jobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/jobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/jobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/jobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/jobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/jobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/jobs")
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/jobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/jobs";
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}}/jobs
http GET {{baseUrl}}/jobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/jobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/jobs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListDashboards
{{baseUrl}}/dashboards#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}}/dashboards?projectId=#projectId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/dashboards#projectId" {:query-params {:projectId ""}})
require "http/client"
url = "{{baseUrl}}/dashboards?projectId=#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}}/dashboards?projectId=#projectId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dashboards?projectId=#projectId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dashboards?projectId=#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/dashboards?projectId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/dashboards?projectId=#projectId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dashboards?projectId=#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}}/dashboards?projectId=#projectId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/dashboards?projectId=#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}}/dashboards?projectId=#projectId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/dashboards#projectId',
params: {projectId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dashboards?projectId=#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}}/dashboards?projectId=#projectId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/dashboards?projectId=#projectId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/dashboards?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}}/dashboards#projectId',
qs: {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}}/dashboards#projectId');
req.query({
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}}/dashboards#projectId',
params: {projectId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dashboards?projectId=#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}}/dashboards?projectId=#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}}/dashboards?projectId=#projectId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dashboards?projectId=#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}}/dashboards?projectId=#projectId');
echo $response->getBody();
setUrl('{{baseUrl}}/dashboards#projectId');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'projectId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/dashboards#projectId');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'projectId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dashboards?projectId=#projectId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dashboards?projectId=#projectId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/dashboards?projectId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dashboards#projectId"
querystring = {"projectId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dashboards#projectId"
queryString <- list(projectId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dashboards?projectId=#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/dashboards') do |req|
req.params['projectId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dashboards#projectId";
let querystring = [
("projectId", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/dashboards?projectId=#projectId'
http GET '{{baseUrl}}/dashboards?projectId=#projectId'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/dashboards?projectId=#projectId'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dashboards?projectId=#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()
GET
ListGateways
{{baseUrl}}/20200301/gateways
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/20200301/gateways");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/20200301/gateways")
require "http/client"
url = "{{baseUrl}}/20200301/gateways"
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}}/20200301/gateways"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/20200301/gateways");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/20200301/gateways"
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/20200301/gateways HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/20200301/gateways")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/20200301/gateways"))
.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}}/20200301/gateways")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/20200301/gateways")
.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}}/20200301/gateways');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/20200301/gateways'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/20200301/gateways';
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}}/20200301/gateways',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/20200301/gateways")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/20200301/gateways',
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}}/20200301/gateways'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/20200301/gateways');
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}}/20200301/gateways'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/20200301/gateways';
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}}/20200301/gateways"]
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}}/20200301/gateways" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/20200301/gateways",
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}}/20200301/gateways');
echo $response->getBody();
setUrl('{{baseUrl}}/20200301/gateways');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/20200301/gateways');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/20200301/gateways' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/20200301/gateways' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/20200301/gateways")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/20200301/gateways"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/20200301/gateways"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/20200301/gateways")
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/20200301/gateways') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/20200301/gateways";
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}}/20200301/gateways
http GET {{baseUrl}}/20200301/gateways
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/20200301/gateways
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/20200301/gateways")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListPortals
{{baseUrl}}/portals
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/portals");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/portals")
require "http/client"
url = "{{baseUrl}}/portals"
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}}/portals"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/portals");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/portals"
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/portals HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/portals")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/portals"))
.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}}/portals")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/portals")
.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}}/portals');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/portals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/portals';
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}}/portals',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/portals")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/portals',
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}}/portals'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/portals');
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}}/portals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/portals';
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}}/portals"]
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}}/portals" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/portals",
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}}/portals');
echo $response->getBody();
setUrl('{{baseUrl}}/portals');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/portals');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/portals' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/portals' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/portals")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/portals"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/portals"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/portals")
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/portals') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/portals";
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}}/portals
http GET {{baseUrl}}/portals
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/portals
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/portals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListProjectAssets
{{baseUrl}}/projects/:projectId/assets
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/assets");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects/:projectId/assets")
require "http/client"
url = "{{baseUrl}}/projects/:projectId/assets"
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/assets"),
};
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/assets");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects/:projectId/assets"
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/assets HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects/:projectId/assets")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects/:projectId/assets"))
.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/assets")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects/:projectId/assets")
.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/assets');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/projects/:projectId/assets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId/assets';
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/assets',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId/assets")
.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/assets',
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/assets'};
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/assets');
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/assets'};
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/assets';
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/assets"]
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/assets" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects/:projectId/assets",
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/assets');
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId/assets');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects/:projectId/assets');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId/assets' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId/assets' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects/:projectId/assets")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId/assets"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId/assets"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId/assets")
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/assets') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects/:projectId/assets";
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/assets
http GET {{baseUrl}}/projects/:projectId/assets
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/projects/:projectId/assets
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects/:projectId/assets")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListProjects
{{baseUrl}}/projects#portalId
QUERY PARAMS
portalId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/projects?portalId=#portalId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/projects#portalId" {:query-params {:portalId ""}})
require "http/client"
url = "{{baseUrl}}/projects?portalId=#portalId"
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?portalId=#portalId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects?portalId=#portalId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/projects?portalId=#portalId"
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?portalId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/projects?portalId=#portalId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/projects?portalId=#portalId"))
.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?portalId=#portalId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/projects?portalId=#portalId")
.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?portalId=#portalId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/projects#portalId',
params: {portalId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects?portalId=#portalId';
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?portalId=#portalId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/projects?portalId=#portalId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/projects?portalId=',
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#portalId',
qs: {portalId: ''}
};
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#portalId');
req.query({
portalId: ''
});
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#portalId',
params: {portalId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/projects?portalId=#portalId';
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?portalId=#portalId"]
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?portalId=#portalId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/projects?portalId=#portalId",
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?portalId=#portalId');
echo $response->getBody();
setUrl('{{baseUrl}}/projects#portalId');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'portalId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/projects#portalId');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'portalId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects?portalId=#portalId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects?portalId=#portalId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/projects?portalId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects#portalId"
querystring = {"portalId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects#portalId"
queryString <- list(portalId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects?portalId=#portalId")
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|
req.params['portalId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/projects#portalId";
let querystring = [
("portalId", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/projects?portalId=#portalId'
http GET '{{baseUrl}}/projects?portalId=#portalId'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/projects?portalId=#portalId'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/projects?portalId=#portalId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListTagsForResource
{{baseUrl}}/tags#resourceArn
QUERY PARAMS
resourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags?resourceArn=#resourceArn");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/tags#resourceArn" {:query-params {:resourceArn ""}})
require "http/client"
url = "{{baseUrl}}/tags?resourceArn=#resourceArn"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/tags?resourceArn=#resourceArn"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags?resourceArn=#resourceArn");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags?resourceArn=#resourceArn"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/tags?resourceArn= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/tags?resourceArn=#resourceArn")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags?resourceArn=#resourceArn"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/tags?resourceArn=#resourceArn")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/tags?resourceArn=#resourceArn")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/tags?resourceArn=#resourceArn');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/tags#resourceArn',
params: {resourceArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags?resourceArn=#resourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags?resourceArn=#resourceArn',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tags?resourceArn=#resourceArn")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags?resourceArn=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/tags#resourceArn',
qs: {resourceArn: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/tags#resourceArn');
req.query({
resourceArn: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/tags#resourceArn',
params: {resourceArn: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags?resourceArn=#resourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags?resourceArn=#resourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags?resourceArn=#resourceArn" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags?resourceArn=#resourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/tags?resourceArn=#resourceArn');
echo $response->getBody();
setUrl('{{baseUrl}}/tags#resourceArn');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'resourceArn' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tags#resourceArn');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'resourceArn' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags?resourceArn=#resourceArn' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags?resourceArn=#resourceArn' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/tags?resourceArn=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags#resourceArn"
querystring = {"resourceArn":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags#resourceArn"
queryString <- list(resourceArn = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags?resourceArn=#resourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/tags') do |req|
req.params['resourceArn'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags#resourceArn";
let querystring = [
("resourceArn", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/tags?resourceArn=#resourceArn'
http GET '{{baseUrl}}/tags?resourceArn=#resourceArn'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/tags?resourceArn=#resourceArn'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags?resourceArn=#resourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListTimeSeries
{{baseUrl}}/timeseries/
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/timeseries/");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/timeseries/")
require "http/client"
url = "{{baseUrl}}/timeseries/"
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}}/timeseries/"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/timeseries/");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/timeseries/"
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/timeseries/ HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/timeseries/")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/timeseries/"))
.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}}/timeseries/")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/timeseries/")
.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}}/timeseries/');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/timeseries/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/timeseries/';
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}}/timeseries/',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/timeseries/")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/timeseries/',
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}}/timeseries/'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/timeseries/');
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}}/timeseries/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/timeseries/';
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}}/timeseries/"]
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}}/timeseries/" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/timeseries/",
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}}/timeseries/');
echo $response->getBody();
setUrl('{{baseUrl}}/timeseries/');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/timeseries/');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/timeseries/' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/timeseries/' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/timeseries/")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/timeseries/"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/timeseries/"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/timeseries/")
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/timeseries/') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/timeseries/";
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}}/timeseries/
http GET {{baseUrl}}/timeseries/
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/timeseries/
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/timeseries/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
PutDefaultEncryptionConfiguration
{{baseUrl}}/configuration/account/encryption
BODY json
{
"encryptionType": "",
"kmsKeyId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/configuration/account/encryption");
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 \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/configuration/account/encryption" {:content-type :json
:form-params {:encryptionType ""
:kmsKeyId ""}})
require "http/client"
url = "{{baseUrl}}/configuration/account/encryption"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\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}}/configuration/account/encryption"),
Content = new StringContent("{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\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}}/configuration/account/encryption");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/configuration/account/encryption"
payload := strings.NewReader("{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\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/configuration/account/encryption HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 44
{
"encryptionType": "",
"kmsKeyId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/configuration/account/encryption")
.setHeader("content-type", "application/json")
.setBody("{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/configuration/account/encryption"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\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 \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/configuration/account/encryption")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/configuration/account/encryption")
.header("content-type", "application/json")
.body("{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}")
.asString();
const data = JSON.stringify({
encryptionType: '',
kmsKeyId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/configuration/account/encryption');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/configuration/account/encryption',
headers: {'content-type': 'application/json'},
data: {encryptionType: '', kmsKeyId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/configuration/account/encryption';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"encryptionType":"","kmsKeyId":""}'
};
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}}/configuration/account/encryption',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "encryptionType": "",\n "kmsKeyId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/configuration/account/encryption")
.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/configuration/account/encryption',
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({encryptionType: '', kmsKeyId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/configuration/account/encryption',
headers: {'content-type': 'application/json'},
body: {encryptionType: '', kmsKeyId: ''},
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}}/configuration/account/encryption');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
encryptionType: '',
kmsKeyId: ''
});
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}}/configuration/account/encryption',
headers: {'content-type': 'application/json'},
data: {encryptionType: '', kmsKeyId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/configuration/account/encryption';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"encryptionType":"","kmsKeyId":""}'
};
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 = @{ @"encryptionType": @"",
@"kmsKeyId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/configuration/account/encryption"]
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}}/configuration/account/encryption" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/configuration/account/encryption",
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([
'encryptionType' => '',
'kmsKeyId' => ''
]),
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}}/configuration/account/encryption', [
'body' => '{
"encryptionType": "",
"kmsKeyId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/configuration/account/encryption');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'encryptionType' => '',
'kmsKeyId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'encryptionType' => '',
'kmsKeyId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/configuration/account/encryption');
$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}}/configuration/account/encryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"encryptionType": "",
"kmsKeyId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/configuration/account/encryption' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"encryptionType": "",
"kmsKeyId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/configuration/account/encryption", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/configuration/account/encryption"
payload = {
"encryptionType": "",
"kmsKeyId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/configuration/account/encryption"
payload <- "{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\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}}/configuration/account/encryption")
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 \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\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/configuration/account/encryption') do |req|
req.body = "{\n \"encryptionType\": \"\",\n \"kmsKeyId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/configuration/account/encryption";
let payload = json!({
"encryptionType": "",
"kmsKeyId": ""
});
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}}/configuration/account/encryption \
--header 'content-type: application/json' \
--data '{
"encryptionType": "",
"kmsKeyId": ""
}'
echo '{
"encryptionType": "",
"kmsKeyId": ""
}' | \
http POST {{baseUrl}}/configuration/account/encryption \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "encryptionType": "",\n "kmsKeyId": ""\n}' \
--output-document \
- {{baseUrl}}/configuration/account/encryption
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"encryptionType": "",
"kmsKeyId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/configuration/account/encryption")! 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()
PUT
PutLoggingOptions
{{baseUrl}}/logging
BODY json
{
"loggingOptions": {
"level": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/logging");
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 \"loggingOptions\": {\n \"level\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/logging" {:content-type :json
:form-params {:loggingOptions {:level ""}}})
require "http/client"
url = "{{baseUrl}}/logging"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"loggingOptions\": {\n \"level\": \"\"\n }\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/logging"),
Content = new StringContent("{\n \"loggingOptions\": {\n \"level\": \"\"\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}}/logging");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"loggingOptions\": {\n \"level\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/logging"
payload := strings.NewReader("{\n \"loggingOptions\": {\n \"level\": \"\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/logging HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 45
{
"loggingOptions": {
"level": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/logging")
.setHeader("content-type", "application/json")
.setBody("{\n \"loggingOptions\": {\n \"level\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/logging"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"loggingOptions\": {\n \"level\": \"\"\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 \"loggingOptions\": {\n \"level\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/logging")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/logging")
.header("content-type", "application/json")
.body("{\n \"loggingOptions\": {\n \"level\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
loggingOptions: {
level: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/logging');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/logging',
headers: {'content-type': 'application/json'},
data: {loggingOptions: {level: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/logging';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"loggingOptions":{"level":""}}'
};
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}}/logging',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "loggingOptions": {\n "level": ""\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 \"loggingOptions\": {\n \"level\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/logging")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/logging',
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({loggingOptions: {level: ''}}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/logging',
headers: {'content-type': 'application/json'},
body: {loggingOptions: {level: ''}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/logging');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
loggingOptions: {
level: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/logging',
headers: {'content-type': 'application/json'},
data: {loggingOptions: {level: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/logging';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"loggingOptions":{"level":""}}'
};
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 = @{ @"loggingOptions": @{ @"level": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/logging"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/logging" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"loggingOptions\": {\n \"level\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/logging",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'loggingOptions' => [
'level' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/logging', [
'body' => '{
"loggingOptions": {
"level": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/logging');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'loggingOptions' => [
'level' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'loggingOptions' => [
'level' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/logging');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/logging' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"loggingOptions": {
"level": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/logging' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"loggingOptions": {
"level": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"loggingOptions\": {\n \"level\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/logging", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/logging"
payload = { "loggingOptions": { "level": "" } }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/logging"
payload <- "{\n \"loggingOptions\": {\n \"level\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/logging")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"loggingOptions\": {\n \"level\": \"\"\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.put('/baseUrl/logging') do |req|
req.body = "{\n \"loggingOptions\": {\n \"level\": \"\"\n }\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}}/logging";
let payload = json!({"loggingOptions": json!({"level": ""})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/logging \
--header 'content-type: application/json' \
--data '{
"loggingOptions": {
"level": ""
}
}'
echo '{
"loggingOptions": {
"level": ""
}
}' | \
http PUT {{baseUrl}}/logging \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "loggingOptions": {\n "level": ""\n }\n}' \
--output-document \
- {{baseUrl}}/logging
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["loggingOptions": ["level": ""]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/logging")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
PutStorageConfiguration
{{baseUrl}}/configuration/account/storage
BODY json
{
"storageType": "",
"multiLayerStorage": {
"customerManagedS3Storage": ""
},
"disassociatedDataStorage": "",
"retentionPeriod": {
"numberOfDays": "",
"unlimited": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/configuration/account/storage");
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 \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/configuration/account/storage" {:content-type :json
:form-params {:storageType ""
:multiLayerStorage {:customerManagedS3Storage ""}
:disassociatedDataStorage ""
:retentionPeriod {:numberOfDays ""
:unlimited ""}}})
require "http/client"
url = "{{baseUrl}}/configuration/account/storage"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\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}}/configuration/account/storage"),
Content = new StringContent("{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\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}}/configuration/account/storage");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/configuration/account/storage"
payload := strings.NewReader("{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\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/configuration/account/storage HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 194
{
"storageType": "",
"multiLayerStorage": {
"customerManagedS3Storage": ""
},
"disassociatedDataStorage": "",
"retentionPeriod": {
"numberOfDays": "",
"unlimited": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/configuration/account/storage")
.setHeader("content-type", "application/json")
.setBody("{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/configuration/account/storage"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\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 \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/configuration/account/storage")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/configuration/account/storage")
.header("content-type", "application/json")
.body("{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
storageType: '',
multiLayerStorage: {
customerManagedS3Storage: ''
},
disassociatedDataStorage: '',
retentionPeriod: {
numberOfDays: '',
unlimited: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/configuration/account/storage');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/configuration/account/storage',
headers: {'content-type': 'application/json'},
data: {
storageType: '',
multiLayerStorage: {customerManagedS3Storage: ''},
disassociatedDataStorage: '',
retentionPeriod: {numberOfDays: '', unlimited: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/configuration/account/storage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"storageType":"","multiLayerStorage":{"customerManagedS3Storage":""},"disassociatedDataStorage":"","retentionPeriod":{"numberOfDays":"","unlimited":""}}'
};
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}}/configuration/account/storage',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "storageType": "",\n "multiLayerStorage": {\n "customerManagedS3Storage": ""\n },\n "disassociatedDataStorage": "",\n "retentionPeriod": {\n "numberOfDays": "",\n "unlimited": ""\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 \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/configuration/account/storage")
.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/configuration/account/storage',
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({
storageType: '',
multiLayerStorage: {customerManagedS3Storage: ''},
disassociatedDataStorage: '',
retentionPeriod: {numberOfDays: '', unlimited: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/configuration/account/storage',
headers: {'content-type': 'application/json'},
body: {
storageType: '',
multiLayerStorage: {customerManagedS3Storage: ''},
disassociatedDataStorage: '',
retentionPeriod: {numberOfDays: '', unlimited: ''}
},
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}}/configuration/account/storage');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
storageType: '',
multiLayerStorage: {
customerManagedS3Storage: ''
},
disassociatedDataStorage: '',
retentionPeriod: {
numberOfDays: '',
unlimited: ''
}
});
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}}/configuration/account/storage',
headers: {'content-type': 'application/json'},
data: {
storageType: '',
multiLayerStorage: {customerManagedS3Storage: ''},
disassociatedDataStorage: '',
retentionPeriod: {numberOfDays: '', unlimited: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/configuration/account/storage';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"storageType":"","multiLayerStorage":{"customerManagedS3Storage":""},"disassociatedDataStorage":"","retentionPeriod":{"numberOfDays":"","unlimited":""}}'
};
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 = @{ @"storageType": @"",
@"multiLayerStorage": @{ @"customerManagedS3Storage": @"" },
@"disassociatedDataStorage": @"",
@"retentionPeriod": @{ @"numberOfDays": @"", @"unlimited": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/configuration/account/storage"]
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}}/configuration/account/storage" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/configuration/account/storage",
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([
'storageType' => '',
'multiLayerStorage' => [
'customerManagedS3Storage' => ''
],
'disassociatedDataStorage' => '',
'retentionPeriod' => [
'numberOfDays' => '',
'unlimited' => ''
]
]),
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}}/configuration/account/storage', [
'body' => '{
"storageType": "",
"multiLayerStorage": {
"customerManagedS3Storage": ""
},
"disassociatedDataStorage": "",
"retentionPeriod": {
"numberOfDays": "",
"unlimited": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/configuration/account/storage');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'storageType' => '',
'multiLayerStorage' => [
'customerManagedS3Storage' => ''
],
'disassociatedDataStorage' => '',
'retentionPeriod' => [
'numberOfDays' => '',
'unlimited' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'storageType' => '',
'multiLayerStorage' => [
'customerManagedS3Storage' => ''
],
'disassociatedDataStorage' => '',
'retentionPeriod' => [
'numberOfDays' => '',
'unlimited' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/configuration/account/storage');
$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}}/configuration/account/storage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"storageType": "",
"multiLayerStorage": {
"customerManagedS3Storage": ""
},
"disassociatedDataStorage": "",
"retentionPeriod": {
"numberOfDays": "",
"unlimited": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/configuration/account/storage' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"storageType": "",
"multiLayerStorage": {
"customerManagedS3Storage": ""
},
"disassociatedDataStorage": "",
"retentionPeriod": {
"numberOfDays": "",
"unlimited": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/configuration/account/storage", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/configuration/account/storage"
payload = {
"storageType": "",
"multiLayerStorage": { "customerManagedS3Storage": "" },
"disassociatedDataStorage": "",
"retentionPeriod": {
"numberOfDays": "",
"unlimited": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/configuration/account/storage"
payload <- "{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\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}}/configuration/account/storage")
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 \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\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/configuration/account/storage') do |req|
req.body = "{\n \"storageType\": \"\",\n \"multiLayerStorage\": {\n \"customerManagedS3Storage\": \"\"\n },\n \"disassociatedDataStorage\": \"\",\n \"retentionPeriod\": {\n \"numberOfDays\": \"\",\n \"unlimited\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/configuration/account/storage";
let payload = json!({
"storageType": "",
"multiLayerStorage": json!({"customerManagedS3Storage": ""}),
"disassociatedDataStorage": "",
"retentionPeriod": json!({
"numberOfDays": "",
"unlimited": ""
})
});
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}}/configuration/account/storage \
--header 'content-type: application/json' \
--data '{
"storageType": "",
"multiLayerStorage": {
"customerManagedS3Storage": ""
},
"disassociatedDataStorage": "",
"retentionPeriod": {
"numberOfDays": "",
"unlimited": ""
}
}'
echo '{
"storageType": "",
"multiLayerStorage": {
"customerManagedS3Storage": ""
},
"disassociatedDataStorage": "",
"retentionPeriod": {
"numberOfDays": "",
"unlimited": ""
}
}' | \
http POST {{baseUrl}}/configuration/account/storage \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "storageType": "",\n "multiLayerStorage": {\n "customerManagedS3Storage": ""\n },\n "disassociatedDataStorage": "",\n "retentionPeriod": {\n "numberOfDays": "",\n "unlimited": ""\n }\n}' \
--output-document \
- {{baseUrl}}/configuration/account/storage
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"storageType": "",
"multiLayerStorage": ["customerManagedS3Storage": ""],
"disassociatedDataStorage": "",
"retentionPeriod": [
"numberOfDays": "",
"unlimited": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/configuration/account/storage")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
TagResource
{{baseUrl}}/tags#resourceArn
QUERY PARAMS
resourceArn
BODY json
{
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags?resourceArn=#resourceArn");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/tags#resourceArn" {:query-params {:resourceArn ""}
:content-type :json
:form-params {:tags {}}})
require "http/client"
url = "{{baseUrl}}/tags?resourceArn=#resourceArn"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/tags?resourceArn=#resourceArn"),
Content = new StringContent("{\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags?resourceArn=#resourceArn");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags?resourceArn=#resourceArn"
payload := strings.NewReader("{\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/tags?resourceArn= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/tags?resourceArn=#resourceArn")
.setHeader("content-type", "application/json")
.setBody("{\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags?resourceArn=#resourceArn"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/tags?resourceArn=#resourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/tags?resourceArn=#resourceArn")
.header("content-type", "application/json")
.body("{\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/tags?resourceArn=#resourceArn');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/tags#resourceArn',
params: {resourceArn: ''},
headers: {'content-type': 'application/json'},
data: {tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags?resourceArn=#resourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags?resourceArn=#resourceArn',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/tags?resourceArn=#resourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags?resourceArn=',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/tags#resourceArn',
qs: {resourceArn: ''},
headers: {'content-type': 'application/json'},
body: {tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/tags#resourceArn');
req.query({
resourceArn: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/tags#resourceArn',
params: {resourceArn: ''},
headers: {'content-type': 'application/json'},
data: {tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags?resourceArn=#resourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags?resourceArn=#resourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags?resourceArn=#resourceArn" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags?resourceArn=#resourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/tags?resourceArn=#resourceArn', [
'body' => '{
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/tags#resourceArn');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'resourceArn' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/tags#resourceArn');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'resourceArn' => ''
]));
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags?resourceArn=#resourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags?resourceArn=#resourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/tags?resourceArn=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags#resourceArn"
querystring = {"resourceArn":""}
payload = { "tags": {} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags#resourceArn"
queryString <- list(resourceArn = "")
payload <- "{\n \"tags\": {}\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}}/tags?resourceArn=#resourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/tags') do |req|
req.params['resourceArn'] = ''
req.body = "{\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags#resourceArn";
let querystring = [
("resourceArn", ""),
];
let payload = json!({"tags": json!({})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/tags?resourceArn=#resourceArn' \
--header 'content-type: application/json' \
--data '{
"tags": {}
}'
echo '{
"tags": {}
}' | \
http POST '{{baseUrl}}/tags?resourceArn=#resourceArn' \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "tags": {}\n}' \
--output-document \
- '{{baseUrl}}/tags?resourceArn=#resourceArn'
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["tags": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags?resourceArn=#resourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
UntagResource
{{baseUrl}}/tags#resourceArn&tagKeys
QUERY PARAMS
resourceArn
tagKeys
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/tags#resourceArn&tagKeys" {:query-params {:resourceArn ""
:tagKeys ""}})
require "http/client"
url = "{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/tags?resourceArn=&tagKeys= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags#resourceArn&tagKeys',
params: {resourceArn: '', tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/tags?resourceArn=&tagKeys=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags#resourceArn&tagKeys',
qs: {resourceArn: '', tagKeys: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/tags#resourceArn&tagKeys');
req.query({
resourceArn: '',
tagKeys: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/tags#resourceArn&tagKeys',
params: {resourceArn: '', tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys');
echo $response->getBody();
setUrl('{{baseUrl}}/tags#resourceArn&tagKeys');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'resourceArn' => '',
'tagKeys' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/tags#resourceArn&tagKeys');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'resourceArn' => '',
'tagKeys' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/tags?resourceArn=&tagKeys=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/tags#resourceArn&tagKeys"
querystring = {"resourceArn":"","tagKeys":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/tags#resourceArn&tagKeys"
queryString <- list(
resourceArn = "",
tagKeys = ""
)
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/tags') do |req|
req.params['resourceArn'] = ''
req.params['tagKeys'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/tags#resourceArn&tagKeys";
let querystring = [
("resourceArn", ""),
("tagKeys", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys'
http DELETE '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys'
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/tags?resourceArn=&tagKeys=#resourceArn&tagKeys")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateAccessPolicy
{{baseUrl}}/access-policies/:accessPolicyId
QUERY PARAMS
accessPolicyId
BODY json
{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/access-policies/:accessPolicyId");
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 \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/access-policies/:accessPolicyId" {:content-type :json
:form-params {:accessPolicyIdentity {:user ""
:group ""
:iamUser ""
:iamRole ""}
:accessPolicyResource {:portal ""
:project ""}
:accessPolicyPermission ""
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/access-policies/:accessPolicyId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/access-policies/:accessPolicyId"),
Content = new StringContent("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/access-policies/:accessPolicyId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/access-policies/:accessPolicyId"
payload := strings.NewReader("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/access-policies/:accessPolicyId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 227
{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/access-policies/:accessPolicyId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/access-policies/:accessPolicyId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/access-policies/:accessPolicyId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/access-policies/:accessPolicyId")
.header("content-type", "application/json")
.body("{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
accessPolicyIdentity: {
user: '',
group: '',
iamUser: '',
iamRole: ''
},
accessPolicyResource: {
portal: '',
project: ''
},
accessPolicyPermission: '',
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/access-policies/:accessPolicyId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/access-policies/:accessPolicyId',
headers: {'content-type': 'application/json'},
data: {
accessPolicyIdentity: {user: '', group: '', iamUser: '', iamRole: ''},
accessPolicyResource: {portal: '', project: ''},
accessPolicyPermission: '',
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/access-policies/:accessPolicyId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accessPolicyIdentity":{"user":"","group":"","iamUser":"","iamRole":""},"accessPolicyResource":{"portal":"","project":""},"accessPolicyPermission":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/access-policies/:accessPolicyId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accessPolicyIdentity": {\n "user": "",\n "group": "",\n "iamUser": "",\n "iamRole": ""\n },\n "accessPolicyResource": {\n "portal": "",\n "project": ""\n },\n "accessPolicyPermission": "",\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/access-policies/:accessPolicyId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/access-policies/:accessPolicyId',
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({
accessPolicyIdentity: {user: '', group: '', iamUser: '', iamRole: ''},
accessPolicyResource: {portal: '', project: ''},
accessPolicyPermission: '',
clientToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/access-policies/:accessPolicyId',
headers: {'content-type': 'application/json'},
body: {
accessPolicyIdentity: {user: '', group: '', iamUser: '', iamRole: ''},
accessPolicyResource: {portal: '', project: ''},
accessPolicyPermission: '',
clientToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/access-policies/:accessPolicyId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accessPolicyIdentity: {
user: '',
group: '',
iamUser: '',
iamRole: ''
},
accessPolicyResource: {
portal: '',
project: ''
},
accessPolicyPermission: '',
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/access-policies/:accessPolicyId',
headers: {'content-type': 'application/json'},
data: {
accessPolicyIdentity: {user: '', group: '', iamUser: '', iamRole: ''},
accessPolicyResource: {portal: '', project: ''},
accessPolicyPermission: '',
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/access-policies/:accessPolicyId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"accessPolicyIdentity":{"user":"","group":"","iamUser":"","iamRole":""},"accessPolicyResource":{"portal":"","project":""},"accessPolicyPermission":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accessPolicyIdentity": @{ @"user": @"", @"group": @"", @"iamUser": @"", @"iamRole": @"" },
@"accessPolicyResource": @{ @"portal": @"", @"project": @"" },
@"accessPolicyPermission": @"",
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/access-policies/:accessPolicyId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/access-policies/:accessPolicyId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/access-policies/:accessPolicyId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'accessPolicyIdentity' => [
'user' => '',
'group' => '',
'iamUser' => '',
'iamRole' => ''
],
'accessPolicyResource' => [
'portal' => '',
'project' => ''
],
'accessPolicyPermission' => '',
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/access-policies/:accessPolicyId', [
'body' => '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/access-policies/:accessPolicyId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accessPolicyIdentity' => [
'user' => '',
'group' => '',
'iamUser' => '',
'iamRole' => ''
],
'accessPolicyResource' => [
'portal' => '',
'project' => ''
],
'accessPolicyPermission' => '',
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accessPolicyIdentity' => [
'user' => '',
'group' => '',
'iamUser' => '',
'iamRole' => ''
],
'accessPolicyResource' => [
'portal' => '',
'project' => ''
],
'accessPolicyPermission' => '',
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/access-policies/:accessPolicyId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/access-policies/:accessPolicyId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/access-policies/:accessPolicyId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/access-policies/:accessPolicyId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/access-policies/:accessPolicyId"
payload = {
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/access-policies/:accessPolicyId"
payload <- "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/access-policies/:accessPolicyId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/access-policies/:accessPolicyId') do |req|
req.body = "{\n \"accessPolicyIdentity\": {\n \"user\": \"\",\n \"group\": \"\",\n \"iamUser\": \"\",\n \"iamRole\": \"\"\n },\n \"accessPolicyResource\": {\n \"portal\": \"\",\n \"project\": \"\"\n },\n \"accessPolicyPermission\": \"\",\n \"clientToken\": \"\"\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}}/access-policies/:accessPolicyId";
let payload = json!({
"accessPolicyIdentity": json!({
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
}),
"accessPolicyResource": json!({
"portal": "",
"project": ""
}),
"accessPolicyPermission": "",
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/access-policies/:accessPolicyId \
--header 'content-type: application/json' \
--data '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": ""
}'
echo '{
"accessPolicyIdentity": {
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
},
"accessPolicyResource": {
"portal": "",
"project": ""
},
"accessPolicyPermission": "",
"clientToken": ""
}' | \
http PUT {{baseUrl}}/access-policies/:accessPolicyId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "accessPolicyIdentity": {\n "user": "",\n "group": "",\n "iamUser": "",\n "iamRole": ""\n },\n "accessPolicyResource": {\n "portal": "",\n "project": ""\n },\n "accessPolicyPermission": "",\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/access-policies/:accessPolicyId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accessPolicyIdentity": [
"user": "",
"group": "",
"iamUser": "",
"iamRole": ""
],
"accessPolicyResource": [
"portal": "",
"project": ""
],
"accessPolicyPermission": "",
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/access-policies/:accessPolicyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateAsset
{{baseUrl}}/assets/:assetId
QUERY PARAMS
assetId
BODY json
{
"assetName": "",
"clientToken": "",
"assetDescription": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId");
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 \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/assets/:assetId" {:content-type :json
:form-params {:assetName ""
:clientToken ""
:assetDescription ""}})
require "http/client"
url = "{{baseUrl}}/assets/:assetId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/assets/:assetId"),
Content = new StringContent("{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\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}}/assets/:assetId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId"
payload := strings.NewReader("{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/assets/:assetId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"assetName": "",
"clientToken": "",
"assetDescription": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/assets/:assetId")
.setHeader("content-type", "application/json")
.setBody("{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\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 \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/assets/:assetId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/assets/:assetId")
.header("content-type", "application/json")
.body("{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}")
.asString();
const data = JSON.stringify({
assetName: '',
clientToken: '',
assetDescription: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/assets/:assetId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/assets/:assetId',
headers: {'content-type': 'application/json'},
data: {assetName: '', clientToken: '', assetDescription: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"assetName":"","clientToken":"","assetDescription":""}'
};
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}}/assets/:assetId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assetName": "",\n "clientToken": "",\n "assetDescription": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId',
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({assetName: '', clientToken: '', assetDescription: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/assets/:assetId',
headers: {'content-type': 'application/json'},
body: {assetName: '', clientToken: '', assetDescription: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/assets/:assetId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assetName: '',
clientToken: '',
assetDescription: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/assets/:assetId',
headers: {'content-type': 'application/json'},
data: {assetName: '', clientToken: '', assetDescription: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"assetName":"","clientToken":"","assetDescription":""}'
};
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 = @{ @"assetName": @"",
@"clientToken": @"",
@"assetDescription": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/assets/:assetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/assets/:assetId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'assetName' => '',
'clientToken' => '',
'assetDescription' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/assets/:assetId', [
'body' => '{
"assetName": "",
"clientToken": "",
"assetDescription": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assetName' => '',
'clientToken' => '',
'assetDescription' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assetName' => '',
'clientToken' => '',
'assetDescription' => ''
]));
$request->setRequestUrl('{{baseUrl}}/assets/:assetId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"assetName": "",
"clientToken": "",
"assetDescription": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"assetName": "",
"clientToken": "",
"assetDescription": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/assets/:assetId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId"
payload = {
"assetName": "",
"clientToken": "",
"assetDescription": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId"
payload <- "{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/assets/:assetId') do |req|
req.body = "{\n \"assetName\": \"\",\n \"clientToken\": \"\",\n \"assetDescription\": \"\"\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}}/assets/:assetId";
let payload = json!({
"assetName": "",
"clientToken": "",
"assetDescription": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/assets/:assetId \
--header 'content-type: application/json' \
--data '{
"assetName": "",
"clientToken": "",
"assetDescription": ""
}'
echo '{
"assetName": "",
"clientToken": "",
"assetDescription": ""
}' | \
http PUT {{baseUrl}}/assets/:assetId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "assetName": "",\n "clientToken": "",\n "assetDescription": ""\n}' \
--output-document \
- {{baseUrl}}/assets/:assetId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assetName": "",
"clientToken": "",
"assetDescription": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateAssetModel
{{baseUrl}}/asset-models/:assetModelId
QUERY PARAMS
assetModelId
BODY json
{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"id": "",
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
}
],
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset-models/:assetModelId");
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 \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/asset-models/:assetModelId" {:content-type :json
:form-params {:assetModelName ""
:assetModelDescription ""
:assetModelProperties [{:id ""
:name ""
:dataType ""
:dataTypeSpec ""
:unit ""
:type ""}]
:assetModelHierarchies [{:id ""
:name ""
:childAssetModelId ""}]
:assetModelCompositeModels [{:name ""
:description ""
:type ""
:properties ""
:id ""}]
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/asset-models/:assetModelId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/asset-models/:assetModelId"),
Content = new StringContent("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset-models/:assetModelId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset-models/:assetModelId"
payload := strings.NewReader("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/asset-models/:assetModelId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 500
{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"id": "",
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
}
],
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/asset-models/:assetModelId")
.setHeader("content-type", "application/json")
.setBody("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset-models/:assetModelId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset-models/:assetModelId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/asset-models/:assetModelId")
.header("content-type", "application/json")
.body("{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [
{
id: '',
name: '',
dataType: '',
dataTypeSpec: '',
unit: '',
type: ''
}
],
assetModelHierarchies: [
{
id: '',
name: '',
childAssetModelId: ''
}
],
assetModelCompositeModels: [
{
name: '',
description: '',
type: '',
properties: '',
id: ''
}
],
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/asset-models/:assetModelId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/asset-models/:assetModelId',
headers: {'content-type': 'application/json'},
data: {
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [{id: '', name: '', dataType: '', dataTypeSpec: '', unit: '', type: ''}],
assetModelHierarchies: [{id: '', name: '', childAssetModelId: ''}],
assetModelCompositeModels: [{name: '', description: '', type: '', properties: '', id: ''}],
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset-models/:assetModelId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"assetModelName":"","assetModelDescription":"","assetModelProperties":[{"id":"","name":"","dataType":"","dataTypeSpec":"","unit":"","type":""}],"assetModelHierarchies":[{"id":"","name":"","childAssetModelId":""}],"assetModelCompositeModels":[{"name":"","description":"","type":"","properties":"","id":""}],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset-models/:assetModelId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assetModelName": "",\n "assetModelDescription": "",\n "assetModelProperties": [\n {\n "id": "",\n "name": "",\n "dataType": "",\n "dataTypeSpec": "",\n "unit": "",\n "type": ""\n }\n ],\n "assetModelHierarchies": [\n {\n "id": "",\n "name": "",\n "childAssetModelId": ""\n }\n ],\n "assetModelCompositeModels": [\n {\n "name": "",\n "description": "",\n "type": "",\n "properties": "",\n "id": ""\n }\n ],\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset-models/:assetModelId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset-models/:assetModelId',
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({
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [{id: '', name: '', dataType: '', dataTypeSpec: '', unit: '', type: ''}],
assetModelHierarchies: [{id: '', name: '', childAssetModelId: ''}],
assetModelCompositeModels: [{name: '', description: '', type: '', properties: '', id: ''}],
clientToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/asset-models/:assetModelId',
headers: {'content-type': 'application/json'},
body: {
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [{id: '', name: '', dataType: '', dataTypeSpec: '', unit: '', type: ''}],
assetModelHierarchies: [{id: '', name: '', childAssetModelId: ''}],
assetModelCompositeModels: [{name: '', description: '', type: '', properties: '', id: ''}],
clientToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/asset-models/:assetModelId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [
{
id: '',
name: '',
dataType: '',
dataTypeSpec: '',
unit: '',
type: ''
}
],
assetModelHierarchies: [
{
id: '',
name: '',
childAssetModelId: ''
}
],
assetModelCompositeModels: [
{
name: '',
description: '',
type: '',
properties: '',
id: ''
}
],
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/asset-models/:assetModelId',
headers: {'content-type': 'application/json'},
data: {
assetModelName: '',
assetModelDescription: '',
assetModelProperties: [{id: '', name: '', dataType: '', dataTypeSpec: '', unit: '', type: ''}],
assetModelHierarchies: [{id: '', name: '', childAssetModelId: ''}],
assetModelCompositeModels: [{name: '', description: '', type: '', properties: '', id: ''}],
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset-models/:assetModelId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"assetModelName":"","assetModelDescription":"","assetModelProperties":[{"id":"","name":"","dataType":"","dataTypeSpec":"","unit":"","type":""}],"assetModelHierarchies":[{"id":"","name":"","childAssetModelId":""}],"assetModelCompositeModels":[{"name":"","description":"","type":"","properties":"","id":""}],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assetModelName": @"",
@"assetModelDescription": @"",
@"assetModelProperties": @[ @{ @"id": @"", @"name": @"", @"dataType": @"", @"dataTypeSpec": @"", @"unit": @"", @"type": @"" } ],
@"assetModelHierarchies": @[ @{ @"id": @"", @"name": @"", @"childAssetModelId": @"" } ],
@"assetModelCompositeModels": @[ @{ @"name": @"", @"description": @"", @"type": @"", @"properties": @"", @"id": @"" } ],
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset-models/:assetModelId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset-models/:assetModelId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset-models/:assetModelId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'assetModelName' => '',
'assetModelDescription' => '',
'assetModelProperties' => [
[
'id' => '',
'name' => '',
'dataType' => '',
'dataTypeSpec' => '',
'unit' => '',
'type' => ''
]
],
'assetModelHierarchies' => [
[
'id' => '',
'name' => '',
'childAssetModelId' => ''
]
],
'assetModelCompositeModels' => [
[
'name' => '',
'description' => '',
'type' => '',
'properties' => '',
'id' => ''
]
],
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/asset-models/:assetModelId', [
'body' => '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"id": "",
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
}
],
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset-models/:assetModelId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assetModelName' => '',
'assetModelDescription' => '',
'assetModelProperties' => [
[
'id' => '',
'name' => '',
'dataType' => '',
'dataTypeSpec' => '',
'unit' => '',
'type' => ''
]
],
'assetModelHierarchies' => [
[
'id' => '',
'name' => '',
'childAssetModelId' => ''
]
],
'assetModelCompositeModels' => [
[
'name' => '',
'description' => '',
'type' => '',
'properties' => '',
'id' => ''
]
],
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assetModelName' => '',
'assetModelDescription' => '',
'assetModelProperties' => [
[
'id' => '',
'name' => '',
'dataType' => '',
'dataTypeSpec' => '',
'unit' => '',
'type' => ''
]
],
'assetModelHierarchies' => [
[
'id' => '',
'name' => '',
'childAssetModelId' => ''
]
],
'assetModelCompositeModels' => [
[
'name' => '',
'description' => '',
'type' => '',
'properties' => '',
'id' => ''
]
],
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset-models/:assetModelId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset-models/:assetModelId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"id": "",
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
}
],
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset-models/:assetModelId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"id": "",
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
}
],
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/asset-models/:assetModelId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset-models/:assetModelId"
payload = {
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"id": "",
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
}
],
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset-models/:assetModelId"
payload <- "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset-models/:assetModelId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/asset-models/:assetModelId') do |req|
req.body = "{\n \"assetModelName\": \"\",\n \"assetModelDescription\": \"\",\n \"assetModelProperties\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"dataType\": \"\",\n \"dataTypeSpec\": \"\",\n \"unit\": \"\",\n \"type\": \"\"\n }\n ],\n \"assetModelHierarchies\": [\n {\n \"id\": \"\",\n \"name\": \"\",\n \"childAssetModelId\": \"\"\n }\n ],\n \"assetModelCompositeModels\": [\n {\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"properties\": \"\",\n \"id\": \"\"\n }\n ],\n \"clientToken\": \"\"\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}}/asset-models/:assetModelId";
let payload = json!({
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": (
json!({
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
})
),
"assetModelHierarchies": (
json!({
"id": "",
"name": "",
"childAssetModelId": ""
})
),
"assetModelCompositeModels": (
json!({
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
})
),
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/asset-models/:assetModelId \
--header 'content-type: application/json' \
--data '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"id": "",
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
}
],
"clientToken": ""
}'
echo '{
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
{
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
}
],
"assetModelHierarchies": [
{
"id": "",
"name": "",
"childAssetModelId": ""
}
],
"assetModelCompositeModels": [
{
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
}
],
"clientToken": ""
}' | \
http PUT {{baseUrl}}/asset-models/:assetModelId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "assetModelName": "",\n "assetModelDescription": "",\n "assetModelProperties": [\n {\n "id": "",\n "name": "",\n "dataType": "",\n "dataTypeSpec": "",\n "unit": "",\n "type": ""\n }\n ],\n "assetModelHierarchies": [\n {\n "id": "",\n "name": "",\n "childAssetModelId": ""\n }\n ],\n "assetModelCompositeModels": [\n {\n "name": "",\n "description": "",\n "type": "",\n "properties": "",\n "id": ""\n }\n ],\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/asset-models/:assetModelId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assetModelName": "",
"assetModelDescription": "",
"assetModelProperties": [
[
"id": "",
"name": "",
"dataType": "",
"dataTypeSpec": "",
"unit": "",
"type": ""
]
],
"assetModelHierarchies": [
[
"id": "",
"name": "",
"childAssetModelId": ""
]
],
"assetModelCompositeModels": [
[
"name": "",
"description": "",
"type": "",
"properties": "",
"id": ""
]
],
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset-models/:assetModelId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateAssetProperty
{{baseUrl}}/assets/:assetId/properties/:propertyId
QUERY PARAMS
assetId
propertyId
BODY json
{
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/assets/:assetId/properties/:propertyId");
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 \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/assets/:assetId/properties/:propertyId" {:content-type :json
:form-params {:propertyAlias ""
:propertyNotificationState ""
:clientToken ""
:propertyUnit ""}})
require "http/client"
url = "{{baseUrl}}/assets/:assetId/properties/:propertyId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/assets/:assetId/properties/:propertyId"),
Content = new StringContent("{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\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}}/assets/:assetId/properties/:propertyId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/assets/:assetId/properties/:propertyId"
payload := strings.NewReader("{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/assets/:assetId/properties/:propertyId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 103
{
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/assets/:assetId/properties/:propertyId")
.setHeader("content-type", "application/json")
.setBody("{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/assets/:assetId/properties/:propertyId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\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 \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/assets/:assetId/properties/:propertyId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/assets/:assetId/properties/:propertyId")
.header("content-type", "application/json")
.body("{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}")
.asString();
const data = JSON.stringify({
propertyAlias: '',
propertyNotificationState: '',
clientToken: '',
propertyUnit: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/assets/:assetId/properties/:propertyId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/assets/:assetId/properties/:propertyId',
headers: {'content-type': 'application/json'},
data: {
propertyAlias: '',
propertyNotificationState: '',
clientToken: '',
propertyUnit: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/assets/:assetId/properties/:propertyId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"propertyAlias":"","propertyNotificationState":"","clientToken":"","propertyUnit":""}'
};
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}}/assets/:assetId/properties/:propertyId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "propertyAlias": "",\n "propertyNotificationState": "",\n "clientToken": "",\n "propertyUnit": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/assets/:assetId/properties/:propertyId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/assets/:assetId/properties/:propertyId',
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({
propertyAlias: '',
propertyNotificationState: '',
clientToken: '',
propertyUnit: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/assets/:assetId/properties/:propertyId',
headers: {'content-type': 'application/json'},
body: {
propertyAlias: '',
propertyNotificationState: '',
clientToken: '',
propertyUnit: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/assets/:assetId/properties/:propertyId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
propertyAlias: '',
propertyNotificationState: '',
clientToken: '',
propertyUnit: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/assets/:assetId/properties/:propertyId',
headers: {'content-type': 'application/json'},
data: {
propertyAlias: '',
propertyNotificationState: '',
clientToken: '',
propertyUnit: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/assets/:assetId/properties/:propertyId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"propertyAlias":"","propertyNotificationState":"","clientToken":"","propertyUnit":""}'
};
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 = @{ @"propertyAlias": @"",
@"propertyNotificationState": @"",
@"clientToken": @"",
@"propertyUnit": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/assets/:assetId/properties/:propertyId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/assets/:assetId/properties/:propertyId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/assets/:assetId/properties/:propertyId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'propertyAlias' => '',
'propertyNotificationState' => '',
'clientToken' => '',
'propertyUnit' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/assets/:assetId/properties/:propertyId', [
'body' => '{
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/assets/:assetId/properties/:propertyId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'propertyAlias' => '',
'propertyNotificationState' => '',
'clientToken' => '',
'propertyUnit' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'propertyAlias' => '',
'propertyNotificationState' => '',
'clientToken' => '',
'propertyUnit' => ''
]));
$request->setRequestUrl('{{baseUrl}}/assets/:assetId/properties/:propertyId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/assets/:assetId/properties/:propertyId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/assets/:assetId/properties/:propertyId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/assets/:assetId/properties/:propertyId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/assets/:assetId/properties/:propertyId"
payload = {
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/assets/:assetId/properties/:propertyId"
payload <- "{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/assets/:assetId/properties/:propertyId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/assets/:assetId/properties/:propertyId') do |req|
req.body = "{\n \"propertyAlias\": \"\",\n \"propertyNotificationState\": \"\",\n \"clientToken\": \"\",\n \"propertyUnit\": \"\"\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}}/assets/:assetId/properties/:propertyId";
let payload = json!({
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/assets/:assetId/properties/:propertyId \
--header 'content-type: application/json' \
--data '{
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
}'
echo '{
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
}' | \
http PUT {{baseUrl}}/assets/:assetId/properties/:propertyId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "propertyAlias": "",\n "propertyNotificationState": "",\n "clientToken": "",\n "propertyUnit": ""\n}' \
--output-document \
- {{baseUrl}}/assets/:assetId/properties/:propertyId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"propertyAlias": "",
"propertyNotificationState": "",
"clientToken": "",
"propertyUnit": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/assets/:assetId/properties/:propertyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateDashboard
{{baseUrl}}/dashboards/:dashboardId
QUERY PARAMS
dashboardId
BODY json
{
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dashboards/:dashboardId");
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 \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/dashboards/:dashboardId" {:content-type :json
:form-params {:dashboardName ""
:dashboardDescription ""
:dashboardDefinition ""
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/dashboards/:dashboardId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/dashboards/:dashboardId"),
Content = new StringContent("{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dashboards/:dashboardId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dashboards/:dashboardId"
payload := strings.NewReader("{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/dashboards/:dashboardId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 105
{
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/dashboards/:dashboardId")
.setHeader("content-type", "application/json")
.setBody("{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dashboards/:dashboardId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/dashboards/:dashboardId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/dashboards/:dashboardId")
.header("content-type", "application/json")
.body("{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/dashboards/:dashboardId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/dashboards/:dashboardId',
headers: {'content-type': 'application/json'},
data: {
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dashboards/:dashboardId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"dashboardName":"","dashboardDescription":"","dashboardDefinition":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/dashboards/:dashboardId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "dashboardName": "",\n "dashboardDescription": "",\n "dashboardDefinition": "",\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/dashboards/:dashboardId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/dashboards/:dashboardId',
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({
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/dashboards/:dashboardId',
headers: {'content-type': 'application/json'},
body: {
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/dashboards/:dashboardId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/dashboards/:dashboardId',
headers: {'content-type': 'application/json'},
data: {
dashboardName: '',
dashboardDescription: '',
dashboardDefinition: '',
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dashboards/:dashboardId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"dashboardName":"","dashboardDescription":"","dashboardDefinition":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"dashboardName": @"",
@"dashboardDescription": @"",
@"dashboardDefinition": @"",
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/dashboards/:dashboardId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/dashboards/:dashboardId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dashboards/:dashboardId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'dashboardName' => '',
'dashboardDescription' => '',
'dashboardDefinition' => '',
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/dashboards/:dashboardId', [
'body' => '{
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/dashboards/:dashboardId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'dashboardName' => '',
'dashboardDescription' => '',
'dashboardDefinition' => '',
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'dashboardName' => '',
'dashboardDescription' => '',
'dashboardDefinition' => '',
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/dashboards/:dashboardId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dashboards/:dashboardId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dashboards/:dashboardId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/dashboards/:dashboardId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dashboards/:dashboardId"
payload = {
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dashboards/:dashboardId"
payload <- "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dashboards/:dashboardId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/dashboards/:dashboardId') do |req|
req.body = "{\n \"dashboardName\": \"\",\n \"dashboardDescription\": \"\",\n \"dashboardDefinition\": \"\",\n \"clientToken\": \"\"\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}}/dashboards/:dashboardId";
let payload = json!({
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/dashboards/:dashboardId \
--header 'content-type: application/json' \
--data '{
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
}'
echo '{
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
}' | \
http PUT {{baseUrl}}/dashboards/:dashboardId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "dashboardName": "",\n "dashboardDescription": "",\n "dashboardDefinition": "",\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/dashboards/:dashboardId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"dashboardName": "",
"dashboardDescription": "",
"dashboardDefinition": "",
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dashboards/:dashboardId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateGateway
{{baseUrl}}/20200301/gateways/:gatewayId
QUERY PARAMS
gatewayId
BODY json
{
"gatewayName": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/20200301/gateways/:gatewayId");
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 \"gatewayName\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/20200301/gateways/:gatewayId" {:content-type :json
:form-params {:gatewayName ""}})
require "http/client"
url = "{{baseUrl}}/20200301/gateways/:gatewayId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"gatewayName\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/20200301/gateways/:gatewayId"),
Content = new StringContent("{\n \"gatewayName\": \"\"\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}}/20200301/gateways/:gatewayId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"gatewayName\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/20200301/gateways/:gatewayId"
payload := strings.NewReader("{\n \"gatewayName\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/20200301/gateways/:gatewayId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"gatewayName": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/20200301/gateways/:gatewayId")
.setHeader("content-type", "application/json")
.setBody("{\n \"gatewayName\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/20200301/gateways/:gatewayId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"gatewayName\": \"\"\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 \"gatewayName\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/20200301/gateways/:gatewayId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/20200301/gateways/:gatewayId")
.header("content-type", "application/json")
.body("{\n \"gatewayName\": \"\"\n}")
.asString();
const data = JSON.stringify({
gatewayName: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/20200301/gateways/:gatewayId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/20200301/gateways/:gatewayId',
headers: {'content-type': 'application/json'},
data: {gatewayName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/20200301/gateways/:gatewayId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"gatewayName":""}'
};
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}}/20200301/gateways/:gatewayId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "gatewayName": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"gatewayName\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/20200301/gateways/:gatewayId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/20200301/gateways/:gatewayId',
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({gatewayName: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/20200301/gateways/:gatewayId',
headers: {'content-type': 'application/json'},
body: {gatewayName: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/20200301/gateways/:gatewayId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
gatewayName: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/20200301/gateways/:gatewayId',
headers: {'content-type': 'application/json'},
data: {gatewayName: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/20200301/gateways/:gatewayId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"gatewayName":""}'
};
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 = @{ @"gatewayName": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/20200301/gateways/:gatewayId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/20200301/gateways/:gatewayId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"gatewayName\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/20200301/gateways/:gatewayId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'gatewayName' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/20200301/gateways/:gatewayId', [
'body' => '{
"gatewayName": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/20200301/gateways/:gatewayId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'gatewayName' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'gatewayName' => ''
]));
$request->setRequestUrl('{{baseUrl}}/20200301/gateways/:gatewayId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/20200301/gateways/:gatewayId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"gatewayName": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/20200301/gateways/:gatewayId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"gatewayName": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"gatewayName\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/20200301/gateways/:gatewayId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/20200301/gateways/:gatewayId"
payload = { "gatewayName": "" }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/20200301/gateways/:gatewayId"
payload <- "{\n \"gatewayName\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/20200301/gateways/:gatewayId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"gatewayName\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/20200301/gateways/:gatewayId') do |req|
req.body = "{\n \"gatewayName\": \"\"\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}}/20200301/gateways/:gatewayId";
let payload = json!({"gatewayName": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/20200301/gateways/:gatewayId \
--header 'content-type: application/json' \
--data '{
"gatewayName": ""
}'
echo '{
"gatewayName": ""
}' | \
http PUT {{baseUrl}}/20200301/gateways/:gatewayId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "gatewayName": ""\n}' \
--output-document \
- {{baseUrl}}/20200301/gateways/:gatewayId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["gatewayName": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/20200301/gateways/:gatewayId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateGatewayCapabilityConfiguration
{{baseUrl}}/20200301/gateways/:gatewayId/capability
QUERY PARAMS
gatewayId
BODY json
{
"capabilityNamespace": "",
"capabilityConfiguration": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/20200301/gateways/:gatewayId/capability");
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 \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/20200301/gateways/:gatewayId/capability" {:content-type :json
:form-params {:capabilityNamespace ""
:capabilityConfiguration ""}})
require "http/client"
url = "{{baseUrl}}/20200301/gateways/:gatewayId/capability"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\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}}/20200301/gateways/:gatewayId/capability"),
Content = new StringContent("{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\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}}/20200301/gateways/:gatewayId/capability");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/20200301/gateways/:gatewayId/capability"
payload := strings.NewReader("{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\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/20200301/gateways/:gatewayId/capability HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 64
{
"capabilityNamespace": "",
"capabilityConfiguration": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/20200301/gateways/:gatewayId/capability")
.setHeader("content-type", "application/json")
.setBody("{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/20200301/gateways/:gatewayId/capability"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\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 \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/20200301/gateways/:gatewayId/capability")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/20200301/gateways/:gatewayId/capability")
.header("content-type", "application/json")
.body("{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}")
.asString();
const data = JSON.stringify({
capabilityNamespace: '',
capabilityConfiguration: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/20200301/gateways/:gatewayId/capability');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/20200301/gateways/:gatewayId/capability',
headers: {'content-type': 'application/json'},
data: {capabilityNamespace: '', capabilityConfiguration: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/20200301/gateways/:gatewayId/capability';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"capabilityNamespace":"","capabilityConfiguration":""}'
};
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}}/20200301/gateways/:gatewayId/capability',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "capabilityNamespace": "",\n "capabilityConfiguration": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/20200301/gateways/:gatewayId/capability")
.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/20200301/gateways/:gatewayId/capability',
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({capabilityNamespace: '', capabilityConfiguration: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/20200301/gateways/:gatewayId/capability',
headers: {'content-type': 'application/json'},
body: {capabilityNamespace: '', capabilityConfiguration: ''},
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}}/20200301/gateways/:gatewayId/capability');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
capabilityNamespace: '',
capabilityConfiguration: ''
});
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}}/20200301/gateways/:gatewayId/capability',
headers: {'content-type': 'application/json'},
data: {capabilityNamespace: '', capabilityConfiguration: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/20200301/gateways/:gatewayId/capability';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"capabilityNamespace":"","capabilityConfiguration":""}'
};
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 = @{ @"capabilityNamespace": @"",
@"capabilityConfiguration": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/20200301/gateways/:gatewayId/capability"]
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}}/20200301/gateways/:gatewayId/capability" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/20200301/gateways/:gatewayId/capability",
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([
'capabilityNamespace' => '',
'capabilityConfiguration' => ''
]),
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}}/20200301/gateways/:gatewayId/capability', [
'body' => '{
"capabilityNamespace": "",
"capabilityConfiguration": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/20200301/gateways/:gatewayId/capability');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'capabilityNamespace' => '',
'capabilityConfiguration' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'capabilityNamespace' => '',
'capabilityConfiguration' => ''
]));
$request->setRequestUrl('{{baseUrl}}/20200301/gateways/:gatewayId/capability');
$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}}/20200301/gateways/:gatewayId/capability' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"capabilityNamespace": "",
"capabilityConfiguration": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/20200301/gateways/:gatewayId/capability' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"capabilityNamespace": "",
"capabilityConfiguration": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/20200301/gateways/:gatewayId/capability", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/20200301/gateways/:gatewayId/capability"
payload = {
"capabilityNamespace": "",
"capabilityConfiguration": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/20200301/gateways/:gatewayId/capability"
payload <- "{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\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}}/20200301/gateways/:gatewayId/capability")
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 \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\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/20200301/gateways/:gatewayId/capability') do |req|
req.body = "{\n \"capabilityNamespace\": \"\",\n \"capabilityConfiguration\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/20200301/gateways/:gatewayId/capability";
let payload = json!({
"capabilityNamespace": "",
"capabilityConfiguration": ""
});
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}}/20200301/gateways/:gatewayId/capability \
--header 'content-type: application/json' \
--data '{
"capabilityNamespace": "",
"capabilityConfiguration": ""
}'
echo '{
"capabilityNamespace": "",
"capabilityConfiguration": ""
}' | \
http POST {{baseUrl}}/20200301/gateways/:gatewayId/capability \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "capabilityNamespace": "",\n "capabilityConfiguration": ""\n}' \
--output-document \
- {{baseUrl}}/20200301/gateways/:gatewayId/capability
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"capabilityNamespace": "",
"capabilityConfiguration": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/20200301/gateways/:gatewayId/capability")! 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()
PUT
UpdatePortal
{{baseUrl}}/portals/:portalId
QUERY PARAMS
portalId
BODY json
{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": {
"id": "",
"file": {
"data": "",
"type": ""
}
},
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/portals/:portalId");
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 \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/portals/:portalId" {:content-type :json
:form-params {:portalName ""
:portalDescription ""
:portalContactEmail ""
:portalLogoImage {:id ""
:file {:data ""
:type ""}}
:roleArn ""
:clientToken ""
:notificationSenderEmail ""
:alarms {:alarmRoleArn ""
:notificationLambdaArn ""}}})
require "http/client"
url = "{{baseUrl}}/portals/:portalId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/portals/:portalId"),
Content = new StringContent("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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}}/portals/:portalId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/portals/:portalId"
payload := strings.NewReader("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/portals/:portalId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 320
{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": {
"id": "",
"file": {
"data": "",
"type": ""
}
},
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/portals/:portalId")
.setHeader("content-type", "application/json")
.setBody("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/portals/:portalId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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 \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/portals/:portalId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/portals/:portalId")
.header("content-type", "application/json")
.body("{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
portalName: '',
portalDescription: '',
portalContactEmail: '',
portalLogoImage: {
id: '',
file: {
data: '',
type: ''
}
},
roleArn: '',
clientToken: '',
notificationSenderEmail: '',
alarms: {
alarmRoleArn: '',
notificationLambdaArn: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/portals/:portalId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/portals/:portalId',
headers: {'content-type': 'application/json'},
data: {
portalName: '',
portalDescription: '',
portalContactEmail: '',
portalLogoImage: {id: '', file: {data: '', type: ''}},
roleArn: '',
clientToken: '',
notificationSenderEmail: '',
alarms: {alarmRoleArn: '', notificationLambdaArn: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/portals/:portalId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"portalName":"","portalDescription":"","portalContactEmail":"","portalLogoImage":{"id":"","file":{"data":"","type":""}},"roleArn":"","clientToken":"","notificationSenderEmail":"","alarms":{"alarmRoleArn":"","notificationLambdaArn":""}}'
};
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}}/portals/:portalId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "portalName": "",\n "portalDescription": "",\n "portalContactEmail": "",\n "portalLogoImage": {\n "id": "",\n "file": {\n "data": "",\n "type": ""\n }\n },\n "roleArn": "",\n "clientToken": "",\n "notificationSenderEmail": "",\n "alarms": {\n "alarmRoleArn": "",\n "notificationLambdaArn": ""\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 \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/portals/:portalId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/portals/:portalId',
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({
portalName: '',
portalDescription: '',
portalContactEmail: '',
portalLogoImage: {id: '', file: {data: '', type: ''}},
roleArn: '',
clientToken: '',
notificationSenderEmail: '',
alarms: {alarmRoleArn: '', notificationLambdaArn: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/portals/:portalId',
headers: {'content-type': 'application/json'},
body: {
portalName: '',
portalDescription: '',
portalContactEmail: '',
portalLogoImage: {id: '', file: {data: '', type: ''}},
roleArn: '',
clientToken: '',
notificationSenderEmail: '',
alarms: {alarmRoleArn: '', notificationLambdaArn: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/portals/:portalId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
portalName: '',
portalDescription: '',
portalContactEmail: '',
portalLogoImage: {
id: '',
file: {
data: '',
type: ''
}
},
roleArn: '',
clientToken: '',
notificationSenderEmail: '',
alarms: {
alarmRoleArn: '',
notificationLambdaArn: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/portals/:portalId',
headers: {'content-type': 'application/json'},
data: {
portalName: '',
portalDescription: '',
portalContactEmail: '',
portalLogoImage: {id: '', file: {data: '', type: ''}},
roleArn: '',
clientToken: '',
notificationSenderEmail: '',
alarms: {alarmRoleArn: '', notificationLambdaArn: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/portals/:portalId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"portalName":"","portalDescription":"","portalContactEmail":"","portalLogoImage":{"id":"","file":{"data":"","type":""}},"roleArn":"","clientToken":"","notificationSenderEmail":"","alarms":{"alarmRoleArn":"","notificationLambdaArn":""}}'
};
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 = @{ @"portalName": @"",
@"portalDescription": @"",
@"portalContactEmail": @"",
@"portalLogoImage": @{ @"id": @"", @"file": @{ @"data": @"", @"type": @"" } },
@"roleArn": @"",
@"clientToken": @"",
@"notificationSenderEmail": @"",
@"alarms": @{ @"alarmRoleArn": @"", @"notificationLambdaArn": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/portals/:portalId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/portals/:portalId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/portals/:portalId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'portalName' => '',
'portalDescription' => '',
'portalContactEmail' => '',
'portalLogoImage' => [
'id' => '',
'file' => [
'data' => '',
'type' => ''
]
],
'roleArn' => '',
'clientToken' => '',
'notificationSenderEmail' => '',
'alarms' => [
'alarmRoleArn' => '',
'notificationLambdaArn' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/portals/:portalId', [
'body' => '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": {
"id": "",
"file": {
"data": "",
"type": ""
}
},
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/portals/:portalId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'portalName' => '',
'portalDescription' => '',
'portalContactEmail' => '',
'portalLogoImage' => [
'id' => '',
'file' => [
'data' => '',
'type' => ''
]
],
'roleArn' => '',
'clientToken' => '',
'notificationSenderEmail' => '',
'alarms' => [
'alarmRoleArn' => '',
'notificationLambdaArn' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'portalName' => '',
'portalDescription' => '',
'portalContactEmail' => '',
'portalLogoImage' => [
'id' => '',
'file' => [
'data' => '',
'type' => ''
]
],
'roleArn' => '',
'clientToken' => '',
'notificationSenderEmail' => '',
'alarms' => [
'alarmRoleArn' => '',
'notificationLambdaArn' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/portals/:portalId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/portals/:portalId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": {
"id": "",
"file": {
"data": "",
"type": ""
}
},
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/portals/:portalId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": {
"id": "",
"file": {
"data": "",
"type": ""
}
},
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/portals/:portalId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/portals/:portalId"
payload = {
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": {
"id": "",
"file": {
"data": "",
"type": ""
}
},
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/portals/:portalId"
payload <- "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/portals/:portalId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\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.put('/baseUrl/portals/:portalId') do |req|
req.body = "{\n \"portalName\": \"\",\n \"portalDescription\": \"\",\n \"portalContactEmail\": \"\",\n \"portalLogoImage\": {\n \"id\": \"\",\n \"file\": {\n \"data\": \"\",\n \"type\": \"\"\n }\n },\n \"roleArn\": \"\",\n \"clientToken\": \"\",\n \"notificationSenderEmail\": \"\",\n \"alarms\": {\n \"alarmRoleArn\": \"\",\n \"notificationLambdaArn\": \"\"\n }\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}}/portals/:portalId";
let payload = json!({
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": json!({
"id": "",
"file": json!({
"data": "",
"type": ""
})
}),
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": json!({
"alarmRoleArn": "",
"notificationLambdaArn": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/portals/:portalId \
--header 'content-type: application/json' \
--data '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": {
"id": "",
"file": {
"data": "",
"type": ""
}
},
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}'
echo '{
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": {
"id": "",
"file": {
"data": "",
"type": ""
}
},
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": {
"alarmRoleArn": "",
"notificationLambdaArn": ""
}
}' | \
http PUT {{baseUrl}}/portals/:portalId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "portalName": "",\n "portalDescription": "",\n "portalContactEmail": "",\n "portalLogoImage": {\n "id": "",\n "file": {\n "data": "",\n "type": ""\n }\n },\n "roleArn": "",\n "clientToken": "",\n "notificationSenderEmail": "",\n "alarms": {\n "alarmRoleArn": "",\n "notificationLambdaArn": ""\n }\n}' \
--output-document \
- {{baseUrl}}/portals/:portalId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"portalName": "",
"portalDescription": "",
"portalContactEmail": "",
"portalLogoImage": [
"id": "",
"file": [
"data": "",
"type": ""
]
],
"roleArn": "",
"clientToken": "",
"notificationSenderEmail": "",
"alarms": [
"alarmRoleArn": "",
"notificationLambdaArn": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/portals/:portalId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateProject
{{baseUrl}}/projects/:projectId
QUERY PARAMS
projectId
BODY json
{
"projectName": "",
"projectDescription": "",
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
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 \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/projects/:projectId" {:content-type :json
:form-params {:projectName ""
:projectDescription ""
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/projects/:projectId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/projects/:projectId"),
Content = new StringContent("{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/projects/:projectId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\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 \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/projects/:projectId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 72
{
"projectName": "",
"projectDescription": "",
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/projects/:projectId")
.setHeader("content-type", "application/json")
.setBody("{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\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("PUT", HttpRequest.BodyPublishers.ofString("{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/projects/:projectId")
.header("content-type", "application/json")
.body("{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
projectName: '',
projectDescription: '',
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/projects/:projectId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId',
headers: {'content-type': 'application/json'},
data: {projectName: '', projectDescription: '', clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/projects/:projectId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"projectName":"","projectDescription":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/projects/:projectId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "projectName": "",\n "projectDescription": "",\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/projects/:projectId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/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({projectName: '', projectDescription: '', clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId',
headers: {'content-type': 'application/json'},
body: {projectName: '', projectDescription: '', clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/projects/:projectId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
projectName: '',
projectDescription: '',
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/projects/:projectId',
headers: {'content-type': 'application/json'},
data: {projectName: '', projectDescription: '', clientToken: ''}
};
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: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"projectName":"","projectDescription":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"projectName": @"",
@"projectDescription": @"",
@"clientToken": @"" };
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:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/projects/:projectId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `PUT 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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'projectName' => '',
'projectDescription' => '',
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/projects/:projectId', [
'body' => '{
"projectName": "",
"projectDescription": "",
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/projects/:projectId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'projectName' => '',
'projectDescription' => '',
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'projectName' => '',
'projectDescription' => '',
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/projects/:projectId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/projects/:projectId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"projectName": "",
"projectDescription": "",
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/projects/:projectId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"projectName": "",
"projectDescription": "",
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/projects/:projectId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/projects/:projectId"
payload = {
"projectName": "",
"projectDescription": "",
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/projects/:projectId"
payload <- "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/projects/:projectId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/projects/:projectId') do |req|
req.body = "{\n \"projectName\": \"\",\n \"projectDescription\": \"\",\n \"clientToken\": \"\"\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!({
"projectName": "",
"projectDescription": "",
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/projects/:projectId \
--header 'content-type: application/json' \
--data '{
"projectName": "",
"projectDescription": "",
"clientToken": ""
}'
echo '{
"projectName": "",
"projectDescription": "",
"clientToken": ""
}' | \
http PUT {{baseUrl}}/projects/:projectId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "projectName": "",\n "projectDescription": "",\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/projects/:projectId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"projectName": "",
"projectDescription": "",
"clientToken": ""
] 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 = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()