FinSpace Public API
POST
AssociateUserToPermissionGroup
{{baseUrl}}/permission-group/:permissionGroupId/users/:userId
QUERY PARAMS
permissionGroupId
userId
BODY json
{
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId" {:content-type :json
:form-params {:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"),
Content = new StringContent("{\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"
payload := strings.NewReader("{\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/permission-group/:permissionGroupId/users/:userId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
.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/permission-group/:permissionGroupId/users/:userId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId',
headers: {'content-type': 'application/json'},
body: {clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"]
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}}/permission-group/:permissionGroupId/users/:userId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/permission-group/:permissionGroupId/users/:userId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId', [
'body' => '{
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/permission-group/:permissionGroupId/users/:userId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/permission-group/:permissionGroupId/users/:userId');
$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}}/permission-group/:permissionGroupId/users/:userId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/permission-group/:permissionGroupId/users/:userId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"
payload = { "clientToken": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"
payload <- "{\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/permission-group/:permissionGroupId/users/:userId') do |req|
req.body = "{\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId";
let payload = json!({"clientToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/permission-group/:permissionGroupId/users/:userId \
--header 'content-type: application/json' \
--data '{
"clientToken": ""
}'
echo '{
"clientToken": ""
}' | \
http POST {{baseUrl}}/permission-group/:permissionGroupId/users/:userId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/permission-group/:permissionGroupId/users/:userId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clientToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")! 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
CreateChangeset
{{baseUrl}}/datasets/:datasetId/changesetsv2
QUERY PARAMS
datasetId
BODY json
{
"clientToken": "",
"changeType": "",
"sourceParams": {},
"formatParams": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasets/:datasetId/changesetsv2");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/datasets/:datasetId/changesetsv2" {:content-type :json
:form-params {:clientToken ""
:changeType ""
:sourceParams {}
:formatParams {}}})
require "http/client"
url = "{{baseUrl}}/datasets/:datasetId/changesetsv2"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\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}}/datasets/:datasetId/changesetsv2"),
Content = new StringContent("{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\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}}/datasets/:datasetId/changesetsv2");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasets/:datasetId/changesetsv2"
payload := strings.NewReader("{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\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/datasets/:datasetId/changesetsv2 HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 87
{
"clientToken": "",
"changeType": "",
"sourceParams": {},
"formatParams": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/datasets/:datasetId/changesetsv2")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasets/:datasetId/changesetsv2"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/changesetsv2")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/datasets/:datasetId/changesetsv2")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}")
.asString();
const data = JSON.stringify({
clientToken: '',
changeType: '',
sourceParams: {},
formatParams: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/datasets/:datasetId/changesetsv2');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/datasets/:datasetId/changesetsv2',
headers: {'content-type': 'application/json'},
data: {clientToken: '', changeType: '', sourceParams: {}, formatParams: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasets/:datasetId/changesetsv2';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","changeType":"","sourceParams":{},"formatParams":{}}'
};
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}}/datasets/:datasetId/changesetsv2',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": "",\n "changeType": "",\n "sourceParams": {},\n "formatParams": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/changesetsv2")
.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/datasets/:datasetId/changesetsv2',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clientToken: '', changeType: '', sourceParams: {}, formatParams: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/datasets/:datasetId/changesetsv2',
headers: {'content-type': 'application/json'},
body: {clientToken: '', changeType: '', sourceParams: {}, formatParams: {}},
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}}/datasets/:datasetId/changesetsv2');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: '',
changeType: '',
sourceParams: {},
formatParams: {}
});
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}}/datasets/:datasetId/changesetsv2',
headers: {'content-type': 'application/json'},
data: {clientToken: '', changeType: '', sourceParams: {}, formatParams: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasets/:datasetId/changesetsv2';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","changeType":"","sourceParams":{},"formatParams":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"",
@"changeType": @"",
@"sourceParams": @{ },
@"formatParams": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/datasets/:datasetId/changesetsv2"]
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}}/datasets/:datasetId/changesetsv2" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasets/:datasetId/changesetsv2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => '',
'changeType' => '',
'sourceParams' => [
],
'formatParams' => [
]
]),
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}}/datasets/:datasetId/changesetsv2', [
'body' => '{
"clientToken": "",
"changeType": "",
"sourceParams": {},
"formatParams": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/datasets/:datasetId/changesetsv2');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => '',
'changeType' => '',
'sourceParams' => [
],
'formatParams' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => '',
'changeType' => '',
'sourceParams' => [
],
'formatParams' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/datasets/:datasetId/changesetsv2');
$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}}/datasets/:datasetId/changesetsv2' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"changeType": "",
"sourceParams": {},
"formatParams": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasets/:datasetId/changesetsv2' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"changeType": "",
"sourceParams": {},
"formatParams": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/datasets/:datasetId/changesetsv2", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasets/:datasetId/changesetsv2"
payload = {
"clientToken": "",
"changeType": "",
"sourceParams": {},
"formatParams": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasets/:datasetId/changesetsv2"
payload <- "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\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}}/datasets/:datasetId/changesetsv2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\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/datasets/:datasetId/changesetsv2') do |req|
req.body = "{\n \"clientToken\": \"\",\n \"changeType\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasets/:datasetId/changesetsv2";
let payload = json!({
"clientToken": "",
"changeType": "",
"sourceParams": json!({}),
"formatParams": 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}}/datasets/:datasetId/changesetsv2 \
--header 'content-type: application/json' \
--data '{
"clientToken": "",
"changeType": "",
"sourceParams": {},
"formatParams": {}
}'
echo '{
"clientToken": "",
"changeType": "",
"sourceParams": {},
"formatParams": {}
}' | \
http POST {{baseUrl}}/datasets/:datasetId/changesetsv2 \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": "",\n "changeType": "",\n "sourceParams": {},\n "formatParams": {}\n}' \
--output-document \
- {{baseUrl}}/datasets/:datasetId/changesetsv2
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientToken": "",
"changeType": "",
"sourceParams": [],
"formatParams": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasets/:datasetId/changesetsv2")! 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
CreateDataView
{{baseUrl}}/datasets/:datasetId/dataviewsv2
QUERY PARAMS
datasetId
BODY json
{
"clientToken": "",
"autoUpdate": false,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": {
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasets/:datasetId/dataviewsv2");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/datasets/:datasetId/dataviewsv2" {:content-type :json
:form-params {:clientToken ""
:autoUpdate false
:sortColumns []
:partitionColumns []
:asOfTimestamp 0
:destinationTypeParams {:destinationType ""
:s3DestinationExportFileFormat ""
:s3DestinationExportFileFormatOptions ""}}})
require "http/client"
url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\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}}/datasets/:datasetId/dataviewsv2"),
Content = new StringContent("{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\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}}/datasets/:datasetId/dataviewsv2");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasets/:datasetId/dataviewsv2"
payload := strings.NewReader("{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\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/datasets/:datasetId/dataviewsv2 HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 264
{
"clientToken": "",
"autoUpdate": false,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": {
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/datasets/:datasetId/dataviewsv2")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasets/:datasetId/dataviewsv2"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\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 \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/dataviewsv2")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/datasets/:datasetId/dataviewsv2")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
clientToken: '',
autoUpdate: false,
sortColumns: [],
partitionColumns: [],
asOfTimestamp: 0,
destinationTypeParams: {
destinationType: '',
s3DestinationExportFileFormat: '',
s3DestinationExportFileFormatOptions: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/datasets/:datasetId/dataviewsv2');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/datasets/:datasetId/dataviewsv2',
headers: {'content-type': 'application/json'},
data: {
clientToken: '',
autoUpdate: false,
sortColumns: [],
partitionColumns: [],
asOfTimestamp: 0,
destinationTypeParams: {
destinationType: '',
s3DestinationExportFileFormat: '',
s3DestinationExportFileFormatOptions: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasets/:datasetId/dataviewsv2';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","autoUpdate":false,"sortColumns":[],"partitionColumns":[],"asOfTimestamp":0,"destinationTypeParams":{"destinationType":"","s3DestinationExportFileFormat":"","s3DestinationExportFileFormatOptions":""}}'
};
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}}/datasets/:datasetId/dataviewsv2',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": "",\n "autoUpdate": false,\n "sortColumns": [],\n "partitionColumns": [],\n "asOfTimestamp": 0,\n "destinationTypeParams": {\n "destinationType": "",\n "s3DestinationExportFileFormat": "",\n "s3DestinationExportFileFormatOptions": ""\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 \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/dataviewsv2")
.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/datasets/:datasetId/dataviewsv2',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
clientToken: '',
autoUpdate: false,
sortColumns: [],
partitionColumns: [],
asOfTimestamp: 0,
destinationTypeParams: {
destinationType: '',
s3DestinationExportFileFormat: '',
s3DestinationExportFileFormatOptions: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/datasets/:datasetId/dataviewsv2',
headers: {'content-type': 'application/json'},
body: {
clientToken: '',
autoUpdate: false,
sortColumns: [],
partitionColumns: [],
asOfTimestamp: 0,
destinationTypeParams: {
destinationType: '',
s3DestinationExportFileFormat: '',
s3DestinationExportFileFormatOptions: ''
}
},
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}}/datasets/:datasetId/dataviewsv2');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: '',
autoUpdate: false,
sortColumns: [],
partitionColumns: [],
asOfTimestamp: 0,
destinationTypeParams: {
destinationType: '',
s3DestinationExportFileFormat: '',
s3DestinationExportFileFormatOptions: ''
}
});
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}}/datasets/:datasetId/dataviewsv2',
headers: {'content-type': 'application/json'},
data: {
clientToken: '',
autoUpdate: false,
sortColumns: [],
partitionColumns: [],
asOfTimestamp: 0,
destinationTypeParams: {
destinationType: '',
s3DestinationExportFileFormat: '',
s3DestinationExportFileFormatOptions: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasets/:datasetId/dataviewsv2';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","autoUpdate":false,"sortColumns":[],"partitionColumns":[],"asOfTimestamp":0,"destinationTypeParams":{"destinationType":"","s3DestinationExportFileFormat":"","s3DestinationExportFileFormatOptions":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"",
@"autoUpdate": @NO,
@"sortColumns": @[ ],
@"partitionColumns": @[ ],
@"asOfTimestamp": @0,
@"destinationTypeParams": @{ @"destinationType": @"", @"s3DestinationExportFileFormat": @"", @"s3DestinationExportFileFormatOptions": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/datasets/:datasetId/dataviewsv2"]
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}}/datasets/:datasetId/dataviewsv2" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasets/:datasetId/dataviewsv2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => '',
'autoUpdate' => null,
'sortColumns' => [
],
'partitionColumns' => [
],
'asOfTimestamp' => 0,
'destinationTypeParams' => [
'destinationType' => '',
's3DestinationExportFileFormat' => '',
's3DestinationExportFileFormatOptions' => ''
]
]),
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}}/datasets/:datasetId/dataviewsv2', [
'body' => '{
"clientToken": "",
"autoUpdate": false,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": {
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/datasets/:datasetId/dataviewsv2');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => '',
'autoUpdate' => null,
'sortColumns' => [
],
'partitionColumns' => [
],
'asOfTimestamp' => 0,
'destinationTypeParams' => [
'destinationType' => '',
's3DestinationExportFileFormat' => '',
's3DestinationExportFileFormatOptions' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => '',
'autoUpdate' => null,
'sortColumns' => [
],
'partitionColumns' => [
],
'asOfTimestamp' => 0,
'destinationTypeParams' => [
'destinationType' => '',
's3DestinationExportFileFormat' => '',
's3DestinationExportFileFormatOptions' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/datasets/:datasetId/dataviewsv2');
$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}}/datasets/:datasetId/dataviewsv2' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"autoUpdate": false,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": {
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasets/:datasetId/dataviewsv2' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"autoUpdate": false,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": {
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/datasets/:datasetId/dataviewsv2", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2"
payload = {
"clientToken": "",
"autoUpdate": False,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": {
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasets/:datasetId/dataviewsv2"
payload <- "{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\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}}/datasets/:datasetId/dataviewsv2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\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/datasets/:datasetId/dataviewsv2') do |req|
req.body = "{\n \"clientToken\": \"\",\n \"autoUpdate\": false,\n \"sortColumns\": [],\n \"partitionColumns\": [],\n \"asOfTimestamp\": 0,\n \"destinationTypeParams\": {\n \"destinationType\": \"\",\n \"s3DestinationExportFileFormat\": \"\",\n \"s3DestinationExportFileFormatOptions\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2";
let payload = json!({
"clientToken": "",
"autoUpdate": false,
"sortColumns": (),
"partitionColumns": (),
"asOfTimestamp": 0,
"destinationTypeParams": json!({
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
})
});
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}}/datasets/:datasetId/dataviewsv2 \
--header 'content-type: application/json' \
--data '{
"clientToken": "",
"autoUpdate": false,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": {
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
}
}'
echo '{
"clientToken": "",
"autoUpdate": false,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": {
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
}
}' | \
http POST {{baseUrl}}/datasets/:datasetId/dataviewsv2 \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": "",\n "autoUpdate": false,\n "sortColumns": [],\n "partitionColumns": [],\n "asOfTimestamp": 0,\n "destinationTypeParams": {\n "destinationType": "",\n "s3DestinationExportFileFormat": "",\n "s3DestinationExportFileFormatOptions": ""\n }\n}' \
--output-document \
- {{baseUrl}}/datasets/:datasetId/dataviewsv2
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientToken": "",
"autoUpdate": false,
"sortColumns": [],
"partitionColumns": [],
"asOfTimestamp": 0,
"destinationTypeParams": [
"destinationType": "",
"s3DestinationExportFileFormat": "",
"s3DestinationExportFileFormatOptions": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasets/:datasetId/dataviewsv2")! 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
CreateDataset
{{baseUrl}}/datasetsv2
BODY json
{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": {
"name": "",
"phoneNumber": "",
"email": ""
},
"permissionGroupParams": {
"permissionGroupId": "",
"datasetPermissions": ""
},
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasetsv2");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/datasetsv2" {:content-type :json
:form-params {:clientToken ""
:datasetTitle ""
:kind ""
:datasetDescription ""
:ownerInfo {:name ""
:phoneNumber ""
:email ""}
:permissionGroupParams {:permissionGroupId ""
:datasetPermissions ""}
:alias ""
:schemaDefinition {:tabularSchemaConfig ""}}})
require "http/client"
url = "{{baseUrl}}/datasetsv2"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\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}}/datasetsv2"),
Content = new StringContent("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\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}}/datasetsv2");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasetsv2"
payload := strings.NewReader("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\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/datasetsv2 HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 330
{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": {
"name": "",
"phoneNumber": "",
"email": ""
},
"permissionGroupParams": {
"permissionGroupId": "",
"datasetPermissions": ""
},
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/datasetsv2")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasetsv2"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\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 \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/datasetsv2")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/datasetsv2")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
ownerInfo: {
name: '',
phoneNumber: '',
email: ''
},
permissionGroupParams: {
permissionGroupId: '',
datasetPermissions: ''
},
alias: '',
schemaDefinition: {
tabularSchemaConfig: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/datasetsv2');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/datasetsv2',
headers: {'content-type': 'application/json'},
data: {
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
ownerInfo: {name: '', phoneNumber: '', email: ''},
permissionGroupParams: {permissionGroupId: '', datasetPermissions: ''},
alias: '',
schemaDefinition: {tabularSchemaConfig: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasetsv2';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","datasetTitle":"","kind":"","datasetDescription":"","ownerInfo":{"name":"","phoneNumber":"","email":""},"permissionGroupParams":{"permissionGroupId":"","datasetPermissions":""},"alias":"","schemaDefinition":{"tabularSchemaConfig":""}}'
};
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}}/datasetsv2',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": "",\n "datasetTitle": "",\n "kind": "",\n "datasetDescription": "",\n "ownerInfo": {\n "name": "",\n "phoneNumber": "",\n "email": ""\n },\n "permissionGroupParams": {\n "permissionGroupId": "",\n "datasetPermissions": ""\n },\n "alias": "",\n "schemaDefinition": {\n "tabularSchemaConfig": ""\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 \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/datasetsv2")
.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/datasetsv2',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
ownerInfo: {name: '', phoneNumber: '', email: ''},
permissionGroupParams: {permissionGroupId: '', datasetPermissions: ''},
alias: '',
schemaDefinition: {tabularSchemaConfig: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/datasetsv2',
headers: {'content-type': 'application/json'},
body: {
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
ownerInfo: {name: '', phoneNumber: '', email: ''},
permissionGroupParams: {permissionGroupId: '', datasetPermissions: ''},
alias: '',
schemaDefinition: {tabularSchemaConfig: ''}
},
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}}/datasetsv2');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
ownerInfo: {
name: '',
phoneNumber: '',
email: ''
},
permissionGroupParams: {
permissionGroupId: '',
datasetPermissions: ''
},
alias: '',
schemaDefinition: {
tabularSchemaConfig: ''
}
});
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}}/datasetsv2',
headers: {'content-type': 'application/json'},
data: {
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
ownerInfo: {name: '', phoneNumber: '', email: ''},
permissionGroupParams: {permissionGroupId: '', datasetPermissions: ''},
alias: '',
schemaDefinition: {tabularSchemaConfig: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasetsv2';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","datasetTitle":"","kind":"","datasetDescription":"","ownerInfo":{"name":"","phoneNumber":"","email":""},"permissionGroupParams":{"permissionGroupId":"","datasetPermissions":""},"alias":"","schemaDefinition":{"tabularSchemaConfig":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"",
@"datasetTitle": @"",
@"kind": @"",
@"datasetDescription": @"",
@"ownerInfo": @{ @"name": @"", @"phoneNumber": @"", @"email": @"" },
@"permissionGroupParams": @{ @"permissionGroupId": @"", @"datasetPermissions": @"" },
@"alias": @"",
@"schemaDefinition": @{ @"tabularSchemaConfig": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/datasetsv2"]
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}}/datasetsv2" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasetsv2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => '',
'datasetTitle' => '',
'kind' => '',
'datasetDescription' => '',
'ownerInfo' => [
'name' => '',
'phoneNumber' => '',
'email' => ''
],
'permissionGroupParams' => [
'permissionGroupId' => '',
'datasetPermissions' => ''
],
'alias' => '',
'schemaDefinition' => [
'tabularSchemaConfig' => ''
]
]),
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}}/datasetsv2', [
'body' => '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": {
"name": "",
"phoneNumber": "",
"email": ""
},
"permissionGroupParams": {
"permissionGroupId": "",
"datasetPermissions": ""
},
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/datasetsv2');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => '',
'datasetTitle' => '',
'kind' => '',
'datasetDescription' => '',
'ownerInfo' => [
'name' => '',
'phoneNumber' => '',
'email' => ''
],
'permissionGroupParams' => [
'permissionGroupId' => '',
'datasetPermissions' => ''
],
'alias' => '',
'schemaDefinition' => [
'tabularSchemaConfig' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => '',
'datasetTitle' => '',
'kind' => '',
'datasetDescription' => '',
'ownerInfo' => [
'name' => '',
'phoneNumber' => '',
'email' => ''
],
'permissionGroupParams' => [
'permissionGroupId' => '',
'datasetPermissions' => ''
],
'alias' => '',
'schemaDefinition' => [
'tabularSchemaConfig' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/datasetsv2');
$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}}/datasetsv2' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": {
"name": "",
"phoneNumber": "",
"email": ""
},
"permissionGroupParams": {
"permissionGroupId": "",
"datasetPermissions": ""
},
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasetsv2' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": {
"name": "",
"phoneNumber": "",
"email": ""
},
"permissionGroupParams": {
"permissionGroupId": "",
"datasetPermissions": ""
},
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/datasetsv2", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasetsv2"
payload = {
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": {
"name": "",
"phoneNumber": "",
"email": ""
},
"permissionGroupParams": {
"permissionGroupId": "",
"datasetPermissions": ""
},
"alias": "",
"schemaDefinition": { "tabularSchemaConfig": "" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasetsv2"
payload <- "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\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}}/datasetsv2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\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/datasetsv2') do |req|
req.body = "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"ownerInfo\": {\n \"name\": \"\",\n \"phoneNumber\": \"\",\n \"email\": \"\"\n },\n \"permissionGroupParams\": {\n \"permissionGroupId\": \"\",\n \"datasetPermissions\": \"\"\n },\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasetsv2";
let payload = json!({
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": json!({
"name": "",
"phoneNumber": "",
"email": ""
}),
"permissionGroupParams": json!({
"permissionGroupId": "",
"datasetPermissions": ""
}),
"alias": "",
"schemaDefinition": json!({"tabularSchemaConfig": ""})
});
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}}/datasetsv2 \
--header 'content-type: application/json' \
--data '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": {
"name": "",
"phoneNumber": "",
"email": ""
},
"permissionGroupParams": {
"permissionGroupId": "",
"datasetPermissions": ""
},
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}'
echo '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": {
"name": "",
"phoneNumber": "",
"email": ""
},
"permissionGroupParams": {
"permissionGroupId": "",
"datasetPermissions": ""
},
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}' | \
http POST {{baseUrl}}/datasetsv2 \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": "",\n "datasetTitle": "",\n "kind": "",\n "datasetDescription": "",\n "ownerInfo": {\n "name": "",\n "phoneNumber": "",\n "email": ""\n },\n "permissionGroupParams": {\n "permissionGroupId": "",\n "datasetPermissions": ""\n },\n "alias": "",\n "schemaDefinition": {\n "tabularSchemaConfig": ""\n }\n}' \
--output-document \
- {{baseUrl}}/datasetsv2
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"ownerInfo": [
"name": "",
"phoneNumber": "",
"email": ""
],
"permissionGroupParams": [
"permissionGroupId": "",
"datasetPermissions": ""
],
"alias": "",
"schemaDefinition": ["tabularSchemaConfig": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasetsv2")! 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
CreatePermissionGroup
{{baseUrl}}/permission-group
BODY json
{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/permission-group");
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 \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/permission-group" {:content-type :json
:form-params {:name ""
:description ""
:applicationPermissions []
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/permission-group"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/permission-group"),
Content = new StringContent("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/permission-group");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/permission-group"
payload := strings.NewReader("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/permission-group HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 90
{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/permission-group")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/permission-group"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/permission-group")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/permission-group")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
description: '',
applicationPermissions: [],
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/permission-group');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/permission-group',
headers: {'content-type': 'application/json'},
data: {name: '', description: '', applicationPermissions: [], clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/permission-group';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","applicationPermissions":[],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/permission-group',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "description": "",\n "applicationPermissions": [],\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/permission-group")
.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/permission-group',
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({name: '', description: '', applicationPermissions: [], clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/permission-group',
headers: {'content-type': 'application/json'},
body: {name: '', description: '', applicationPermissions: [], clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/permission-group');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
description: '',
applicationPermissions: [],
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/permission-group',
headers: {'content-type': 'application/json'},
data: {name: '', description: '', applicationPermissions: [], clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/permission-group';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","applicationPermissions":[],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"description": @"",
@"applicationPermissions": @[ ],
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/permission-group"]
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}}/permission-group" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/permission-group",
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([
'name' => '',
'description' => '',
'applicationPermissions' => [
],
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/permission-group', [
'body' => '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/permission-group');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'description' => '',
'applicationPermissions' => [
],
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'description' => '',
'applicationPermissions' => [
],
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/permission-group');
$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}}/permission-group' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/permission-group' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/permission-group", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/permission-group"
payload = {
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/permission-group"
payload <- "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/permission-group")
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 \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/permission-group') do |req|
req.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/permission-group";
let payload = json!({
"name": "",
"description": "",
"applicationPermissions": (),
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/permission-group \
--header 'content-type: application/json' \
--data '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}'
echo '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}' | \
http POST {{baseUrl}}/permission-group \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "description": "",\n "applicationPermissions": [],\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/permission-group
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/permission-group")! 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
CreateUser
{{baseUrl}}/user
BODY json
{
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user");
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 \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/user" {:content-type :json
:form-params {:emailAddress ""
:type ""
:firstName ""
:lastName ""
:ApiAccess ""
:apiAccessPrincipalArn ""
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/user"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/user"),
Content = new StringContent("{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user"
payload := strings.NewReader("{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/user HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 146
{
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/user")
.setHeader("content-type", "application/json")
.setBody("{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/user")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/user")
.header("content-type", "application/json")
.body("{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
emailAddress: '',
type: '',
firstName: '',
lastName: '',
ApiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/user');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/user',
headers: {'content-type': 'application/json'},
data: {
emailAddress: '',
type: '',
firstName: '',
lastName: '',
ApiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"emailAddress":"","type":"","firstName":"","lastName":"","ApiAccess":"","apiAccessPrincipalArn":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/user',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "emailAddress": "",\n "type": "",\n "firstName": "",\n "lastName": "",\n "ApiAccess": "",\n "apiAccessPrincipalArn": "",\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/user")
.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/user',
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({
emailAddress: '',
type: '',
firstName: '',
lastName: '',
ApiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/user',
headers: {'content-type': 'application/json'},
body: {
emailAddress: '',
type: '',
firstName: '',
lastName: '',
ApiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/user');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
emailAddress: '',
type: '',
firstName: '',
lastName: '',
ApiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/user',
headers: {'content-type': 'application/json'},
data: {
emailAddress: '',
type: '',
firstName: '',
lastName: '',
ApiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"emailAddress":"","type":"","firstName":"","lastName":"","ApiAccess":"","apiAccessPrincipalArn":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"emailAddress": @"",
@"type": @"",
@"firstName": @"",
@"lastName": @"",
@"ApiAccess": @"",
@"apiAccessPrincipalArn": @"",
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/user"]
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}}/user" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user",
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([
'emailAddress' => '',
'type' => '',
'firstName' => '',
'lastName' => '',
'ApiAccess' => '',
'apiAccessPrincipalArn' => '',
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/user', [
'body' => '{
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/user');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'emailAddress' => '',
'type' => '',
'firstName' => '',
'lastName' => '',
'ApiAccess' => '',
'apiAccessPrincipalArn' => '',
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'emailAddress' => '',
'type' => '',
'firstName' => '',
'lastName' => '',
'ApiAccess' => '',
'apiAccessPrincipalArn' => '',
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/user');
$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}}/user' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/user", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user"
payload = {
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user"
payload <- "{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user")
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 \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/user') do |req|
req.body = "{\n \"emailAddress\": \"\",\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"ApiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user";
let payload = json!({
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/user \
--header 'content-type: application/json' \
--data '{
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}'
echo '{
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}' | \
http POST {{baseUrl}}/user \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "emailAddress": "",\n "type": "",\n "firstName": "",\n "lastName": "",\n "ApiAccess": "",\n "apiAccessPrincipalArn": "",\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/user
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"emailAddress": "",
"type": "",
"firstName": "",
"lastName": "",
"ApiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteDataset
{{baseUrl}}/datasetsv2/:datasetId
QUERY PARAMS
datasetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasetsv2/:datasetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/datasetsv2/:datasetId")
require "http/client"
url = "{{baseUrl}}/datasetsv2/:datasetId"
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}}/datasetsv2/:datasetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/datasetsv2/:datasetId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasetsv2/:datasetId"
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/datasetsv2/:datasetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/datasetsv2/:datasetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasetsv2/:datasetId"))
.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}}/datasetsv2/:datasetId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/datasetsv2/:datasetId")
.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}}/datasetsv2/:datasetId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/datasetsv2/:datasetId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasetsv2/:datasetId';
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}}/datasetsv2/:datasetId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/datasetsv2/:datasetId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasetsv2/:datasetId',
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}}/datasetsv2/:datasetId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/datasetsv2/:datasetId');
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}}/datasetsv2/:datasetId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasetsv2/:datasetId';
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}}/datasetsv2/:datasetId"]
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}}/datasetsv2/:datasetId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasetsv2/:datasetId",
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}}/datasetsv2/:datasetId');
echo $response->getBody();
setUrl('{{baseUrl}}/datasetsv2/:datasetId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/datasetsv2/:datasetId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasetsv2/:datasetId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasetsv2/:datasetId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/datasetsv2/:datasetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasetsv2/:datasetId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasetsv2/:datasetId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasetsv2/:datasetId")
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/datasetsv2/:datasetId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasetsv2/:datasetId";
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}}/datasetsv2/:datasetId
http DELETE {{baseUrl}}/datasetsv2/:datasetId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/datasetsv2/:datasetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasetsv2/:datasetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeletePermissionGroup
{{baseUrl}}/permission-group/:permissionGroupId
QUERY PARAMS
permissionGroupId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/permission-group/:permissionGroupId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/permission-group/:permissionGroupId")
require "http/client"
url = "{{baseUrl}}/permission-group/:permissionGroupId"
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}}/permission-group/:permissionGroupId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/permission-group/:permissionGroupId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/permission-group/:permissionGroupId"
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/permission-group/:permissionGroupId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/permission-group/:permissionGroupId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/permission-group/:permissionGroupId"))
.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}}/permission-group/:permissionGroupId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/permission-group/:permissionGroupId")
.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}}/permission-group/:permissionGroupId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/permission-group/:permissionGroupId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/permission-group/:permissionGroupId';
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}}/permission-group/:permissionGroupId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/permission-group/:permissionGroupId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/permission-group/:permissionGroupId',
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}}/permission-group/:permissionGroupId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/permission-group/:permissionGroupId');
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}}/permission-group/:permissionGroupId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/permission-group/:permissionGroupId';
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}}/permission-group/:permissionGroupId"]
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}}/permission-group/:permissionGroupId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/permission-group/:permissionGroupId",
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}}/permission-group/:permissionGroupId');
echo $response->getBody();
setUrl('{{baseUrl}}/permission-group/:permissionGroupId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/permission-group/:permissionGroupId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/permission-group/:permissionGroupId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/permission-group/:permissionGroupId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/permission-group/:permissionGroupId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/permission-group/:permissionGroupId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/permission-group/:permissionGroupId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/permission-group/:permissionGroupId")
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/permission-group/:permissionGroupId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/permission-group/:permissionGroupId";
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}}/permission-group/:permissionGroupId
http DELETE {{baseUrl}}/permission-group/:permissionGroupId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/permission-group/:permissionGroupId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/permission-group/:permissionGroupId")! 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
DisableUser
{{baseUrl}}/user/:userId/disable
QUERY PARAMS
userId
BODY json
{
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user/:userId/disable");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/user/:userId/disable" {:content-type :json
:form-params {:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/user/:userId/disable"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/user/:userId/disable"),
Content = new StringContent("{\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user/:userId/disable");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user/:userId/disable"
payload := strings.NewReader("{\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/user/:userId/disable HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/user/:userId/disable")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user/:userId/disable"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/user/:userId/disable")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/user/:userId/disable")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/user/:userId/disable');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/disable',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user/:userId/disable';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/user/:userId/disable',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/user/:userId/disable")
.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/user/:userId/disable',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/disable',
headers: {'content-type': 'application/json'},
body: {clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/user/:userId/disable');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/disable',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user/:userId/disable';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/user/:userId/disable"]
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}}/user/:userId/disable" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user/:userId/disable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/user/:userId/disable', [
'body' => '{
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/user/:userId/disable');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/user/:userId/disable');
$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}}/user/:userId/disable' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user/:userId/disable' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/user/:userId/disable", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user/:userId/disable"
payload = { "clientToken": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user/:userId/disable"
payload <- "{\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user/:userId/disable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/user/:userId/disable') do |req|
req.body = "{\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user/:userId/disable";
let payload = json!({"clientToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/user/:userId/disable \
--header 'content-type: application/json' \
--data '{
"clientToken": ""
}'
echo '{
"clientToken": ""
}' | \
http POST {{baseUrl}}/user/:userId/disable \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/user/:userId/disable
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clientToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user/:userId/disable")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DisassociateUserFromPermissionGroup
{{baseUrl}}/permission-group/:permissionGroupId/users/:userId
QUERY PARAMS
permissionGroupId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
require "http/client"
url = "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"
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}}/permission-group/:permissionGroupId/users/:userId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"
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/permission-group/:permissionGroupId/users/:userId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"))
.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}}/permission-group/:permissionGroupId/users/:userId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
.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}}/permission-group/:permissionGroupId/users/:userId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId';
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}}/permission-group/:permissionGroupId/users/:userId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/permission-group/:permissionGroupId/users/:userId',
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}}/permission-group/:permissionGroupId/users/:userId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId');
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}}/permission-group/:permissionGroupId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId';
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}}/permission-group/:permissionGroupId/users/:userId"]
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}}/permission-group/:permissionGroupId/users/:userId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/permission-group/:permissionGroupId/users/:userId",
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}}/permission-group/:permissionGroupId/users/:userId');
echo $response->getBody();
setUrl('{{baseUrl}}/permission-group/:permissionGroupId/users/:userId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/permission-group/:permissionGroupId/users/:userId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/permission-group/:permissionGroupId/users/:userId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/permission-group/:permissionGroupId/users/:userId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")
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/permission-group/:permissionGroupId/users/:userId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId";
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}}/permission-group/:permissionGroupId/users/:userId
http DELETE {{baseUrl}}/permission-group/:permissionGroupId/users/:userId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/permission-group/:permissionGroupId/users/:userId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/permission-group/:permissionGroupId/users/:userId")! 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
EnableUser
{{baseUrl}}/user/:userId/enable
QUERY PARAMS
userId
BODY json
{
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user/:userId/enable");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/user/:userId/enable" {:content-type :json
:form-params {:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/user/:userId/enable"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/user/:userId/enable"),
Content = new StringContent("{\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user/:userId/enable");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user/:userId/enable"
payload := strings.NewReader("{\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/user/:userId/enable HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/user/:userId/enable")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user/:userId/enable"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/user/:userId/enable")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/user/:userId/enable")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/user/:userId/enable');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/enable',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user/:userId/enable';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/user/:userId/enable',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/user/:userId/enable")
.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/user/:userId/enable',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/enable',
headers: {'content-type': 'application/json'},
body: {clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/user/:userId/enable');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/enable',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user/:userId/enable';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/user/:userId/enable"]
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}}/user/:userId/enable" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user/:userId/enable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/user/:userId/enable', [
'body' => '{
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/user/:userId/enable');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/user/:userId/enable');
$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}}/user/:userId/enable' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user/:userId/enable' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/user/:userId/enable", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user/:userId/enable"
payload = { "clientToken": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user/:userId/enable"
payload <- "{\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user/:userId/enable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/user/:userId/enable') do |req|
req.body = "{\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user/:userId/enable";
let payload = json!({"clientToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/user/:userId/enable \
--header 'content-type: application/json' \
--data '{
"clientToken": ""
}'
echo '{
"clientToken": ""
}' | \
http POST {{baseUrl}}/user/:userId/enable \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/user/:userId/enable
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clientToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user/:userId/enable")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
GetChangeset
{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId
QUERY PARAMS
datasetId
changesetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
require "http/client"
url = "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"
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}}/datasets/:datasetId/changesetsv2/:changesetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"
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/datasets/:datasetId/changesetsv2/:changesetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"))
.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}}/datasets/:datasetId/changesetsv2/:changesetId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
.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}}/datasets/:datasetId/changesetsv2/:changesetId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId';
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}}/datasets/:datasetId/changesetsv2/:changesetId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasets/:datasetId/changesetsv2/:changesetId',
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}}/datasets/:datasetId/changesetsv2/:changesetId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId');
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}}/datasets/:datasetId/changesetsv2/:changesetId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId';
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}}/datasets/:datasetId/changesetsv2/:changesetId"]
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}}/datasets/:datasetId/changesetsv2/:changesetId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId",
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}}/datasets/:datasetId/changesetsv2/:changesetId');
echo $response->getBody();
setUrl('{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/datasets/:datasetId/changesetsv2/:changesetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
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/datasets/:datasetId/changesetsv2/:changesetId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId";
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}}/datasets/:datasetId/changesetsv2/:changesetId
http GET {{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")! 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
GetDataView
{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId
QUERY PARAMS
dataviewId
datasetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId")
require "http/client"
url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId"
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}}/datasets/:datasetId/dataviewsv2/:dataviewId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId"
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/datasets/:datasetId/dataviewsv2/:dataviewId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId"))
.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}}/datasets/:datasetId/dataviewsv2/:dataviewId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId")
.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}}/datasets/:datasetId/dataviewsv2/:dataviewId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId';
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}}/datasets/:datasetId/dataviewsv2/:dataviewId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasets/:datasetId/dataviewsv2/:dataviewId',
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}}/datasets/:datasetId/dataviewsv2/:dataviewId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId');
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}}/datasets/:datasetId/dataviewsv2/:dataviewId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId';
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}}/datasets/:datasetId/dataviewsv2/:dataviewId"]
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}}/datasets/:datasetId/dataviewsv2/:dataviewId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId",
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}}/datasets/:datasetId/dataviewsv2/:dataviewId');
echo $response->getBody();
setUrl('{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/datasets/:datasetId/dataviewsv2/:dataviewId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId")
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/datasets/:datasetId/dataviewsv2/:dataviewId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId";
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}}/datasets/:datasetId/dataviewsv2/:dataviewId
http GET {{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId")! 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
GetDataset
{{baseUrl}}/datasetsv2/:datasetId
QUERY PARAMS
datasetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasetsv2/:datasetId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/datasetsv2/:datasetId")
require "http/client"
url = "{{baseUrl}}/datasetsv2/:datasetId"
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}}/datasetsv2/:datasetId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/datasetsv2/:datasetId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasetsv2/:datasetId"
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/datasetsv2/:datasetId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/datasetsv2/:datasetId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasetsv2/:datasetId"))
.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}}/datasetsv2/:datasetId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/datasetsv2/:datasetId")
.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}}/datasetsv2/:datasetId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/datasetsv2/:datasetId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasetsv2/:datasetId';
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}}/datasetsv2/:datasetId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/datasetsv2/:datasetId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasetsv2/:datasetId',
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}}/datasetsv2/:datasetId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/datasetsv2/:datasetId');
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}}/datasetsv2/:datasetId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasetsv2/:datasetId';
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}}/datasetsv2/:datasetId"]
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}}/datasetsv2/:datasetId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasetsv2/:datasetId",
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}}/datasetsv2/:datasetId');
echo $response->getBody();
setUrl('{{baseUrl}}/datasetsv2/:datasetId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/datasetsv2/:datasetId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasetsv2/:datasetId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasetsv2/:datasetId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/datasetsv2/:datasetId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasetsv2/:datasetId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasetsv2/:datasetId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasetsv2/:datasetId")
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/datasetsv2/:datasetId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasetsv2/:datasetId";
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}}/datasetsv2/:datasetId
http GET {{baseUrl}}/datasetsv2/:datasetId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/datasetsv2/:datasetId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasetsv2/:datasetId")! 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
GetExternalDataViewAccessDetails
{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details
QUERY PARAMS
dataviewId
datasetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details")
require "http/client"
url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details"
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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details"
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/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details"))
.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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details")
.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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details';
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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details',
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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details');
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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details';
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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details"]
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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details",
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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details');
echo $response->getBody();
setUrl('{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details")
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/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details";
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}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details
http POST {{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasets/:datasetId/dataviewsv2/:dataviewId/external-access-details")! 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
GetPermissionGroup
{{baseUrl}}/permission-group/:permissionGroupId
QUERY PARAMS
permissionGroupId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/permission-group/:permissionGroupId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/permission-group/:permissionGroupId")
require "http/client"
url = "{{baseUrl}}/permission-group/:permissionGroupId"
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}}/permission-group/:permissionGroupId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/permission-group/:permissionGroupId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/permission-group/:permissionGroupId"
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/permission-group/:permissionGroupId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/permission-group/:permissionGroupId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/permission-group/:permissionGroupId"))
.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}}/permission-group/:permissionGroupId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/permission-group/:permissionGroupId")
.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}}/permission-group/:permissionGroupId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/permission-group/:permissionGroupId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/permission-group/:permissionGroupId';
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}}/permission-group/:permissionGroupId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/permission-group/:permissionGroupId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/permission-group/:permissionGroupId',
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}}/permission-group/:permissionGroupId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/permission-group/:permissionGroupId');
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}}/permission-group/:permissionGroupId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/permission-group/:permissionGroupId';
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}}/permission-group/:permissionGroupId"]
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}}/permission-group/:permissionGroupId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/permission-group/:permissionGroupId",
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}}/permission-group/:permissionGroupId');
echo $response->getBody();
setUrl('{{baseUrl}}/permission-group/:permissionGroupId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/permission-group/:permissionGroupId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/permission-group/:permissionGroupId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/permission-group/:permissionGroupId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/permission-group/:permissionGroupId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/permission-group/:permissionGroupId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/permission-group/:permissionGroupId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/permission-group/:permissionGroupId")
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/permission-group/:permissionGroupId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/permission-group/:permissionGroupId";
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}}/permission-group/:permissionGroupId
http GET {{baseUrl}}/permission-group/:permissionGroupId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/permission-group/:permissionGroupId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/permission-group/:permissionGroupId")! 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
GetProgrammaticAccessCredentials
{{baseUrl}}/credentials/programmatic#environmentId
QUERY PARAMS
environmentId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credentials/programmatic?environmentId=#environmentId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/credentials/programmatic#environmentId" {:query-params {:environmentId ""}})
require "http/client"
url = "{{baseUrl}}/credentials/programmatic?environmentId=#environmentId"
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}}/credentials/programmatic?environmentId=#environmentId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credentials/programmatic?environmentId=#environmentId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credentials/programmatic?environmentId=#environmentId"
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/credentials/programmatic?environmentId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/credentials/programmatic?environmentId=#environmentId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credentials/programmatic?environmentId=#environmentId"))
.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}}/credentials/programmatic?environmentId=#environmentId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/credentials/programmatic?environmentId=#environmentId")
.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}}/credentials/programmatic?environmentId=#environmentId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/credentials/programmatic#environmentId',
params: {environmentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credentials/programmatic?environmentId=#environmentId';
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}}/credentials/programmatic?environmentId=#environmentId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/credentials/programmatic?environmentId=#environmentId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/credentials/programmatic?environmentId=',
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}}/credentials/programmatic#environmentId',
qs: {environmentId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/credentials/programmatic#environmentId');
req.query({
environmentId: ''
});
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}}/credentials/programmatic#environmentId',
params: {environmentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credentials/programmatic?environmentId=#environmentId';
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}}/credentials/programmatic?environmentId=#environmentId"]
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}}/credentials/programmatic?environmentId=#environmentId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credentials/programmatic?environmentId=#environmentId",
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}}/credentials/programmatic?environmentId=#environmentId');
echo $response->getBody();
setUrl('{{baseUrl}}/credentials/programmatic#environmentId');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'environmentId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/credentials/programmatic#environmentId');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'environmentId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credentials/programmatic?environmentId=#environmentId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credentials/programmatic?environmentId=#environmentId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/credentials/programmatic?environmentId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credentials/programmatic#environmentId"
querystring = {"environmentId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credentials/programmatic#environmentId"
queryString <- list(environmentId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credentials/programmatic?environmentId=#environmentId")
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/credentials/programmatic') do |req|
req.params['environmentId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credentials/programmatic#environmentId";
let querystring = [
("environmentId", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/credentials/programmatic?environmentId=#environmentId'
http GET '{{baseUrl}}/credentials/programmatic?environmentId=#environmentId'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/credentials/programmatic?environmentId=#environmentId'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credentials/programmatic?environmentId=#environmentId")! 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
GetUser
{{baseUrl}}/user/:userId
QUERY PARAMS
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user/:userId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/user/:userId")
require "http/client"
url = "{{baseUrl}}/user/:userId"
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}}/user/:userId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user/:userId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user/:userId"
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/user/:userId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/user/:userId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user/:userId"))
.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}}/user/:userId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/user/:userId")
.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}}/user/:userId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/user/:userId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user/:userId';
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}}/user/:userId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/user/:userId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/user/:userId',
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}}/user/:userId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/user/:userId');
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}}/user/:userId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user/:userId';
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}}/user/:userId"]
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}}/user/:userId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user/:userId",
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}}/user/:userId');
echo $response->getBody();
setUrl('{{baseUrl}}/user/:userId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/user/:userId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/user/:userId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user/:userId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/user/:userId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user/:userId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user/:userId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user/:userId")
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/user/:userId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user/:userId";
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}}/user/:userId
http GET {{baseUrl}}/user/:userId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/user/:userId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user/:userId")! 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
GetWorkingLocation
{{baseUrl}}/workingLocationV1
BODY json
{
"locationType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/workingLocationV1");
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 \"locationType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/workingLocationV1" {:content-type :json
:form-params {:locationType ""}})
require "http/client"
url = "{{baseUrl}}/workingLocationV1"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"locationType\": \"\"\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}}/workingLocationV1"),
Content = new StringContent("{\n \"locationType\": \"\"\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}}/workingLocationV1");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"locationType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/workingLocationV1"
payload := strings.NewReader("{\n \"locationType\": \"\"\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/workingLocationV1 HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 24
{
"locationType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/workingLocationV1")
.setHeader("content-type", "application/json")
.setBody("{\n \"locationType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/workingLocationV1"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"locationType\": \"\"\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 \"locationType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/workingLocationV1")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/workingLocationV1")
.header("content-type", "application/json")
.body("{\n \"locationType\": \"\"\n}")
.asString();
const data = JSON.stringify({
locationType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/workingLocationV1');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/workingLocationV1',
headers: {'content-type': 'application/json'},
data: {locationType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/workingLocationV1';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"locationType":""}'
};
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}}/workingLocationV1',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "locationType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"locationType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/workingLocationV1")
.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/workingLocationV1',
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({locationType: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/workingLocationV1',
headers: {'content-type': 'application/json'},
body: {locationType: ''},
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}}/workingLocationV1');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
locationType: ''
});
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}}/workingLocationV1',
headers: {'content-type': 'application/json'},
data: {locationType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/workingLocationV1';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"locationType":""}'
};
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 = @{ @"locationType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/workingLocationV1"]
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}}/workingLocationV1" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"locationType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/workingLocationV1",
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([
'locationType' => ''
]),
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}}/workingLocationV1', [
'body' => '{
"locationType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/workingLocationV1');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'locationType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'locationType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/workingLocationV1');
$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}}/workingLocationV1' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"locationType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/workingLocationV1' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"locationType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"locationType\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/workingLocationV1", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/workingLocationV1"
payload = { "locationType": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/workingLocationV1"
payload <- "{\n \"locationType\": \"\"\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}}/workingLocationV1")
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 \"locationType\": \"\"\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/workingLocationV1') do |req|
req.body = "{\n \"locationType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/workingLocationV1";
let payload = json!({"locationType": ""});
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}}/workingLocationV1 \
--header 'content-type: application/json' \
--data '{
"locationType": ""
}'
echo '{
"locationType": ""
}' | \
http POST {{baseUrl}}/workingLocationV1 \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "locationType": ""\n}' \
--output-document \
- {{baseUrl}}/workingLocationV1
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["locationType": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/workingLocationV1")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListChangesets
{{baseUrl}}/datasets/:datasetId/changesetsv2
QUERY PARAMS
datasetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasets/:datasetId/changesetsv2");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/datasets/:datasetId/changesetsv2")
require "http/client"
url = "{{baseUrl}}/datasets/:datasetId/changesetsv2"
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}}/datasets/:datasetId/changesetsv2"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/datasets/:datasetId/changesetsv2");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasets/:datasetId/changesetsv2"
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/datasets/:datasetId/changesetsv2 HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/datasets/:datasetId/changesetsv2")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasets/:datasetId/changesetsv2"))
.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}}/datasets/:datasetId/changesetsv2")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/datasets/:datasetId/changesetsv2")
.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}}/datasets/:datasetId/changesetsv2');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/datasets/:datasetId/changesetsv2'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasets/:datasetId/changesetsv2';
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}}/datasets/:datasetId/changesetsv2',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/changesetsv2")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasets/:datasetId/changesetsv2',
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}}/datasets/:datasetId/changesetsv2'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/datasets/:datasetId/changesetsv2');
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}}/datasets/:datasetId/changesetsv2'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasets/:datasetId/changesetsv2';
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}}/datasets/:datasetId/changesetsv2"]
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}}/datasets/:datasetId/changesetsv2" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasets/:datasetId/changesetsv2",
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}}/datasets/:datasetId/changesetsv2');
echo $response->getBody();
setUrl('{{baseUrl}}/datasets/:datasetId/changesetsv2');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/datasets/:datasetId/changesetsv2');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasets/:datasetId/changesetsv2' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasets/:datasetId/changesetsv2' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/datasets/:datasetId/changesetsv2")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasets/:datasetId/changesetsv2"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasets/:datasetId/changesetsv2"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasets/:datasetId/changesetsv2")
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/datasets/:datasetId/changesetsv2') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasets/:datasetId/changesetsv2";
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}}/datasets/:datasetId/changesetsv2
http GET {{baseUrl}}/datasets/:datasetId/changesetsv2
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/datasets/:datasetId/changesetsv2
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasets/:datasetId/changesetsv2")! 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
ListDataViews
{{baseUrl}}/datasets/:datasetId/dataviewsv2
QUERY PARAMS
datasetId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasets/:datasetId/dataviewsv2");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/datasets/:datasetId/dataviewsv2")
require "http/client"
url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2"
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}}/datasets/:datasetId/dataviewsv2"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/datasets/:datasetId/dataviewsv2");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasets/:datasetId/dataviewsv2"
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/datasets/:datasetId/dataviewsv2 HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/datasets/:datasetId/dataviewsv2")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasets/:datasetId/dataviewsv2"))
.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}}/datasets/:datasetId/dataviewsv2")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/datasets/:datasetId/dataviewsv2")
.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}}/datasets/:datasetId/dataviewsv2');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/datasets/:datasetId/dataviewsv2'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasets/:datasetId/dataviewsv2';
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}}/datasets/:datasetId/dataviewsv2',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/dataviewsv2")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasets/:datasetId/dataviewsv2',
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}}/datasets/:datasetId/dataviewsv2'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/datasets/:datasetId/dataviewsv2');
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}}/datasets/:datasetId/dataviewsv2'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasets/:datasetId/dataviewsv2';
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}}/datasets/:datasetId/dataviewsv2"]
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}}/datasets/:datasetId/dataviewsv2" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasets/:datasetId/dataviewsv2",
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}}/datasets/:datasetId/dataviewsv2');
echo $response->getBody();
setUrl('{{baseUrl}}/datasets/:datasetId/dataviewsv2');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/datasets/:datasetId/dataviewsv2');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasets/:datasetId/dataviewsv2' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasets/:datasetId/dataviewsv2' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/datasets/:datasetId/dataviewsv2")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasets/:datasetId/dataviewsv2"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasets/:datasetId/dataviewsv2")
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/datasets/:datasetId/dataviewsv2') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasets/:datasetId/dataviewsv2";
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}}/datasets/:datasetId/dataviewsv2
http GET {{baseUrl}}/datasets/:datasetId/dataviewsv2
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/datasets/:datasetId/dataviewsv2
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasets/:datasetId/dataviewsv2")! 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}}/datasetsv2
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasetsv2");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/datasetsv2")
require "http/client"
url = "{{baseUrl}}/datasetsv2"
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}}/datasetsv2"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/datasetsv2");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasetsv2"
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/datasetsv2 HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/datasetsv2")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasetsv2"))
.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}}/datasetsv2")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/datasetsv2")
.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}}/datasetsv2');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/datasetsv2'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasetsv2';
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}}/datasetsv2',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/datasetsv2")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasetsv2',
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}}/datasetsv2'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/datasetsv2');
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}}/datasetsv2'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasetsv2';
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}}/datasetsv2"]
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}}/datasetsv2" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasetsv2",
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}}/datasetsv2');
echo $response->getBody();
setUrl('{{baseUrl}}/datasetsv2');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/datasetsv2');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasetsv2' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasetsv2' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/datasetsv2")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasetsv2"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasetsv2"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasetsv2")
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/datasetsv2') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasetsv2";
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}}/datasetsv2
http GET {{baseUrl}}/datasetsv2
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/datasetsv2
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasetsv2")! 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
ListPermissionGroups
{{baseUrl}}/permission-group#maxResults
QUERY PARAMS
maxResults
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/permission-group?maxResults=#maxResults");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/permission-group#maxResults" {:query-params {:maxResults ""}})
require "http/client"
url = "{{baseUrl}}/permission-group?maxResults=#maxResults"
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}}/permission-group?maxResults=#maxResults"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/permission-group?maxResults=#maxResults");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/permission-group?maxResults=#maxResults"
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/permission-group?maxResults= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/permission-group?maxResults=#maxResults")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/permission-group?maxResults=#maxResults"))
.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}}/permission-group?maxResults=#maxResults")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/permission-group?maxResults=#maxResults")
.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}}/permission-group?maxResults=#maxResults');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/permission-group#maxResults',
params: {maxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/permission-group?maxResults=#maxResults';
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}}/permission-group?maxResults=#maxResults',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/permission-group?maxResults=#maxResults")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/permission-group?maxResults=',
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}}/permission-group#maxResults',
qs: {maxResults: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/permission-group#maxResults');
req.query({
maxResults: ''
});
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}}/permission-group#maxResults',
params: {maxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/permission-group?maxResults=#maxResults';
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}}/permission-group?maxResults=#maxResults"]
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}}/permission-group?maxResults=#maxResults" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/permission-group?maxResults=#maxResults",
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}}/permission-group?maxResults=#maxResults');
echo $response->getBody();
setUrl('{{baseUrl}}/permission-group#maxResults');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'maxResults' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/permission-group#maxResults');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'maxResults' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/permission-group?maxResults=#maxResults' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/permission-group?maxResults=#maxResults' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/permission-group?maxResults=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/permission-group#maxResults"
querystring = {"maxResults":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/permission-group#maxResults"
queryString <- list(maxResults = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/permission-group?maxResults=#maxResults")
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/permission-group') do |req|
req.params['maxResults'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/permission-group#maxResults";
let querystring = [
("maxResults", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/permission-group?maxResults=#maxResults'
http GET '{{baseUrl}}/permission-group?maxResults=#maxResults'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/permission-group?maxResults=#maxResults'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/permission-group?maxResults=#maxResults")! 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
ListPermissionGroupsByUser
{{baseUrl}}/user/:userId/permission-groups#maxResults
QUERY PARAMS
maxResults
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/user/:userId/permission-groups#maxResults" {:query-params {:maxResults ""}})
require "http/client"
url = "{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults"
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}}/user/:userId/permission-groups?maxResults=#maxResults"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults"
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/user/:userId/permission-groups?maxResults= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults"))
.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}}/user/:userId/permission-groups?maxResults=#maxResults")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults")
.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}}/user/:userId/permission-groups?maxResults=#maxResults');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/user/:userId/permission-groups#maxResults',
params: {maxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults';
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}}/user/:userId/permission-groups?maxResults=#maxResults',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/user/:userId/permission-groups?maxResults=',
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}}/user/:userId/permission-groups#maxResults',
qs: {maxResults: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/user/:userId/permission-groups#maxResults');
req.query({
maxResults: ''
});
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}}/user/:userId/permission-groups#maxResults',
params: {maxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults';
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}}/user/:userId/permission-groups?maxResults=#maxResults"]
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}}/user/:userId/permission-groups?maxResults=#maxResults" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults",
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}}/user/:userId/permission-groups?maxResults=#maxResults');
echo $response->getBody();
setUrl('{{baseUrl}}/user/:userId/permission-groups#maxResults');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'maxResults' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/user/:userId/permission-groups#maxResults');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'maxResults' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/user/:userId/permission-groups?maxResults=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user/:userId/permission-groups#maxResults"
querystring = {"maxResults":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user/:userId/permission-groups#maxResults"
queryString <- list(maxResults = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults")
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/user/:userId/permission-groups') do |req|
req.params['maxResults'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user/:userId/permission-groups#maxResults";
let querystring = [
("maxResults", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults'
http GET '{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user/:userId/permission-groups?maxResults=#maxResults")! 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
ListUsers
{{baseUrl}}/user#maxResults
QUERY PARAMS
maxResults
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user?maxResults=#maxResults");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/user#maxResults" {:query-params {:maxResults ""}})
require "http/client"
url = "{{baseUrl}}/user?maxResults=#maxResults"
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}}/user?maxResults=#maxResults"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user?maxResults=#maxResults");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user?maxResults=#maxResults"
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/user?maxResults= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/user?maxResults=#maxResults")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user?maxResults=#maxResults"))
.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}}/user?maxResults=#maxResults")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/user?maxResults=#maxResults")
.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}}/user?maxResults=#maxResults');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/user#maxResults',
params: {maxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user?maxResults=#maxResults';
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}}/user?maxResults=#maxResults',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/user?maxResults=#maxResults")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/user?maxResults=',
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}}/user#maxResults',
qs: {maxResults: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/user#maxResults');
req.query({
maxResults: ''
});
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}}/user#maxResults',
params: {maxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user?maxResults=#maxResults';
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}}/user?maxResults=#maxResults"]
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}}/user?maxResults=#maxResults" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user?maxResults=#maxResults",
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}}/user?maxResults=#maxResults');
echo $response->getBody();
setUrl('{{baseUrl}}/user#maxResults');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'maxResults' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/user#maxResults');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'maxResults' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/user?maxResults=#maxResults' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user?maxResults=#maxResults' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/user?maxResults=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user#maxResults"
querystring = {"maxResults":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user#maxResults"
queryString <- list(maxResults = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user?maxResults=#maxResults")
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/user') do |req|
req.params['maxResults'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user#maxResults";
let querystring = [
("maxResults", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/user?maxResults=#maxResults'
http GET '{{baseUrl}}/user?maxResults=#maxResults'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/user?maxResults=#maxResults'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user?maxResults=#maxResults")! 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
ListUsersByPermissionGroup
{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults
QUERY PARAMS
maxResults
permissionGroupId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults" {:query-params {:maxResults ""}})
require "http/client"
url = "{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults"
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}}/permission-group/:permissionGroupId/users?maxResults=#maxResults"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults"
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/permission-group/:permissionGroupId/users?maxResults= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults"))
.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}}/permission-group/:permissionGroupId/users?maxResults=#maxResults")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults")
.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}}/permission-group/:permissionGroupId/users?maxResults=#maxResults');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults',
params: {maxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults';
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}}/permission-group/:permissionGroupId/users?maxResults=#maxResults',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/permission-group/:permissionGroupId/users?maxResults=',
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}}/permission-group/:permissionGroupId/users#maxResults',
qs: {maxResults: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults');
req.query({
maxResults: ''
});
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}}/permission-group/:permissionGroupId/users#maxResults',
params: {maxResults: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults';
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}}/permission-group/:permissionGroupId/users?maxResults=#maxResults"]
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}}/permission-group/:permissionGroupId/users?maxResults=#maxResults" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults",
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}}/permission-group/:permissionGroupId/users?maxResults=#maxResults');
echo $response->getBody();
setUrl('{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'maxResults' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'maxResults' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/permission-group/:permissionGroupId/users?maxResults=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults"
querystring = {"maxResults":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults"
queryString <- list(maxResults = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults")
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/permission-group/:permissionGroupId/users') do |req|
req.params['maxResults'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/permission-group/:permissionGroupId/users#maxResults";
let querystring = [
("maxResults", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults'
http GET '{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/permission-group/:permissionGroupId/users?maxResults=#maxResults")! 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
ResetUserPassword
{{baseUrl}}/user/:userId/password
QUERY PARAMS
userId
BODY json
{
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user/:userId/password");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/user/:userId/password" {:content-type :json
:form-params {:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/user/:userId/password"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/user/:userId/password"),
Content = new StringContent("{\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user/:userId/password");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user/:userId/password"
payload := strings.NewReader("{\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/user/:userId/password HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/user/:userId/password")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user/:userId/password"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/user/:userId/password")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/user/:userId/password")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/user/:userId/password');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/password',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user/:userId/password';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/user/:userId/password',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/user/:userId/password")
.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/user/:userId/password',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/password',
headers: {'content-type': 'application/json'},
body: {clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/user/:userId/password');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/user/:userId/password',
headers: {'content-type': 'application/json'},
data: {clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user/:userId/password';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/user/:userId/password"]
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}}/user/:userId/password" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user/:userId/password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/user/:userId/password', [
'body' => '{
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/user/:userId/password');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/user/:userId/password');
$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}}/user/:userId/password' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user/:userId/password' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/user/:userId/password", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user/:userId/password"
payload = { "clientToken": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user/:userId/password"
payload <- "{\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user/:userId/password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/user/:userId/password') do |req|
req.body = "{\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user/:userId/password";
let payload = json!({"clientToken": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/user/:userId/password \
--header 'content-type: application/json' \
--data '{
"clientToken": ""
}'
echo '{
"clientToken": ""
}' | \
http POST {{baseUrl}}/user/:userId/password \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/user/:userId/password
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clientToken": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user/:userId/password")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateChangeset
{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId
QUERY PARAMS
datasetId
changesetId
BODY json
{
"clientToken": "",
"sourceParams": {},
"formatParams": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId" {:content-type :json
:form-params {:clientToken ""
:sourceParams {}
:formatParams {}}})
require "http/client"
url = "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"),
Content = new StringContent("{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\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}}/datasets/:datasetId/changesetsv2/:changesetId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"
payload := strings.NewReader("{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/datasets/:datasetId/changesetsv2/:changesetId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67
{
"clientToken": "",
"sourceParams": {},
"formatParams": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}")
.asString();
const data = JSON.stringify({
clientToken: '',
sourceParams: {},
formatParams: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId',
headers: {'content-type': 'application/json'},
data: {clientToken: '', sourceParams: {}, formatParams: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","sourceParams":{},"formatParams":{}}'
};
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}}/datasets/:datasetId/changesetsv2/:changesetId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": "",\n "sourceParams": {},\n "formatParams": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasets/:datasetId/changesetsv2/:changesetId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clientToken: '', sourceParams: {}, formatParams: {}}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId',
headers: {'content-type': 'application/json'},
body: {clientToken: '', sourceParams: {}, formatParams: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: '',
sourceParams: {},
formatParams: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId',
headers: {'content-type': 'application/json'},
data: {clientToken: '', sourceParams: {}, formatParams: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","sourceParams":{},"formatParams":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"",
@"sourceParams": @{ },
@"formatParams": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => '',
'sourceParams' => [
],
'formatParams' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId', [
'body' => '{
"clientToken": "",
"sourceParams": {},
"formatParams": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => '',
'sourceParams' => [
],
'formatParams' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => '',
'sourceParams' => [
],
'formatParams' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"sourceParams": {},
"formatParams": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"sourceParams": {},
"formatParams": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/datasets/:datasetId/changesetsv2/:changesetId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"
payload = {
"clientToken": "",
"sourceParams": {},
"formatParams": {}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId"
payload <- "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/datasets/:datasetId/changesetsv2/:changesetId') do |req|
req.body = "{\n \"clientToken\": \"\",\n \"sourceParams\": {},\n \"formatParams\": {}\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId";
let payload = json!({
"clientToken": "",
"sourceParams": json!({}),
"formatParams": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId \
--header 'content-type: application/json' \
--data '{
"clientToken": "",
"sourceParams": {},
"formatParams": {}
}'
echo '{
"clientToken": "",
"sourceParams": {},
"formatParams": {}
}' | \
http PUT {{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": "",\n "sourceParams": {},\n "formatParams": {}\n}' \
--output-document \
- {{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientToken": "",
"sourceParams": [],
"formatParams": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasets/:datasetId/changesetsv2/:changesetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateDataset
{{baseUrl}}/datasetsv2/:datasetId
QUERY PARAMS
datasetId
BODY json
{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/datasetsv2/:datasetId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/datasetsv2/:datasetId" {:content-type :json
:form-params {:clientToken ""
:datasetTitle ""
:kind ""
:datasetDescription ""
:alias ""
:schemaDefinition {:tabularSchemaConfig ""}}})
require "http/client"
url = "{{baseUrl}}/datasetsv2/:datasetId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/datasetsv2/:datasetId"),
Content = new StringContent("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\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}}/datasetsv2/:datasetId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/datasetsv2/:datasetId"
payload := strings.NewReader("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/datasetsv2/:datasetId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 161
{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/datasetsv2/:datasetId")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/datasetsv2/:datasetId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\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 \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/datasetsv2/:datasetId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/datasetsv2/:datasetId")
.header("content-type", "application/json")
.body("{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
alias: '',
schemaDefinition: {
tabularSchemaConfig: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/datasetsv2/:datasetId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/datasetsv2/:datasetId',
headers: {'content-type': 'application/json'},
data: {
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
alias: '',
schemaDefinition: {tabularSchemaConfig: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/datasetsv2/:datasetId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","datasetTitle":"","kind":"","datasetDescription":"","alias":"","schemaDefinition":{"tabularSchemaConfig":""}}'
};
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}}/datasetsv2/:datasetId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientToken": "",\n "datasetTitle": "",\n "kind": "",\n "datasetDescription": "",\n "alias": "",\n "schemaDefinition": {\n "tabularSchemaConfig": ""\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 \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/datasetsv2/:datasetId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/datasetsv2/:datasetId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
alias: '',
schemaDefinition: {tabularSchemaConfig: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/datasetsv2/:datasetId',
headers: {'content-type': 'application/json'},
body: {
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
alias: '',
schemaDefinition: {tabularSchemaConfig: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/datasetsv2/:datasetId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
alias: '',
schemaDefinition: {
tabularSchemaConfig: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/datasetsv2/:datasetId',
headers: {'content-type': 'application/json'},
data: {
clientToken: '',
datasetTitle: '',
kind: '',
datasetDescription: '',
alias: '',
schemaDefinition: {tabularSchemaConfig: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/datasetsv2/:datasetId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"clientToken":"","datasetTitle":"","kind":"","datasetDescription":"","alias":"","schemaDefinition":{"tabularSchemaConfig":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientToken": @"",
@"datasetTitle": @"",
@"kind": @"",
@"datasetDescription": @"",
@"alias": @"",
@"schemaDefinition": @{ @"tabularSchemaConfig": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/datasetsv2/:datasetId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/datasetsv2/:datasetId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/datasetsv2/:datasetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clientToken' => '',
'datasetTitle' => '',
'kind' => '',
'datasetDescription' => '',
'alias' => '',
'schemaDefinition' => [
'tabularSchemaConfig' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/datasetsv2/:datasetId', [
'body' => '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/datasetsv2/:datasetId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientToken' => '',
'datasetTitle' => '',
'kind' => '',
'datasetDescription' => '',
'alias' => '',
'schemaDefinition' => [
'tabularSchemaConfig' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientToken' => '',
'datasetTitle' => '',
'kind' => '',
'datasetDescription' => '',
'alias' => '',
'schemaDefinition' => [
'tabularSchemaConfig' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/datasetsv2/:datasetId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/datasetsv2/:datasetId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/datasetsv2/:datasetId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/datasetsv2/:datasetId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/datasetsv2/:datasetId"
payload = {
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": { "tabularSchemaConfig": "" }
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/datasetsv2/:datasetId"
payload <- "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/datasetsv2/:datasetId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/datasetsv2/:datasetId') do |req|
req.body = "{\n \"clientToken\": \"\",\n \"datasetTitle\": \"\",\n \"kind\": \"\",\n \"datasetDescription\": \"\",\n \"alias\": \"\",\n \"schemaDefinition\": {\n \"tabularSchemaConfig\": \"\"\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/datasetsv2/:datasetId";
let payload = json!({
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": json!({"tabularSchemaConfig": ""})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/datasetsv2/:datasetId \
--header 'content-type: application/json' \
--data '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}'
echo '{
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": {
"tabularSchemaConfig": ""
}
}' | \
http PUT {{baseUrl}}/datasetsv2/:datasetId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "clientToken": "",\n "datasetTitle": "",\n "kind": "",\n "datasetDescription": "",\n "alias": "",\n "schemaDefinition": {\n "tabularSchemaConfig": ""\n }\n}' \
--output-document \
- {{baseUrl}}/datasetsv2/:datasetId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientToken": "",
"datasetTitle": "",
"kind": "",
"datasetDescription": "",
"alias": "",
"schemaDefinition": ["tabularSchemaConfig": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/datasetsv2/:datasetId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdatePermissionGroup
{{baseUrl}}/permission-group/:permissionGroupId
QUERY PARAMS
permissionGroupId
BODY json
{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/permission-group/:permissionGroupId");
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 \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/permission-group/:permissionGroupId" {:content-type :json
:form-params {:name ""
:description ""
:applicationPermissions []
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/permission-group/:permissionGroupId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/permission-group/:permissionGroupId"),
Content = new StringContent("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/permission-group/:permissionGroupId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/permission-group/:permissionGroupId"
payload := strings.NewReader("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/permission-group/:permissionGroupId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 90
{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/permission-group/:permissionGroupId")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/permission-group/:permissionGroupId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/permission-group/:permissionGroupId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/permission-group/:permissionGroupId")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
description: '',
applicationPermissions: [],
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/permission-group/:permissionGroupId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/permission-group/:permissionGroupId',
headers: {'content-type': 'application/json'},
data: {name: '', description: '', applicationPermissions: [], clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/permission-group/:permissionGroupId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","applicationPermissions":[],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/permission-group/:permissionGroupId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "description": "",\n "applicationPermissions": [],\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/permission-group/:permissionGroupId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/permission-group/:permissionGroupId',
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({name: '', description: '', applicationPermissions: [], clientToken: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/permission-group/:permissionGroupId',
headers: {'content-type': 'application/json'},
body: {name: '', description: '', applicationPermissions: [], clientToken: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/permission-group/:permissionGroupId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
description: '',
applicationPermissions: [],
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/permission-group/:permissionGroupId',
headers: {'content-type': 'application/json'},
data: {name: '', description: '', applicationPermissions: [], clientToken: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/permission-group/:permissionGroupId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","applicationPermissions":[],"clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"description": @"",
@"applicationPermissions": @[ ],
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/permission-group/:permissionGroupId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/permission-group/:permissionGroupId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/permission-group/:permissionGroupId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'description' => '',
'applicationPermissions' => [
],
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/permission-group/:permissionGroupId', [
'body' => '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/permission-group/:permissionGroupId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'description' => '',
'applicationPermissions' => [
],
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'description' => '',
'applicationPermissions' => [
],
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/permission-group/:permissionGroupId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/permission-group/:permissionGroupId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/permission-group/:permissionGroupId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/permission-group/:permissionGroupId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/permission-group/:permissionGroupId"
payload = {
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/permission-group/:permissionGroupId"
payload <- "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/permission-group/:permissionGroupId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/permission-group/:permissionGroupId') do |req|
req.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"applicationPermissions\": [],\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/permission-group/:permissionGroupId";
let payload = json!({
"name": "",
"description": "",
"applicationPermissions": (),
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/permission-group/:permissionGroupId \
--header 'content-type: application/json' \
--data '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}'
echo '{
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
}' | \
http PUT {{baseUrl}}/permission-group/:permissionGroupId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "description": "",\n "applicationPermissions": [],\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/permission-group/:permissionGroupId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"description": "",
"applicationPermissions": [],
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/permission-group/:permissionGroupId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
UpdateUser
{{baseUrl}}/user/:userId
QUERY PARAMS
userId
BODY json
{
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user/:userId");
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 \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/user/:userId" {:content-type :json
:form-params {:type ""
:firstName ""
:lastName ""
:apiAccess ""
:apiAccessPrincipalArn ""
:clientToken ""}})
require "http/client"
url = "{{baseUrl}}/user/:userId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/user/:userId"),
Content = new StringContent("{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user/:userId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user/:userId"
payload := strings.NewReader("{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/user/:userId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 124
{
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/user/:userId")
.setHeader("content-type", "application/json")
.setBody("{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user/:userId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/user/:userId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/user/:userId")
.header("content-type", "application/json")
.body("{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
.asString();
const data = JSON.stringify({
type: '',
firstName: '',
lastName: '',
apiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/user/:userId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/user/:userId',
headers: {'content-type': 'application/json'},
data: {
type: '',
firstName: '',
lastName: '',
apiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user/:userId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"type":"","firstName":"","lastName":"","apiAccess":"","apiAccessPrincipalArn":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/user/:userId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "type": "",\n "firstName": "",\n "lastName": "",\n "apiAccess": "",\n "apiAccessPrincipalArn": "",\n "clientToken": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/user/:userId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/user/:userId',
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({
type: '',
firstName: '',
lastName: '',
apiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/user/:userId',
headers: {'content-type': 'application/json'},
body: {
type: '',
firstName: '',
lastName: '',
apiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/user/:userId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
type: '',
firstName: '',
lastName: '',
apiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/user/:userId',
headers: {'content-type': 'application/json'},
data: {
type: '',
firstName: '',
lastName: '',
apiAccess: '',
apiAccessPrincipalArn: '',
clientToken: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user/:userId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"type":"","firstName":"","lastName":"","apiAccess":"","apiAccessPrincipalArn":"","clientToken":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"type": @"",
@"firstName": @"",
@"lastName": @"",
@"apiAccess": @"",
@"apiAccessPrincipalArn": @"",
@"clientToken": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/user/:userId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/user/:userId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user/:userId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'type' => '',
'firstName' => '',
'lastName' => '',
'apiAccess' => '',
'apiAccessPrincipalArn' => '',
'clientToken' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/user/:userId', [
'body' => '{
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/user/:userId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'type' => '',
'firstName' => '',
'lastName' => '',
'apiAccess' => '',
'apiAccessPrincipalArn' => '',
'clientToken' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'type' => '',
'firstName' => '',
'lastName' => '',
'apiAccess' => '',
'apiAccessPrincipalArn' => '',
'clientToken' => ''
]));
$request->setRequestUrl('{{baseUrl}}/user/:userId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/user/:userId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user/:userId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/user/:userId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user/:userId"
payload = {
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user/:userId"
payload <- "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user/:userId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/user/:userId') do |req|
req.body = "{\n \"type\": \"\",\n \"firstName\": \"\",\n \"lastName\": \"\",\n \"apiAccess\": \"\",\n \"apiAccessPrincipalArn\": \"\",\n \"clientToken\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user/:userId";
let payload = json!({
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/user/:userId \
--header 'content-type: application/json' \
--data '{
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}'
echo '{
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
}' | \
http PUT {{baseUrl}}/user/:userId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "type": "",\n "firstName": "",\n "lastName": "",\n "apiAccess": "",\n "apiAccessPrincipalArn": "",\n "clientToken": ""\n}' \
--output-document \
- {{baseUrl}}/user/:userId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"type": "",
"firstName": "",
"lastName": "",
"apiAccess": "",
"apiAccessPrincipalArn": "",
"clientToken": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user/:userId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()