Amazon Cognito Sync
POST
BulkPublish
{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish
QUERY PARAMS
IdentityPoolId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identitypools/:IdentityPoolId/bulkpublish HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/bulkpublish',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish');
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}}/identitypools/:IdentityPoolId/bulkpublish'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/identitypools/:IdentityPoolId/bulkpublish")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/identitypools/:IdentityPoolId/bulkpublish') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish
http POST {{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/bulkpublish")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteDataset
{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
QUERY PARAMS
IdentityPoolId
IdentityId
DatasetName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"))
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"]
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName",
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName";
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
http DELETE {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
DescribeDataset
{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
QUERY PARAMS
IdentityPoolId
IdentityId
DatasetName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"))
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"]
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName",
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName";
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
http GET {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")! 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
DescribeIdentityPoolUsage
{{baseUrl}}/identitypools/:IdentityPoolId
QUERY PARAMS
IdentityPoolId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/identitypools/:IdentityPoolId")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId"
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}}/identitypools/:IdentityPoolId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId"
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/identitypools/:IdentityPoolId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/identitypools/:IdentityPoolId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId"))
.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}}/identitypools/:IdentityPoolId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/identitypools/:IdentityPoolId")
.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}}/identitypools/:IdentityPoolId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/identitypools/:IdentityPoolId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId';
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}}/identitypools/:IdentityPoolId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId',
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}}/identitypools/:IdentityPoolId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/identitypools/:IdentityPoolId');
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}}/identitypools/:IdentityPoolId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId';
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}}/identitypools/:IdentityPoolId"]
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}}/identitypools/:IdentityPoolId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId",
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}}/identitypools/:IdentityPoolId');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/identitypools/:IdentityPoolId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId")
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/identitypools/:IdentityPoolId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId";
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}}/identitypools/:IdentityPoolId
http GET {{baseUrl}}/identitypools/:IdentityPoolId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId")! 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
DescribeIdentityUsage
{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId
QUERY PARAMS
IdentityPoolId
IdentityId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId"
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}}/identitypools/:IdentityPoolId/identities/:IdentityId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId"
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/identitypools/:IdentityPoolId/identities/:IdentityId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId"))
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId")
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId',
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}}/identitypools/:IdentityPoolId/identities/:IdentityId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId');
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}}/identitypools/:IdentityPoolId/identities/:IdentityId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId"]
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}}/identitypools/:IdentityPoolId/identities/:IdentityId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId",
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}}/identitypools/:IdentityPoolId/identities/:IdentityId');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId")
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/identitypools/:IdentityPoolId/identities/:IdentityId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId";
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}}/identitypools/:IdentityPoolId/identities/:IdentityId
http GET {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId")! 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
GetBulkPublishDetails
{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails
QUERY PARAMS
IdentityPoolId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identitypools/:IdentityPoolId/getBulkPublishDetails HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/getBulkPublishDetails',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails');
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}}/identitypools/:IdentityPoolId/getBulkPublishDetails'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/identitypools/:IdentityPoolId/getBulkPublishDetails")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/identitypools/:IdentityPoolId/getBulkPublishDetails') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails
http POST {{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/getBulkPublishDetails")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetCognitoEvents
{{baseUrl}}/identitypools/:IdentityPoolId/events
QUERY PARAMS
IdentityPoolId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/events");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/identitypools/:IdentityPoolId/events")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/events"
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}}/identitypools/:IdentityPoolId/events"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/events");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/events"
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/identitypools/:IdentityPoolId/events HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/identitypools/:IdentityPoolId/events")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/events"))
.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}}/identitypools/:IdentityPoolId/events")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/identitypools/:IdentityPoolId/events")
.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}}/identitypools/:IdentityPoolId/events');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/events'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/events';
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}}/identitypools/:IdentityPoolId/events',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/events")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/events',
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}}/identitypools/:IdentityPoolId/events'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/identitypools/:IdentityPoolId/events');
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}}/identitypools/:IdentityPoolId/events'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/events';
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}}/identitypools/:IdentityPoolId/events"]
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}}/identitypools/:IdentityPoolId/events" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/events",
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}}/identitypools/:IdentityPoolId/events');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/events');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/events');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/events' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/events' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/identitypools/:IdentityPoolId/events")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/events"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/events"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/events")
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/identitypools/:IdentityPoolId/events') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/events";
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}}/identitypools/:IdentityPoolId/events
http GET {{baseUrl}}/identitypools/:IdentityPoolId/events
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/events
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/events")! 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
GetIdentityPoolConfiguration
{{baseUrl}}/identitypools/:IdentityPoolId/configuration
QUERY PARAMS
IdentityPoolId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/configuration");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/configuration"
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}}/identitypools/:IdentityPoolId/configuration"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/configuration");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/configuration"
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/identitypools/:IdentityPoolId/configuration HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/configuration"))
.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}}/identitypools/:IdentityPoolId/configuration")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
.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}}/identitypools/:IdentityPoolId/configuration');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/configuration'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/configuration';
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}}/identitypools/:IdentityPoolId/configuration',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/configuration',
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}}/identitypools/:IdentityPoolId/configuration'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/identitypools/:IdentityPoolId/configuration');
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}}/identitypools/:IdentityPoolId/configuration'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/configuration';
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}}/identitypools/:IdentityPoolId/configuration"]
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}}/identitypools/:IdentityPoolId/configuration" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/configuration",
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}}/identitypools/:IdentityPoolId/configuration');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/configuration');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/configuration');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/configuration' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/configuration' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/identitypools/:IdentityPoolId/configuration")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/configuration"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/configuration"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
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/identitypools/:IdentityPoolId/configuration') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/configuration";
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}}/identitypools/:IdentityPoolId/configuration
http GET {{baseUrl}}/identitypools/:IdentityPoolId/configuration
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/configuration
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/configuration")! 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
ListDatasets
{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets
QUERY PARAMS
IdentityPoolId
IdentityId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets"
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets"
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets"))
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets")
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets',
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets');
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets"]
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets",
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets")
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets";
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets
http GET {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets")! 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
ListIdentityPoolUsage
{{baseUrl}}/identitypools
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/identitypools")
require "http/client"
url = "{{baseUrl}}/identitypools"
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}}/identitypools"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools"
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/identitypools HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/identitypools")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools"))
.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}}/identitypools")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/identitypools")
.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}}/identitypools');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/identitypools'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools';
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}}/identitypools',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools',
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}}/identitypools'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/identitypools');
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}}/identitypools'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools';
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}}/identitypools"]
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}}/identitypools" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools",
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}}/identitypools');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/identitypools")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools")
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/identitypools') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools";
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}}/identitypools
http GET {{baseUrl}}/identitypools
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/identitypools
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools")! 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
ListRecords
{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records
QUERY PARAMS
IdentityPoolId
IdentityId
DatasetName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records"
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records"
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records"))
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records")
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records',
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records');
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records"]
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records",
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records")
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records";
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records
http GET {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/records")! 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
RegisterDevice
{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device
QUERY PARAMS
IdentityPoolId
IdentityId
BODY json
{
"Platform": "",
"Token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device");
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 \"Platform\": \"\",\n \"Token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device" {:content-type :json
:form-params {:Platform ""
:Token ""}})
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Platform\": \"\",\n \"Token\": \"\"\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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device"),
Content = new StringContent("{\n \"Platform\": \"\",\n \"Token\": \"\"\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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Platform\": \"\",\n \"Token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device"
payload := strings.NewReader("{\n \"Platform\": \"\",\n \"Token\": \"\"\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/identitypools/:IdentityPoolId/identity/:IdentityId/device HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 35
{
"Platform": "",
"Token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device")
.setHeader("content-type", "application/json")
.setBody("{\n \"Platform\": \"\",\n \"Token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Platform\": \"\",\n \"Token\": \"\"\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 \"Platform\": \"\",\n \"Token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device")
.header("content-type", "application/json")
.body("{\n \"Platform\": \"\",\n \"Token\": \"\"\n}")
.asString();
const data = JSON.stringify({
Platform: '',
Token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device',
headers: {'content-type': 'application/json'},
data: {Platform: '', Token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Platform":"","Token":""}'
};
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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Platform": "",\n "Token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Platform\": \"\",\n \"Token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device")
.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/identitypools/:IdentityPoolId/identity/:IdentityId/device',
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({Platform: '', Token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device',
headers: {'content-type': 'application/json'},
body: {Platform: '', Token: ''},
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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Platform: '',
Token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device',
headers: {'content-type': 'application/json'},
data: {Platform: '', Token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Platform":"","Token":""}'
};
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 = @{ @"Platform": @"",
@"Token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device"]
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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Platform\": \"\",\n \"Token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device",
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([
'Platform' => '',
'Token' => ''
]),
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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device', [
'body' => '{
"Platform": "",
"Token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Platform' => '',
'Token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Platform' => '',
'Token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device');
$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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Platform": "",
"Token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Platform": "",
"Token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Platform\": \"\",\n \"Token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identitypools/:IdentityPoolId/identity/:IdentityId/device", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device"
payload = {
"Platform": "",
"Token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device"
payload <- "{\n \"Platform\": \"\",\n \"Token\": \"\"\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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device")
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 \"Platform\": \"\",\n \"Token\": \"\"\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/identitypools/:IdentityPoolId/identity/:IdentityId/device') do |req|
req.body = "{\n \"Platform\": \"\",\n \"Token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device";
let payload = json!({
"Platform": "",
"Token": ""
});
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}}/identitypools/:IdentityPoolId/identity/:IdentityId/device \
--header 'content-type: application/json' \
--data '{
"Platform": "",
"Token": ""
}'
echo '{
"Platform": "",
"Token": ""
}' | \
http POST {{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Platform": "",\n "Token": ""\n}' \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Platform": "",
"Token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identity/:IdentityId/device")! 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
SetCognitoEvents
{{baseUrl}}/identitypools/:IdentityPoolId/events
QUERY PARAMS
IdentityPoolId
BODY json
{
"Events": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/events");
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 \"Events\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identitypools/:IdentityPoolId/events" {:content-type :json
:form-params {:Events {}}})
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/events"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Events\": {}\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}}/identitypools/:IdentityPoolId/events"),
Content = new StringContent("{\n \"Events\": {}\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}}/identitypools/:IdentityPoolId/events");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Events\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/events"
payload := strings.NewReader("{\n \"Events\": {}\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/identitypools/:IdentityPoolId/events HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18
{
"Events": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identitypools/:IdentityPoolId/events")
.setHeader("content-type", "application/json")
.setBody("{\n \"Events\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/events"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Events\": {}\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 \"Events\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/events")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identitypools/:IdentityPoolId/events")
.header("content-type", "application/json")
.body("{\n \"Events\": {}\n}")
.asString();
const data = JSON.stringify({
Events: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/events');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/events',
headers: {'content-type': 'application/json'},
data: {Events: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/events';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Events":{}}'
};
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}}/identitypools/:IdentityPoolId/events',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Events": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Events\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/events")
.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/identitypools/:IdentityPoolId/events',
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({Events: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/events',
headers: {'content-type': 'application/json'},
body: {Events: {}},
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}}/identitypools/:IdentityPoolId/events');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Events: {}
});
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}}/identitypools/:IdentityPoolId/events',
headers: {'content-type': 'application/json'},
data: {Events: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/events';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Events":{}}'
};
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 = @{ @"Events": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identitypools/:IdentityPoolId/events"]
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}}/identitypools/:IdentityPoolId/events" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Events\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/events",
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([
'Events' => [
]
]),
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}}/identitypools/:IdentityPoolId/events', [
'body' => '{
"Events": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/events');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Events' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Events' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/events');
$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}}/identitypools/:IdentityPoolId/events' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Events": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/events' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Events": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Events\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identitypools/:IdentityPoolId/events", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/events"
payload = { "Events": {} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/events"
payload <- "{\n \"Events\": {}\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}}/identitypools/:IdentityPoolId/events")
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 \"Events\": {}\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/identitypools/:IdentityPoolId/events') do |req|
req.body = "{\n \"Events\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/events";
let payload = json!({"Events": 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}}/identitypools/:IdentityPoolId/events \
--header 'content-type: application/json' \
--data '{
"Events": {}
}'
echo '{
"Events": {}
}' | \
http POST {{baseUrl}}/identitypools/:IdentityPoolId/events \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Events": {}\n}' \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/events
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Events": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/events")! 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
SetIdentityPoolConfiguration
{{baseUrl}}/identitypools/:IdentityPoolId/configuration
QUERY PARAMS
IdentityPoolId
BODY json
{
"PushSync": {
"ApplicationArns": "",
"RoleArn": ""
},
"CognitoStreams": {
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/configuration");
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 \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identitypools/:IdentityPoolId/configuration" {:content-type :json
:form-params {:PushSync {:ApplicationArns ""
:RoleArn ""}
:CognitoStreams {:StreamName ""
:RoleArn ""
:StreamingStatus ""}}})
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/configuration"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\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}}/identitypools/:IdentityPoolId/configuration"),
Content = new StringContent("{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\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}}/identitypools/:IdentityPoolId/configuration");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/configuration"
payload := strings.NewReader("{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\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/identitypools/:IdentityPoolId/configuration HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 162
{
"PushSync": {
"ApplicationArns": "",
"RoleArn": ""
},
"CognitoStreams": {
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
.setHeader("content-type", "application/json")
.setBody("{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/configuration"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\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 \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
.header("content-type", "application/json")
.body("{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
PushSync: {
ApplicationArns: '',
RoleArn: ''
},
CognitoStreams: {
StreamName: '',
RoleArn: '',
StreamingStatus: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/configuration');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/configuration',
headers: {'content-type': 'application/json'},
data: {
PushSync: {ApplicationArns: '', RoleArn: ''},
CognitoStreams: {StreamName: '', RoleArn: '', StreamingStatus: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/configuration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"PushSync":{"ApplicationArns":"","RoleArn":""},"CognitoStreams":{"StreamName":"","RoleArn":"","StreamingStatus":""}}'
};
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}}/identitypools/:IdentityPoolId/configuration',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "PushSync": {\n "ApplicationArns": "",\n "RoleArn": ""\n },\n "CognitoStreams": {\n "StreamName": "",\n "RoleArn": "",\n "StreamingStatus": ""\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 \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/configuration")
.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/identitypools/:IdentityPoolId/configuration',
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({
PushSync: {ApplicationArns: '', RoleArn: ''},
CognitoStreams: {StreamName: '', RoleArn: '', StreamingStatus: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/configuration',
headers: {'content-type': 'application/json'},
body: {
PushSync: {ApplicationArns: '', RoleArn: ''},
CognitoStreams: {StreamName: '', RoleArn: '', StreamingStatus: ''}
},
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}}/identitypools/:IdentityPoolId/configuration');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
PushSync: {
ApplicationArns: '',
RoleArn: ''
},
CognitoStreams: {
StreamName: '',
RoleArn: '',
StreamingStatus: ''
}
});
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}}/identitypools/:IdentityPoolId/configuration',
headers: {'content-type': 'application/json'},
data: {
PushSync: {ApplicationArns: '', RoleArn: ''},
CognitoStreams: {StreamName: '', RoleArn: '', StreamingStatus: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/configuration';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"PushSync":{"ApplicationArns":"","RoleArn":""},"CognitoStreams":{"StreamName":"","RoleArn":"","StreamingStatus":""}}'
};
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 = @{ @"PushSync": @{ @"ApplicationArns": @"", @"RoleArn": @"" },
@"CognitoStreams": @{ @"StreamName": @"", @"RoleArn": @"", @"StreamingStatus": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identitypools/:IdentityPoolId/configuration"]
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}}/identitypools/:IdentityPoolId/configuration" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/configuration",
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([
'PushSync' => [
'ApplicationArns' => '',
'RoleArn' => ''
],
'CognitoStreams' => [
'StreamName' => '',
'RoleArn' => '',
'StreamingStatus' => ''
]
]),
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}}/identitypools/:IdentityPoolId/configuration', [
'body' => '{
"PushSync": {
"ApplicationArns": "",
"RoleArn": ""
},
"CognitoStreams": {
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/configuration');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'PushSync' => [
'ApplicationArns' => '',
'RoleArn' => ''
],
'CognitoStreams' => [
'StreamName' => '',
'RoleArn' => '',
'StreamingStatus' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'PushSync' => [
'ApplicationArns' => '',
'RoleArn' => ''
],
'CognitoStreams' => [
'StreamName' => '',
'RoleArn' => '',
'StreamingStatus' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/configuration');
$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}}/identitypools/:IdentityPoolId/configuration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"PushSync": {
"ApplicationArns": "",
"RoleArn": ""
},
"CognitoStreams": {
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/configuration' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"PushSync": {
"ApplicationArns": "",
"RoleArn": ""
},
"CognitoStreams": {
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identitypools/:IdentityPoolId/configuration", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/configuration"
payload = {
"PushSync": {
"ApplicationArns": "",
"RoleArn": ""
},
"CognitoStreams": {
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/configuration"
payload <- "{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\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}}/identitypools/:IdentityPoolId/configuration")
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 \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\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/identitypools/:IdentityPoolId/configuration') do |req|
req.body = "{\n \"PushSync\": {\n \"ApplicationArns\": \"\",\n \"RoleArn\": \"\"\n },\n \"CognitoStreams\": {\n \"StreamName\": \"\",\n \"RoleArn\": \"\",\n \"StreamingStatus\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/configuration";
let payload = json!({
"PushSync": json!({
"ApplicationArns": "",
"RoleArn": ""
}),
"CognitoStreams": json!({
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
})
});
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}}/identitypools/:IdentityPoolId/configuration \
--header 'content-type: application/json' \
--data '{
"PushSync": {
"ApplicationArns": "",
"RoleArn": ""
},
"CognitoStreams": {
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
}
}'
echo '{
"PushSync": {
"ApplicationArns": "",
"RoleArn": ""
},
"CognitoStreams": {
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
}
}' | \
http POST {{baseUrl}}/identitypools/:IdentityPoolId/configuration \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "PushSync": {\n "ApplicationArns": "",\n "RoleArn": ""\n },\n "CognitoStreams": {\n "StreamName": "",\n "RoleArn": "",\n "StreamingStatus": ""\n }\n}' \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/configuration
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"PushSync": [
"ApplicationArns": "",
"RoleArn": ""
],
"CognitoStreams": [
"StreamName": "",
"RoleArn": "",
"StreamingStatus": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/configuration")! 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
SubscribeToDataset
{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId
QUERY PARAMS
IdentityPoolId
IdentityId
DatasetName
DeviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId
http POST {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
UnsubscribeFromDataset
{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId
QUERY PARAMS
IdentityPoolId
IdentityId
DatasetName
DeviceId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"))
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
.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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId',
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId';
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"]
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId",
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")
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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId";
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId
http DELETE {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName/subscriptions/:DeviceId")! 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
UpdateRecords
{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
QUERY PARAMS
IdentityPoolId
IdentityId
DatasetName
BODY json
{
"DeviceId": "",
"RecordPatches": [
{
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
}
],
"SyncSessionToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName");
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 \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName" {:content-type :json
:form-params {:DeviceId ""
:RecordPatches [{:Op ""
:Key ""
:Value ""
:SyncCount ""
:DeviceLastModifiedDate ""}]
:SyncSessionToken ""}})
require "http/client"
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"),
Content = new StringContent("{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
payload := strings.NewReader("{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 194
{
"DeviceId": "",
"RecordPatches": [
{
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
}
],
"SyncSessionToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.setHeader("content-type", "application/json")
.setBody("{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\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 \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.header("content-type", "application/json")
.body("{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
DeviceId: '',
RecordPatches: [
{
Op: '',
Key: '',
Value: '',
SyncCount: '',
DeviceLastModifiedDate: ''
}
],
SyncSessionToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
headers: {'content-type': 'application/json'},
data: {
DeviceId: '',
RecordPatches: [{Op: '', Key: '', Value: '', SyncCount: '', DeviceLastModifiedDate: ''}],
SyncSessionToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"DeviceId":"","RecordPatches":[{"Op":"","Key":"","Value":"","SyncCount":"","DeviceLastModifiedDate":""}],"SyncSessionToken":""}'
};
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "DeviceId": "",\n "RecordPatches": [\n {\n "Op": "",\n "Key": "",\n "Value": "",\n "SyncCount": "",\n "DeviceLastModifiedDate": ""\n }\n ],\n "SyncSessionToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
.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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
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({
DeviceId: '',
RecordPatches: [{Op: '', Key: '', Value: '', SyncCount: '', DeviceLastModifiedDate: ''}],
SyncSessionToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
headers: {'content-type': 'application/json'},
body: {
DeviceId: '',
RecordPatches: [{Op: '', Key: '', Value: '', SyncCount: '', DeviceLastModifiedDate: ''}],
SyncSessionToken: ''
},
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
DeviceId: '',
RecordPatches: [
{
Op: '',
Key: '',
Value: '',
SyncCount: '',
DeviceLastModifiedDate: ''
}
],
SyncSessionToken: ''
});
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName',
headers: {'content-type': 'application/json'},
data: {
DeviceId: '',
RecordPatches: [{Op: '', Key: '', Value: '', SyncCount: '', DeviceLastModifiedDate: ''}],
SyncSessionToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"DeviceId":"","RecordPatches":[{"Op":"","Key":"","Value":"","SyncCount":"","DeviceLastModifiedDate":""}],"SyncSessionToken":""}'
};
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 = @{ @"DeviceId": @"",
@"RecordPatches": @[ @{ @"Op": @"", @"Key": @"", @"Value": @"", @"SyncCount": @"", @"DeviceLastModifiedDate": @"" } ],
@"SyncSessionToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"]
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName",
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([
'DeviceId' => '',
'RecordPatches' => [
[
'Op' => '',
'Key' => '',
'Value' => '',
'SyncCount' => '',
'DeviceLastModifiedDate' => ''
]
],
'SyncSessionToken' => ''
]),
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName', [
'body' => '{
"DeviceId": "",
"RecordPatches": [
{
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
}
],
"SyncSessionToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DeviceId' => '',
'RecordPatches' => [
[
'Op' => '',
'Key' => '',
'Value' => '',
'SyncCount' => '',
'DeviceLastModifiedDate' => ''
]
],
'SyncSessionToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DeviceId' => '',
'RecordPatches' => [
[
'Op' => '',
'Key' => '',
'Value' => '',
'SyncCount' => '',
'DeviceLastModifiedDate' => ''
]
],
'SyncSessionToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName');
$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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeviceId": "",
"RecordPatches": [
{
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
}
],
"SyncSessionToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DeviceId": "",
"RecordPatches": [
{
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
}
],
"SyncSessionToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
payload = {
"DeviceId": "",
"RecordPatches": [
{
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
}
],
"SyncSessionToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName"
payload <- "{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")
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 \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\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/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName') do |req|
req.body = "{\n \"DeviceId\": \"\",\n \"RecordPatches\": [\n {\n \"Op\": \"\",\n \"Key\": \"\",\n \"Value\": \"\",\n \"SyncCount\": \"\",\n \"DeviceLastModifiedDate\": \"\"\n }\n ],\n \"SyncSessionToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName";
let payload = json!({
"DeviceId": "",
"RecordPatches": (
json!({
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
})
),
"SyncSessionToken": ""
});
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}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName \
--header 'content-type: application/json' \
--data '{
"DeviceId": "",
"RecordPatches": [
{
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
}
],
"SyncSessionToken": ""
}'
echo '{
"DeviceId": "",
"RecordPatches": [
{
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
}
],
"SyncSessionToken": ""
}' | \
http POST {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "DeviceId": "",\n "RecordPatches": [\n {\n "Op": "",\n "Key": "",\n "Value": "",\n "SyncCount": "",\n "DeviceLastModifiedDate": ""\n }\n ],\n "SyncSessionToken": ""\n}' \
--output-document \
- {{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"DeviceId": "",
"RecordPatches": [
[
"Op": "",
"Key": "",
"Value": "",
"SyncCount": "",
"DeviceLastModifiedDate": ""
]
],
"SyncSessionToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identitypools/:IdentityPoolId/identities/:IdentityId/datasets/:DatasetName")! 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()