AuthGuard API
PATCH
activateAnAccount
{{baseUrl}}/domains/:domain/accounts/:id/activate
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id/activate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/accounts/:id/activate")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id/activate"
response = HTTP::Client.patch url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id/activate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/:id/activate");
var request = new RestRequest("", Method.Patch);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id/activate"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/accounts/:id/activate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/accounts/:id/activate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id/activate"))
.method("PATCH", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/activate")
.patch(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/accounts/:id/activate")
.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('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/activate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id/activate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id/activate',
method: 'PATCH',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/activate")
.patch(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id/activate',
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: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/activate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/activate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id/activate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id/activate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id/activate" in
Client.call `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/activate');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id/activate');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id/activate');
$request->setRequestMethod('PATCH');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id/activate' -Method PATCH
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id/activate' -Method PATCH
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PATCH", "/baseUrl/domains/:domain/accounts/:id/activate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id/activate"
response = requests.patch(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id/activate"
response <- VERB("PATCH", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.patch('/baseUrl/domains/:domain/accounts/:id/activate') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/:id/activate";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/accounts/:id/activate
http PATCH {{baseUrl}}/domains/:domain/accounts/:id/activate
wget --quiet \
--method PATCH \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id/activate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id/activate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
createAccount
{{baseUrl}}/domains/:domain/accounts
HEADERS
X-IdempotentKey
QUERY PARAMS
domain
BODY json
{
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
],
"plainPassword": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
},
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false,
"metadata": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-idempotentkey: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/accounts" {:headers {:x-idempotentkey ""}
:content-type :json
:form-params {:externalId ""
:domain ""
:firstName ""
:middleName ""
:lastName ""
:fullName ""
:identifiers [{:type ""
:identifier ""
:active false}]
:plainPassword ""
:email {:email ""
:verified false}
:backupEmail {}
:phoneNumber {:number ""
:verified false}
:permissions [{:id ""
:group ""
:name ""
:domain ""
:forAccounts false
:forApplications false}]
:roles []
:active false
:metadata {}}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts"
headers = HTTP::Headers{
"x-idempotentkey" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\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}}/domains/:domain/accounts"),
Headers =
{
{ "x-idempotentkey", "" },
},
Content = new StringContent("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\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}}/domains/:domain/accounts");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-idempotentkey", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts"
payload := strings.NewReader("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-idempotentkey", "")
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/domains/:domain/accounts HTTP/1.1
X-Idempotentkey:
Content-Type: application/json
Host: example.com
Content-Length: 598
{
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
],
"plainPassword": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
},
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false,
"metadata": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/accounts")
.setHeader("x-idempotentkey", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts"))
.header("x-idempotentkey", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\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 \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts")
.post(body)
.addHeader("x-idempotentkey", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/accounts")
.header("x-idempotentkey", "")
.header("content-type", "application/json")
.body("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}")
.asString();
const data = JSON.stringify({
externalId: '',
domain: '',
firstName: '',
middleName: '',
lastName: '',
fullName: '',
identifiers: [
{
type: '',
identifier: '',
active: false
}
],
plainPassword: '',
email: {
email: '',
verified: false
},
backupEmail: {},
phoneNumber: {
number: '',
verified: false
},
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false,
metadata: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/accounts');
xhr.setRequestHeader('x-idempotentkey', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/accounts',
headers: {'x-idempotentkey': '', 'content-type': 'application/json'},
data: {
externalId: '',
domain: '',
firstName: '',
middleName: '',
lastName: '',
fullName: '',
identifiers: [{type: '', identifier: '', active: false}],
plainPassword: '',
email: {email: '', verified: false},
backupEmail: {},
phoneNumber: {number: '', verified: false},
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false,
metadata: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts';
const options = {
method: 'POST',
headers: {'x-idempotentkey': '', 'content-type': 'application/json'},
body: '{"externalId":"","domain":"","firstName":"","middleName":"","lastName":"","fullName":"","identifiers":[{"type":"","identifier":"","active":false}],"plainPassword":"","email":{"email":"","verified":false},"backupEmail":{},"phoneNumber":{"number":"","verified":false},"permissions":[{"id":"","group":"","name":"","domain":"","forAccounts":false,"forApplications":false}],"roles":[],"active":false,"metadata":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts',
method: 'POST',
headers: {
'x-idempotentkey': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "externalId": "",\n "domain": "",\n "firstName": "",\n "middleName": "",\n "lastName": "",\n "fullName": "",\n "identifiers": [\n {\n "type": "",\n "identifier": "",\n "active": false\n }\n ],\n "plainPassword": "",\n "email": {\n "email": "",\n "verified": false\n },\n "backupEmail": {},\n "phoneNumber": {\n "number": "",\n "verified": false\n },\n "permissions": [\n {\n "id": "",\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n }\n ],\n "roles": [],\n "active": false,\n "metadata": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts")
.post(body)
.addHeader("x-idempotentkey", "")
.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/domains/:domain/accounts',
headers: {
'x-idempotentkey': '',
'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({
externalId: '',
domain: '',
firstName: '',
middleName: '',
lastName: '',
fullName: '',
identifiers: [{type: '', identifier: '', active: false}],
plainPassword: '',
email: {email: '', verified: false},
backupEmail: {},
phoneNumber: {number: '', verified: false},
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false,
metadata: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/accounts',
headers: {'x-idempotentkey': '', 'content-type': 'application/json'},
body: {
externalId: '',
domain: '',
firstName: '',
middleName: '',
lastName: '',
fullName: '',
identifiers: [{type: '', identifier: '', active: false}],
plainPassword: '',
email: {email: '', verified: false},
backupEmail: {},
phoneNumber: {number: '', verified: false},
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false,
metadata: {}
},
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}}/domains/:domain/accounts');
req.headers({
'x-idempotentkey': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
externalId: '',
domain: '',
firstName: '',
middleName: '',
lastName: '',
fullName: '',
identifiers: [
{
type: '',
identifier: '',
active: false
}
],
plainPassword: '',
email: {
email: '',
verified: false
},
backupEmail: {},
phoneNumber: {
number: '',
verified: false
},
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false,
metadata: {}
});
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}}/domains/:domain/accounts',
headers: {'x-idempotentkey': '', 'content-type': 'application/json'},
data: {
externalId: '',
domain: '',
firstName: '',
middleName: '',
lastName: '',
fullName: '',
identifiers: [{type: '', identifier: '', active: false}],
plainPassword: '',
email: {email: '', verified: false},
backupEmail: {},
phoneNumber: {number: '', verified: false},
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false,
metadata: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts';
const options = {
method: 'POST',
headers: {'x-idempotentkey': '', 'content-type': 'application/json'},
body: '{"externalId":"","domain":"","firstName":"","middleName":"","lastName":"","fullName":"","identifiers":[{"type":"","identifier":"","active":false}],"plainPassword":"","email":{"email":"","verified":false},"backupEmail":{},"phoneNumber":{"number":"","verified":false},"permissions":[{"id":"","group":"","name":"","domain":"","forAccounts":false,"forApplications":false}],"roles":[],"active":false,"metadata":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-idempotentkey": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"externalId": @"",
@"domain": @"",
@"firstName": @"",
@"middleName": @"",
@"lastName": @"",
@"fullName": @"",
@"identifiers": @[ @{ @"type": @"", @"identifier": @"", @"active": @NO } ],
@"plainPassword": @"",
@"email": @{ @"email": @"", @"verified": @NO },
@"backupEmail": @{ },
@"phoneNumber": @{ @"number": @"", @"verified": @NO },
@"permissions": @[ @{ @"id": @"", @"group": @"", @"name": @"", @"domain": @"", @"forAccounts": @NO, @"forApplications": @NO } ],
@"roles": @[ ],
@"active": @NO,
@"metadata": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts"]
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}}/domains/:domain/accounts" in
let headers = Header.add_list (Header.init ()) [
("x-idempotentkey", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts",
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([
'externalId' => '',
'domain' => '',
'firstName' => '',
'middleName' => '',
'lastName' => '',
'fullName' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
],
'plainPassword' => '',
'email' => [
'email' => '',
'verified' => null
],
'backupEmail' => [
],
'phoneNumber' => [
'number' => '',
'verified' => null
],
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
],
'roles' => [
],
'active' => null,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-idempotentkey: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/domains/:domain/accounts', [
'body' => '{
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
],
"plainPassword": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
},
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false,
"metadata": {}
}',
'headers' => [
'content-type' => 'application/json',
'x-idempotentkey' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-idempotentkey' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'externalId' => '',
'domain' => '',
'firstName' => '',
'middleName' => '',
'lastName' => '',
'fullName' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
],
'plainPassword' => '',
'email' => [
'email' => '',
'verified' => null
],
'backupEmail' => [
],
'phoneNumber' => [
'number' => '',
'verified' => null
],
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
],
'roles' => [
],
'active' => null,
'metadata' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'externalId' => '',
'domain' => '',
'firstName' => '',
'middleName' => '',
'lastName' => '',
'fullName' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
],
'plainPassword' => '',
'email' => [
'email' => '',
'verified' => null
],
'backupEmail' => [
],
'phoneNumber' => [
'number' => '',
'verified' => null
],
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
],
'roles' => [
],
'active' => null,
'metadata' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/accounts');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-idempotentkey' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-idempotentkey", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
],
"plainPassword": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
},
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false,
"metadata": {}
}'
$headers=@{}
$headers.Add("x-idempotentkey", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
],
"plainPassword": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
},
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false,
"metadata": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}"
headers = {
'x-idempotentkey': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/domains/:domain/accounts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts"
payload = {
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": False
}
],
"plainPassword": "",
"email": {
"email": "",
"verified": False
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": False
},
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": False,
"forApplications": False
}
],
"roles": [],
"active": False,
"metadata": {}
}
headers = {
"x-idempotentkey": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts"
payload <- "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-idempotentkey' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-idempotentkey"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\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/domains/:domain/accounts') do |req|
req.headers['x-idempotentkey'] = ''
req.body = "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ],\n \"plainPassword\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n },\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false,\n \"metadata\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts";
let payload = json!({
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": (
json!({
"type": "",
"identifier": "",
"active": false
})
),
"plainPassword": "",
"email": json!({
"email": "",
"verified": false
}),
"backupEmail": json!({}),
"phoneNumber": json!({
"number": "",
"verified": false
}),
"permissions": (
json!({
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
})
),
"roles": (),
"active": false,
"metadata": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-idempotentkey", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/domains/:domain/accounts \
--header 'content-type: application/json' \
--header 'x-idempotentkey: ' \
--data '{
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
],
"plainPassword": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
},
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false,
"metadata": {}
}'
echo '{
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
],
"plainPassword": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
},
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false,
"metadata": {}
}' | \
http POST {{baseUrl}}/domains/:domain/accounts \
content-type:application/json \
x-idempotentkey:''
wget --quiet \
--method POST \
--header 'x-idempotentkey: ' \
--header 'content-type: application/json' \
--body-data '{\n "externalId": "",\n "domain": "",\n "firstName": "",\n "middleName": "",\n "lastName": "",\n "fullName": "",\n "identifiers": [\n {\n "type": "",\n "identifier": "",\n "active": false\n }\n ],\n "plainPassword": "",\n "email": {\n "email": "",\n "verified": false\n },\n "backupEmail": {},\n "phoneNumber": {\n "number": "",\n "verified": false\n },\n "permissions": [\n {\n "id": "",\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n }\n ],\n "roles": [],\n "active": false,\n "metadata": {}\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/accounts
import Foundation
let headers = [
"x-idempotentkey": "",
"content-type": "application/json"
]
let parameters = [
"externalId": "",
"domain": "",
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"identifiers": [
[
"type": "",
"identifier": "",
"active": false
]
],
"plainPassword": "",
"email": [
"email": "",
"verified": false
],
"backupEmail": [],
"phoneNumber": [
"number": "",
"verified": false
],
"permissions": [
[
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
]
],
"roles": [],
"active": false,
"metadata": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts")! 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()
PATCH
deactivateAnAccount
{{baseUrl}}/domains/:domain/accounts/:id/deactivate
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id/deactivate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/accounts/:id/deactivate")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id/deactivate"
response = HTTP::Client.patch url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id/deactivate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/:id/deactivate");
var request = new RestRequest("", Method.Patch);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id/deactivate"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/accounts/:id/deactivate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/accounts/:id/deactivate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id/deactivate"))
.method("PATCH", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/deactivate")
.patch(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/accounts/:id/deactivate")
.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('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/deactivate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/deactivate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id/deactivate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id/deactivate',
method: 'PATCH',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/deactivate")
.patch(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id/deactivate',
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: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/deactivate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/deactivate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/deactivate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id/deactivate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id/deactivate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id/deactivate" in
Client.call `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/deactivate');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id/deactivate');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id/deactivate');
$request->setRequestMethod('PATCH');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id/deactivate' -Method PATCH
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id/deactivate' -Method PATCH
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PATCH", "/baseUrl/domains/:domain/accounts/:id/deactivate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id/deactivate"
response = requests.patch(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id/deactivate"
response <- VERB("PATCH", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.patch('/baseUrl/domains/:domain/accounts/:id/deactivate') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/:id/deactivate";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/accounts/:id/deactivate
http PATCH {{baseUrl}}/domains/:domain/accounts/:id/deactivate
wget --quiet \
--method PATCH \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id/deactivate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id/deactivate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
deleteAccount
{{baseUrl}}/domains/:domain/accounts/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/domains/:domain/accounts/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id"
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}}/domains/:domain/accounts/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id"
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/domains/:domain/accounts/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/domains/:domain/accounts/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id"))
.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}}/domains/:domain/accounts/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/domains/:domain/accounts/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/domains/:domain/accounts/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/accounts/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id';
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}}/domains/:domain/accounts/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/accounts/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/domains/:domain/accounts/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/accounts/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id';
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}}/domains/:domain/accounts/:id"]
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}}/domains/:domain/accounts/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id",
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}}/domains/:domain/accounts/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/domains/:domain/accounts/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id")
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/domains/:domain/accounts/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/:id";
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}}/domains/:domain/accounts/:id
http DELETE {{baseUrl}}/domains/:domain/accounts/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
emailExists
{{baseUrl}}/domains/:domain/accounts/email/:email/exists
QUERY PARAMS
domain
email
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/email/:email/exists");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/email/:email/exists")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/email/:email/exists"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/email/:email/exists"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/email/:email/exists");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/email/:email/exists"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/email/:email/exists HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/email/:email/exists")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/email/:email/exists"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/email/:email/exists")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/email/:email/exists")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/email/:email/exists');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/email/:email/exists'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/email/:email/exists';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/email/:email/exists',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/email/:email/exists")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/email/:email/exists',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/email/:email/exists'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/email/:email/exists');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/email/:email/exists'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/email/:email/exists';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/email/:email/exists"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/email/:email/exists" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/email/:email/exists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/email/:email/exists');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/email/:email/exists');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/email/:email/exists');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/email/:email/exists' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/email/:email/exists' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/email/:email/exists")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/email/:email/exists"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/email/:email/exists"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/email/:email/exists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/email/:email/exists') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/email/:email/exists";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/email/:email/exists
http GET {{baseUrl}}/domains/:domain/accounts/email/:email/exists
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/email/:email/exists
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/email/:email/exists")! 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
getAccountByCredentialsIdentifier
{{baseUrl}}/domains/:domain/accounts/identifier/:id
QUERY PARAMS
domain
identifier
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/identifier/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/identifier/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/identifier/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/identifier/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/identifier/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/identifier/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/identifier/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/identifier/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/identifier/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/identifier/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/identifier/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/identifier/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/identifier/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/identifier/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/identifier/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/identifier/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/identifier/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/identifier/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/identifier/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/identifier/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/identifier/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/identifier/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/identifier/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/identifier/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/identifier/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/identifier/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/identifier/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/identifier/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/identifier/:id
http GET {{baseUrl}}/domains/:domain/accounts/identifier/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/identifier/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/identifier/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getAccountByEmail
{{baseUrl}}/domains/:domain/accounts/email/:email
QUERY PARAMS
domain
email
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/email/:email");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/email/:email")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/email/:email"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/email/:email"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/email/:email");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/email/:email"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/email/:email HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/email/:email")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/email/:email"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/email/:email")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/email/:email")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/email/:email');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/email/:email'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/email/:email';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/email/:email',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/email/:email")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/email/:email',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/email/:email'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/email/:email');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/email/:email'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/email/:email';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/email/:email"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/email/:email" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/email/:email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/email/:email');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/email/:email');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/email/:email');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/email/:email' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/email/:email' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/email/:email")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/email/:email"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/email/:email"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/email/:email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/email/:email') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/email/:email";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/email/:email
http GET {{baseUrl}}/domains/:domain/accounts/email/:email
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/email/:email
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/email/:email")! 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
getAccountByExternalId
{{baseUrl}}/domains/:domain/accounts/externalId/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/externalId/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/externalId/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/externalId/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/externalId/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/externalId/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/externalId/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/externalId/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/externalId/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/externalId/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/externalId/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/externalId/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/externalId/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/externalId/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/externalId/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/externalId/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/externalId/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/externalId/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/externalId/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/externalId/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/externalId/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/externalId/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/externalId/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/externalId/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/externalId/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/externalId/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/externalId/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/externalId/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/externalId/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/externalId/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/externalId/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/externalId/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/externalId/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/externalId/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/externalId/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/externalId/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/externalId/:id
http GET {{baseUrl}}/domains/:domain/accounts/externalId/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/externalId/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/externalId/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getAccountById
{{baseUrl}}/domains/:domain/accounts/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/accounts/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/accounts/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/accounts/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/:id
http GET {{baseUrl}}/domains/:domain/accounts/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getAccountByIdentifier
{{baseUrl}}/domains/:domain/accounts/identifier/:identifier
QUERY PARAMS
domain
identifier
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/identifier/:identifier HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/identifier/:identifier',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/identifier/:identifier"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/identifier/:identifier",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/identifier/:identifier');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/identifier/:identifier');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/identifier/:identifier")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/identifier/:identifier') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/identifier/:identifier
http GET {{baseUrl}}/domains/:domain/accounts/identifier/:identifier
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/identifier/:identifier
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier")! 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
getApplicationsByAccountId
{{baseUrl}}/domains/:domain/accounts/:id/apps
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id/apps");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/:id/apps")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id/apps"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id/apps"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/:id/apps");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id/apps"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/:id/apps HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/:id/apps")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id/apps"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/apps")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/:id/apps")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/:id/apps');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/apps'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id/apps';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id/apps',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/apps")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id/apps',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/apps'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/:id/apps');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/apps'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id/apps';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id/apps"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id/apps" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id/apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/:id/apps');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id/apps');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id/apps');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id/apps' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id/apps' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/:id/apps")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id/apps"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id/apps"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id/apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/:id/apps') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/:id/apps";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/:id/apps
http GET {{baseUrl}}/domains/:domain/accounts/:id/apps
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id/apps
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id/apps")! 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
getCryptoKeysByAccountId
{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/:id/crypto_keys HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id/crypto_keys',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/:id/crypto_keys")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/:id/crypto_keys') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/:id/crypto_keys
http GET {{baseUrl}}/domains/:domain/accounts/:id/crypto_keys
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id/crypto_keys
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id/crypto_keys")! 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
getLocksByAccountId
{{baseUrl}}/domains/:domain/accounts/:id/locks
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id/locks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/:id/locks")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id/locks"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id/locks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/:id/locks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id/locks"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/:id/locks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/:id/locks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id/locks"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/locks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/:id/locks")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/:id/locks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/locks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id/locks';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id/locks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/locks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id/locks',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/locks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/:id/locks');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/:id/locks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id/locks';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id/locks"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id/locks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id/locks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/:id/locks');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id/locks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id/locks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id/locks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id/locks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/:id/locks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id/locks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id/locks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id/locks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/:id/locks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/:id/locks";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/:id/locks
http GET {{baseUrl}}/domains/:domain/accounts/:id/locks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id/locks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id/locks")! 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
identifierExists
{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists
QUERY PARAMS
domain
identifier
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists")
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/accounts/identifier/:identifier/exists HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/identifier/:identifier/exists',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/accounts/identifier/:identifier/exists")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/accounts/identifier/:identifier/exists') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists
http GET {{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/identifier/:identifier/exists")! 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()
PATCH
patchAccount
{{baseUrl}}/domains/:domain/accounts/:id
QUERY PARAMS
domain
id
BODY json
{
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id");
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 \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/accounts/:id" {:content-type :json
:form-params {:firstName ""
:middleName ""
:lastName ""
:fullName ""
:email {:email ""
:verified false}
:backupEmail {}
:phoneNumber {:number ""
:verified false}}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id"),
Content = new StringContent("{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\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}}/domains/:domain/accounts/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id"
payload := strings.NewReader("{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/accounts/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 219
{
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/accounts/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\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 \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/accounts/:id")
.header("content-type", "application/json")
.body("{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}")
.asString();
const data = JSON.stringify({
firstName: '',
middleName: '',
lastName: '',
fullName: '',
email: {
email: '',
verified: false
},
backupEmail: {},
phoneNumber: {
number: '',
verified: false
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id',
headers: {'content-type': 'application/json'},
data: {
firstName: '',
middleName: '',
lastName: '',
fullName: '',
email: {email: '', verified: false},
backupEmail: {},
phoneNumber: {number: '', verified: false}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"firstName":"","middleName":"","lastName":"","fullName":"","email":{"email":"","verified":false},"backupEmail":{},"phoneNumber":{"number":"","verified":false}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "firstName": "",\n "middleName": "",\n "lastName": "",\n "fullName": "",\n "email": {\n "email": "",\n "verified": false\n },\n "backupEmail": {},\n "phoneNumber": {\n "number": "",\n "verified": false\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 \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id',
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({
firstName: '',
middleName: '',
lastName: '',
fullName: '',
email: {email: '', verified: false},
backupEmail: {},
phoneNumber: {number: '', verified: false}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id',
headers: {'content-type': 'application/json'},
body: {
firstName: '',
middleName: '',
lastName: '',
fullName: '',
email: {email: '', verified: false},
backupEmail: {},
phoneNumber: {number: '', verified: false}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
firstName: '',
middleName: '',
lastName: '',
fullName: '',
email: {
email: '',
verified: false
},
backupEmail: {},
phoneNumber: {
number: '',
verified: false
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id',
headers: {'content-type': 'application/json'},
data: {
firstName: '',
middleName: '',
lastName: '',
fullName: '',
email: {email: '', verified: false},
backupEmail: {},
phoneNumber: {number: '', verified: false}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"firstName":"","middleName":"","lastName":"","fullName":"","email":{"email":"","verified":false},"backupEmail":{},"phoneNumber":{"number":"","verified":false}}'
};
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 = @{ @"firstName": @"",
@"middleName": @"",
@"lastName": @"",
@"fullName": @"",
@"email": @{ @"email": @"", @"verified": @NO },
@"backupEmail": @{ },
@"phoneNumber": @{ @"number": @"", @"verified": @NO } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '',
'middleName' => '',
'lastName' => '',
'fullName' => '',
'email' => [
'email' => '',
'verified' => null
],
'backupEmail' => [
],
'phoneNumber' => [
'number' => '',
'verified' => null
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id', [
'body' => '{
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'firstName' => '',
'middleName' => '',
'lastName' => '',
'fullName' => '',
'email' => [
'email' => '',
'verified' => null
],
'backupEmail' => [
],
'phoneNumber' => [
'number' => '',
'verified' => null
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'firstName' => '',
'middleName' => '',
'lastName' => '',
'fullName' => '',
'email' => [
'email' => '',
'verified' => null
],
'backupEmail' => [
],
'phoneNumber' => [
'number' => '',
'verified' => null
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/accounts/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id"
payload = {
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": {
"email": "",
"verified": False
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": False
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id"
payload <- "{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\n }\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\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.patch('/baseUrl/domains/:domain/accounts/:id') do |req|
req.body = "{\n \"firstName\": \"\",\n \"middleName\": \"\",\n \"lastName\": \"\",\n \"fullName\": \"\",\n \"email\": {\n \"email\": \"\",\n \"verified\": false\n },\n \"backupEmail\": {},\n \"phoneNumber\": {\n \"number\": \"\",\n \"verified\": false\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}}/domains/:domain/accounts/:id";
let payload = json!({
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": json!({
"email": "",
"verified": false
}),
"backupEmail": json!({}),
"phoneNumber": json!({
"number": "",
"verified": false
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/accounts/:id \
--header 'content-type: application/json' \
--data '{
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
}
}'
echo '{
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": {
"email": "",
"verified": false
},
"backupEmail": {},
"phoneNumber": {
"number": "",
"verified": false
}
}' | \
http PATCH {{baseUrl}}/domains/:domain/accounts/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "firstName": "",\n "middleName": "",\n "lastName": "",\n "fullName": "",\n "email": {\n "email": "",\n "verified": false\n },\n "backupEmail": {},\n "phoneNumber": {\n "number": "",\n "verified": false\n }\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"firstName": "",
"middleName": "",
"lastName": "",
"fullName": "",
"email": [
"email": "",
"verified": false
],
"backupEmail": [],
"phoneNumber": [
"number": "",
"verified": false
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
updateAccountPermissions
{{baseUrl}}/domains/:domain/accounts/:id/permissions
QUERY PARAMS
domain
id
BODY json
{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id/permissions");
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 \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/accounts/:id/permissions" {:content-type :json
:form-params {:action ""
:permissions [{:id ""
:group ""
:name ""
:domain ""
:forAccounts false
:forApplications false}]}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id/permissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id/permissions"),
Content = new StringContent("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/accounts/:id/permissions");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id/permissions"
payload := strings.NewReader("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/accounts/:id/permissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 186
{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/accounts/:id/permissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id/permissions"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/permissions")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/accounts/:id/permissions")
.header("content-type", "application/json")
.body("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
.asString();
const data = JSON.stringify({
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/permissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/permissions',
headers: {'content-type': 'application/json'},
data: {
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id/permissions';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"action":"","permissions":[{"id":"","group":"","name":"","domain":"","forAccounts":false,"forApplications":false}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id/permissions',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "action": "",\n "permissions": [\n {\n "id": "",\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/permissions")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id/permissions',
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({
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/permissions',
headers: {'content-type': 'application/json'},
body: {
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/permissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/permissions',
headers: {'content-type': 'application/json'},
data: {
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id/permissions';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"action":"","permissions":[{"id":"","group":"","name":"","domain":"","forAccounts":false,"forApplications":false}]}'
};
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 = @{ @"action": @"",
@"permissions": @[ @{ @"id": @"", @"group": @"", @"name": @"", @"domain": @"", @"forAccounts": @NO, @"forApplications": @NO } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id/permissions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id/permissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id/permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'action' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/permissions', [
'body' => '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id/permissions');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'action' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'action' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id/permissions');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id/permissions' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id/permissions' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/accounts/:id/permissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id/permissions"
payload = {
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": False,
"forApplications": False
}
]
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id/permissions"
payload <- "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/domains/:domain/accounts/:id/permissions') do |req|
req.body = "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\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}}/domains/:domain/accounts/:id/permissions";
let payload = json!({
"action": "",
"permissions": (
json!({
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/accounts/:id/permissions \
--header 'content-type: application/json' \
--data '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}'
echo '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}' | \
http PATCH {{baseUrl}}/domains/:domain/accounts/:id/permissions \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "action": "",\n "permissions": [\n {\n "id": "",\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id/permissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"action": "",
"permissions": [
[
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id/permissions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
updateAccountRoles
{{baseUrl}}/domains/:domain/accounts/:id/roles
QUERY PARAMS
domain
id
BODY json
{
"action": "",
"roles": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/accounts/:id/roles");
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 \"action\": \"\",\n \"roles\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/accounts/:id/roles" {:content-type :json
:form-params {:action ""
:roles []}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/accounts/:id/roles"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"action\": \"\",\n \"roles\": []\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/accounts/:id/roles"),
Content = new StringContent("{\n \"action\": \"\",\n \"roles\": []\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}}/domains/:domain/accounts/:id/roles");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"action\": \"\",\n \"roles\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/accounts/:id/roles"
payload := strings.NewReader("{\n \"action\": \"\",\n \"roles\": []\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/accounts/:id/roles HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 33
{
"action": "",
"roles": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/accounts/:id/roles")
.setHeader("content-type", "application/json")
.setBody("{\n \"action\": \"\",\n \"roles\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/accounts/:id/roles"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"action\": \"\",\n \"roles\": []\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 \"action\": \"\",\n \"roles\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/roles")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/accounts/:id/roles")
.header("content-type", "application/json")
.body("{\n \"action\": \"\",\n \"roles\": []\n}")
.asString();
const data = JSON.stringify({
action: '',
roles: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/roles');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/roles',
headers: {'content-type': 'application/json'},
data: {action: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/accounts/:id/roles';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"action":"","roles":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/accounts/:id/roles',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "action": "",\n "roles": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"action\": \"\",\n \"roles\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/accounts/:id/roles")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/accounts/:id/roles',
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({action: '', roles: []}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/roles',
headers: {'content-type': 'application/json'},
body: {action: '', roles: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/roles');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
action: '',
roles: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/accounts/:id/roles',
headers: {'content-type': 'application/json'},
data: {action: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/accounts/:id/roles';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"action":"","roles":[]}'
};
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 = @{ @"action": @"",
@"roles": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/accounts/:id/roles"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/accounts/:id/roles" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"action\": \"\",\n \"roles\": []\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/accounts/:id/roles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'action' => '',
'roles' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/accounts/:id/roles', [
'body' => '{
"action": "",
"roles": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/accounts/:id/roles');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'action' => '',
'roles' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'action' => '',
'roles' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/accounts/:id/roles');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/accounts/:id/roles' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"action": "",
"roles": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/accounts/:id/roles' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"action": "",
"roles": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"action\": \"\",\n \"roles\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/accounts/:id/roles", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/accounts/:id/roles"
payload = {
"action": "",
"roles": []
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/accounts/:id/roles"
payload <- "{\n \"action\": \"\",\n \"roles\": []\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/accounts/:id/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"action\": \"\",\n \"roles\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/domains/:domain/accounts/:id/roles') do |req|
req.body = "{\n \"action\": \"\",\n \"roles\": []\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}}/domains/:domain/accounts/:id/roles";
let payload = json!({
"action": "",
"roles": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/accounts/:id/roles \
--header 'content-type: application/json' \
--data '{
"action": "",
"roles": []
}'
echo '{
"action": "",
"roles": []
}' | \
http PATCH {{baseUrl}}/domains/:domain/accounts/:id/roles \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "action": "",\n "roles": []\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/accounts/:id/roles
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"action": "",
"roles": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/accounts/:id/roles")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Generate a one-time password for an action
{{baseUrl}}/domains/:domain/actions/otp
QUERY PARAMS
accountId
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/actions/otp?accountId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/actions/otp" {:query-params {:accountId ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/actions/otp?accountId="
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}}/domains/:domain/actions/otp?accountId="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/actions/otp?accountId=");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/actions/otp?accountId="
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/domains/:domain/actions/otp?accountId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/actions/otp?accountId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/actions/otp?accountId="))
.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}}/domains/:domain/actions/otp?accountId=")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/actions/otp?accountId=")
.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}}/domains/:domain/actions/otp?accountId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/actions/otp',
params: {accountId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/actions/otp?accountId=';
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}}/domains/:domain/actions/otp?accountId=',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/actions/otp?accountId=")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/actions/otp?accountId=',
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}}/domains/:domain/actions/otp',
qs: {accountId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/domains/:domain/actions/otp');
req.query({
accountId: ''
});
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}}/domains/:domain/actions/otp',
params: {accountId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/actions/otp?accountId=';
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}}/domains/:domain/actions/otp?accountId="]
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}}/domains/:domain/actions/otp?accountId=" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/actions/otp?accountId=",
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}}/domains/:domain/actions/otp?accountId=');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/actions/otp');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'accountId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/actions/otp');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'accountId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/actions/otp?accountId=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/actions/otp?accountId=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/domains/:domain/actions/otp?accountId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/actions/otp"
querystring = {"accountId":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/actions/otp"
queryString <- list(accountId = "")
response <- VERB("POST", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/actions/otp?accountId=")
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/domains/:domain/actions/otp') do |req|
req.params['accountId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/actions/otp";
let querystring = [
("accountId", ""),
];
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/domains/:domain/actions/otp?accountId='
http POST '{{baseUrl}}/domains/:domain/actions/otp?accountId='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/domains/:domain/actions/otp?accountId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/actions/otp?accountId=")! 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()
POST
Generate an action token either from an OTP generated by -actions-domains-{domain}-otp or by a user identifier and password
{{baseUrl}}/domains/:domain/actions/token
QUERY PARAMS
domain
BODY json
{
"type": "",
"otp": {
"passwordId": "",
"password": ""
},
"basic": {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
},
"action": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/actions/token");
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 \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/actions/token" {:content-type :json
:form-params {:type ""
:otp {:passwordId ""
:password ""}
:basic {:domain ""
:identifier ""
:password ""
:token ""
:deviceId ""
:externalSessionId ""
:sourceIp ""
:userAgent ""
:restrictions {:permissions []
:roles []}}
:action ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/actions/token"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\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}}/domains/:domain/actions/token"),
Content = new StringContent("{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\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}}/domains/:domain/actions/token");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/actions/token"
payload := strings.NewReader("{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\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/domains/:domain/actions/token HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 345
{
"type": "",
"otp": {
"passwordId": "",
"password": ""
},
"basic": {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
},
"action": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/actions/token")
.setHeader("content-type", "application/json")
.setBody("{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/actions/token"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\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 \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/actions/token")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/actions/token")
.header("content-type", "application/json")
.body("{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}")
.asString();
const data = JSON.stringify({
type: '',
otp: {
passwordId: '',
password: ''
},
basic: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
},
action: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/actions/token');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/actions/token',
headers: {'content-type': 'application/json'},
data: {
type: '',
otp: {passwordId: '', password: ''},
basic: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
action: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/actions/token';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"type":"","otp":{"passwordId":"","password":""},"basic":{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}},"action":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/actions/token',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "type": "",\n "otp": {\n "passwordId": "",\n "password": ""\n },\n "basic": {\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\n }\n },\n "action": ""\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 \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/actions/token")
.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/domains/:domain/actions/token',
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: '',
otp: {passwordId: '', password: ''},
basic: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
action: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/actions/token',
headers: {'content-type': 'application/json'},
body: {
type: '',
otp: {passwordId: '', password: ''},
basic: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
action: ''
},
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}}/domains/:domain/actions/token');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
type: '',
otp: {
passwordId: '',
password: ''
},
basic: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
},
action: ''
});
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}}/domains/:domain/actions/token',
headers: {'content-type': 'application/json'},
data: {
type: '',
otp: {passwordId: '', password: ''},
basic: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
action: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/actions/token';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"type":"","otp":{"passwordId":"","password":""},"basic":{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}},"action":""}'
};
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": @"",
@"otp": @{ @"passwordId": @"", @"password": @"" },
@"basic": @{ @"domain": @"", @"identifier": @"", @"password": @"", @"token": @"", @"deviceId": @"", @"externalSessionId": @"", @"sourceIp": @"", @"userAgent": @"", @"restrictions": @{ @"permissions": @[ ], @"roles": @[ ] } },
@"action": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/actions/token"]
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}}/domains/:domain/actions/token" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/actions/token",
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([
'type' => '',
'otp' => [
'passwordId' => '',
'password' => ''
],
'basic' => [
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
],
'action' => ''
]),
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}}/domains/:domain/actions/token', [
'body' => '{
"type": "",
"otp": {
"passwordId": "",
"password": ""
},
"basic": {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
},
"action": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/actions/token');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'type' => '',
'otp' => [
'passwordId' => '',
'password' => ''
],
'basic' => [
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
],
'action' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'type' => '',
'otp' => [
'passwordId' => '',
'password' => ''
],
'basic' => [
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
],
'action' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/actions/token');
$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}}/domains/:domain/actions/token' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"type": "",
"otp": {
"passwordId": "",
"password": ""
},
"basic": {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
},
"action": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/actions/token' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"type": "",
"otp": {
"passwordId": "",
"password": ""
},
"basic": {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
},
"action": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/actions/token", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/actions/token"
payload = {
"type": "",
"otp": {
"passwordId": "",
"password": ""
},
"basic": {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
},
"action": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/actions/token"
payload <- "{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\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}}/domains/:domain/actions/token")
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 \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\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/domains/:domain/actions/token') do |req|
req.body = "{\n \"type\": \"\",\n \"otp\": {\n \"passwordId\": \"\",\n \"password\": \"\"\n },\n \"basic\": {\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n },\n \"action\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/actions/token";
let payload = json!({
"type": "",
"otp": json!({
"passwordId": "",
"password": ""
}),
"basic": json!({
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": json!({
"permissions": (),
"roles": ()
})
}),
"action": ""
});
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}}/domains/:domain/actions/token \
--header 'content-type: application/json' \
--data '{
"type": "",
"otp": {
"passwordId": "",
"password": ""
},
"basic": {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
},
"action": ""
}'
echo '{
"type": "",
"otp": {
"passwordId": "",
"password": ""
},
"basic": {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
},
"action": ""
}' | \
http POST {{baseUrl}}/domains/:domain/actions/token \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "type": "",\n "otp": {\n "passwordId": "",\n "password": ""\n },\n "basic": {\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\n }\n },\n "action": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/actions/token
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"type": "",
"otp": [
"passwordId": "",
"password": ""
],
"basic": [
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": [
"permissions": [],
"roles": []
]
],
"action": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/actions/token")! 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
Verify that an action token is valid for the specified action
{{baseUrl}}/domains/:domain/actions/verify
QUERY PARAMS
token
action
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/actions/verify?token=&action=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/actions/verify" {:query-params {:token ""
:action ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/actions/verify?token=&action="
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}}/domains/:domain/actions/verify?token=&action="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/actions/verify?token=&action=");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/actions/verify?token=&action="
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/domains/:domain/actions/verify?token=&action= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/actions/verify?token=&action=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/actions/verify?token=&action="))
.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}}/domains/:domain/actions/verify?token=&action=")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/actions/verify?token=&action=")
.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}}/domains/:domain/actions/verify?token=&action=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/actions/verify',
params: {token: '', action: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/actions/verify?token=&action=';
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}}/domains/:domain/actions/verify?token=&action=',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/actions/verify?token=&action=")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/actions/verify?token=&action=',
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}}/domains/:domain/actions/verify',
qs: {token: '', action: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/domains/:domain/actions/verify');
req.query({
token: '',
action: ''
});
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}}/domains/:domain/actions/verify',
params: {token: '', action: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/actions/verify?token=&action=';
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}}/domains/:domain/actions/verify?token=&action="]
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}}/domains/:domain/actions/verify?token=&action=" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/actions/verify?token=&action=",
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}}/domains/:domain/actions/verify?token=&action=');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/actions/verify');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'token' => '',
'action' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/actions/verify');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'token' => '',
'action' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/actions/verify?token=&action=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/actions/verify?token=&action=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/domains/:domain/actions/verify?token=&action=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/actions/verify"
querystring = {"token":"","action":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/actions/verify"
queryString <- list(
token = "",
action = ""
)
response <- VERB("POST", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/actions/verify?token=&action=")
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/domains/:domain/actions/verify') do |req|
req.params['token'] = ''
req.params['action'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/actions/verify";
let querystring = [
("token", ""),
("action", ""),
];
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/domains/:domain/actions/verify?token=&action='
http POST '{{baseUrl}}/domains/:domain/actions/verify?token=&action='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/domains/:domain/actions/verify?token=&action='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/actions/verify?token=&action=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
deleteApiKey
{{baseUrl}}/domains/:domain/keys/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/keys/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/domains/:domain/keys/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/keys/:id"
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}}/domains/:domain/keys/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/keys/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/keys/:id"
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/domains/:domain/keys/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/domains/:domain/keys/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/keys/:id"))
.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}}/domains/:domain/keys/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/domains/:domain/keys/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/domains/:domain/keys/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/keys/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/keys/:id';
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}}/domains/:domain/keys/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/keys/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/keys/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/keys/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/domains/:domain/keys/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/keys/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/keys/:id';
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}}/domains/:domain/keys/:id"]
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}}/domains/:domain/keys/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/keys/:id",
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}}/domains/:domain/keys/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/keys/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/keys/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/keys/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/keys/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/domains/:domain/keys/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/keys/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/keys/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/keys/:id")
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/domains/:domain/keys/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/keys/:id";
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}}/domains/:domain/keys/:id
http DELETE {{baseUrl}}/domains/:domain/keys/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/domains/:domain/keys/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/keys/:id")! 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
generateApiKey
{{baseUrl}}/domains/:domain/keys
QUERY PARAMS
domain
BODY json
{
"appId": "",
"keyType": "",
"name": "",
"validFor": {
"days": "",
"hours": "",
"minutes": ""
},
"forClient": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/keys");
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 \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/keys" {:content-type :json
:form-params {:appId ""
:keyType ""
:name ""
:validFor {:days ""
:hours ""
:minutes ""}
:forClient false}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/keys"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\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}}/domains/:domain/keys"),
Content = new StringContent("{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\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}}/domains/:domain/keys");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/keys"
payload := strings.NewReader("{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\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/domains/:domain/keys HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 142
{
"appId": "",
"keyType": "",
"name": "",
"validFor": {
"days": "",
"hours": "",
"minutes": ""
},
"forClient": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/keys")
.setHeader("content-type", "application/json")
.setBody("{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/keys"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\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 \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/keys")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/keys")
.header("content-type", "application/json")
.body("{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}")
.asString();
const data = JSON.stringify({
appId: '',
keyType: '',
name: '',
validFor: {
days: '',
hours: '',
minutes: ''
},
forClient: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/keys');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/keys',
headers: {'content-type': 'application/json'},
data: {
appId: '',
keyType: '',
name: '',
validFor: {days: '', hours: '', minutes: ''},
forClient: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/keys';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appId":"","keyType":"","name":"","validFor":{"days":"","hours":"","minutes":""},"forClient":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/keys',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "appId": "",\n "keyType": "",\n "name": "",\n "validFor": {\n "days": "",\n "hours": "",\n "minutes": ""\n },\n "forClient": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/keys")
.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/domains/:domain/keys',
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({
appId: '',
keyType: '',
name: '',
validFor: {days: '', hours: '', minutes: ''},
forClient: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/keys',
headers: {'content-type': 'application/json'},
body: {
appId: '',
keyType: '',
name: '',
validFor: {days: '', hours: '', minutes: ''},
forClient: false
},
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}}/domains/:domain/keys');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
appId: '',
keyType: '',
name: '',
validFor: {
days: '',
hours: '',
minutes: ''
},
forClient: false
});
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}}/domains/:domain/keys',
headers: {'content-type': 'application/json'},
data: {
appId: '',
keyType: '',
name: '',
validFor: {days: '', hours: '', minutes: ''},
forClient: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/keys';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"appId":"","keyType":"","name":"","validFor":{"days":"","hours":"","minutes":""},"forClient":false}'
};
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 = @{ @"appId": @"",
@"keyType": @"",
@"name": @"",
@"validFor": @{ @"days": @"", @"hours": @"", @"minutes": @"" },
@"forClient": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/keys"]
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}}/domains/:domain/keys" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/keys",
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([
'appId' => '',
'keyType' => '',
'name' => '',
'validFor' => [
'days' => '',
'hours' => '',
'minutes' => ''
],
'forClient' => null
]),
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}}/domains/:domain/keys', [
'body' => '{
"appId": "",
"keyType": "",
"name": "",
"validFor": {
"days": "",
"hours": "",
"minutes": ""
},
"forClient": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/keys');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'appId' => '',
'keyType' => '',
'name' => '',
'validFor' => [
'days' => '',
'hours' => '',
'minutes' => ''
],
'forClient' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'appId' => '',
'keyType' => '',
'name' => '',
'validFor' => [
'days' => '',
'hours' => '',
'minutes' => ''
],
'forClient' => null
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/keys');
$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}}/domains/:domain/keys' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appId": "",
"keyType": "",
"name": "",
"validFor": {
"days": "",
"hours": "",
"minutes": ""
},
"forClient": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/keys' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"appId": "",
"keyType": "",
"name": "",
"validFor": {
"days": "",
"hours": "",
"minutes": ""
},
"forClient": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/keys", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/keys"
payload = {
"appId": "",
"keyType": "",
"name": "",
"validFor": {
"days": "",
"hours": "",
"minutes": ""
},
"forClient": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/keys"
payload <- "{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\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}}/domains/:domain/keys")
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 \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\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/domains/:domain/keys') do |req|
req.body = "{\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"validFor\": {\n \"days\": \"\",\n \"hours\": \"\",\n \"minutes\": \"\"\n },\n \"forClient\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/keys";
let payload = json!({
"appId": "",
"keyType": "",
"name": "",
"validFor": json!({
"days": "",
"hours": "",
"minutes": ""
}),
"forClient": false
});
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}}/domains/:domain/keys \
--header 'content-type: application/json' \
--data '{
"appId": "",
"keyType": "",
"name": "",
"validFor": {
"days": "",
"hours": "",
"minutes": ""
},
"forClient": false
}'
echo '{
"appId": "",
"keyType": "",
"name": "",
"validFor": {
"days": "",
"hours": "",
"minutes": ""
},
"forClient": false
}' | \
http POST {{baseUrl}}/domains/:domain/keys \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "appId": "",\n "keyType": "",\n "name": "",\n "validFor": {\n "days": "",\n "hours": "",\n "minutes": ""\n },\n "forClient": false\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/keys
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"appId": "",
"keyType": "",
"name": "",
"validFor": [
"days": "",
"hours": "",
"minutes": ""
],
"forClient": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/keys")! 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
getApiKeyById
{{baseUrl}}/domains/:domain/keys/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/keys/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/keys/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/keys/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/keys/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/keys/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/keys/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/keys/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/keys/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/keys/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/keys/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/keys/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/keys/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/keys/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/keys/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/keys/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/keys/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/keys/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/keys/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/keys/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/keys/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/keys/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/keys/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/keys/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/keys/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/keys/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/keys/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/keys/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/keys/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/keys/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/keys/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/keys/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/keys/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/keys/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/keys/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/keys/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/keys/:id
http GET {{baseUrl}}/domains/:domain/keys/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/keys/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/keys/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
verifyKey
{{baseUrl}}/domains/:domain/keys/verify
QUERY PARAMS
domain
BODY json
{
"key": "",
"keyType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/keys/verify");
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 \"key\": \"\",\n \"keyType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/keys/verify" {:content-type :json
:form-params {:key ""
:keyType ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/keys/verify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"key\": \"\",\n \"keyType\": \"\"\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}}/domains/:domain/keys/verify"),
Content = new StringContent("{\n \"key\": \"\",\n \"keyType\": \"\"\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}}/domains/:domain/keys/verify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"key\": \"\",\n \"keyType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/keys/verify"
payload := strings.NewReader("{\n \"key\": \"\",\n \"keyType\": \"\"\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/domains/:domain/keys/verify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 32
{
"key": "",
"keyType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/keys/verify")
.setHeader("content-type", "application/json")
.setBody("{\n \"key\": \"\",\n \"keyType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/keys/verify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"key\": \"\",\n \"keyType\": \"\"\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 \"key\": \"\",\n \"keyType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/keys/verify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/keys/verify")
.header("content-type", "application/json")
.body("{\n \"key\": \"\",\n \"keyType\": \"\"\n}")
.asString();
const data = JSON.stringify({
key: '',
keyType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/keys/verify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/keys/verify',
headers: {'content-type': 'application/json'},
data: {key: '', keyType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/keys/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"key":"","keyType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/keys/verify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "key": "",\n "keyType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"key\": \"\",\n \"keyType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/keys/verify")
.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/domains/:domain/keys/verify',
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({key: '', keyType: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/keys/verify',
headers: {'content-type': 'application/json'},
body: {key: '', keyType: ''},
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}}/domains/:domain/keys/verify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
key: '',
keyType: ''
});
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}}/domains/:domain/keys/verify',
headers: {'content-type': 'application/json'},
data: {key: '', keyType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/keys/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"key":"","keyType":""}'
};
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 = @{ @"key": @"",
@"keyType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/keys/verify"]
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}}/domains/:domain/keys/verify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"key\": \"\",\n \"keyType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/keys/verify",
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([
'key' => '',
'keyType' => ''
]),
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}}/domains/:domain/keys/verify', [
'body' => '{
"key": "",
"keyType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/keys/verify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'key' => '',
'keyType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'key' => '',
'keyType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/keys/verify');
$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}}/domains/:domain/keys/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"key": "",
"keyType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/keys/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"key": "",
"keyType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"key\": \"\",\n \"keyType\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/keys/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/keys/verify"
payload = {
"key": "",
"keyType": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/keys/verify"
payload <- "{\n \"key\": \"\",\n \"keyType\": \"\"\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}}/domains/:domain/keys/verify")
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 \"key\": \"\",\n \"keyType\": \"\"\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/domains/:domain/keys/verify') do |req|
req.body = "{\n \"key\": \"\",\n \"keyType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/keys/verify";
let payload = json!({
"key": "",
"keyType": ""
});
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}}/domains/:domain/keys/verify \
--header 'content-type: application/json' \
--data '{
"key": "",
"keyType": ""
}'
echo '{
"key": "",
"keyType": ""
}' | \
http POST {{baseUrl}}/domains/:domain/keys/verify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "key": "",\n "keyType": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/keys/verify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"key": "",
"keyType": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/keys/verify")! 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()
PATCH
activateAnApp
{{baseUrl}}/domains/:domain/apps/:id/activate
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/:id/activate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/apps/:id/activate")
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/:id/activate"
response = HTTP::Client.patch url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/apps/:id/activate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/apps/:id/activate");
var request = new RestRequest("", Method.Patch);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/:id/activate"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/apps/:id/activate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/apps/:id/activate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/:id/activate"))
.method("PATCH", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/activate")
.patch(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/apps/:id/activate")
.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('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/activate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/:id/activate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps/:id/activate',
method: 'PATCH',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/activate")
.patch(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/:id/activate',
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: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/activate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/activate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/:id/activate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps/:id/activate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/apps/:id/activate" in
Client.call `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/:id/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/activate');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/:id/activate');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/apps/:id/activate');
$request->setRequestMethod('PATCH');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/:id/activate' -Method PATCH
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/:id/activate' -Method PATCH
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PATCH", "/baseUrl/domains/:domain/apps/:id/activate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/:id/activate"
response = requests.patch(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/:id/activate"
response <- VERB("PATCH", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/:id/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.patch('/baseUrl/domains/:domain/apps/:id/activate') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/apps/:id/activate";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/apps/:id/activate
http PATCH {{baseUrl}}/domains/:domain/apps/:id/activate
wget --quiet \
--method PATCH \
--output-document \
- {{baseUrl}}/domains/:domain/apps/:id/activate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/:id/activate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
createApp
{{baseUrl}}/domains/:domain/apps
QUERY PARAMS
domain
BODY json
{
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps");
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 \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/apps" {:content-type :json
:form-params {:externalId ""
:name ""
:domain ""
:accountId ""
:permissions [{:id ""
:group ""
:name ""
:domain ""
:forAccounts false
:forApplications false}]
:roles []
:active false}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\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}}/domains/:domain/apps"),
Content = new StringContent("{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\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}}/domains/:domain/apps");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps"
payload := strings.NewReader("{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\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/domains/:domain/apps HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 273
{
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/apps")
.setHeader("content-type", "application/json")
.setBody("{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\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 \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/apps")
.header("content-type", "application/json")
.body("{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}")
.asString();
const data = JSON.stringify({
externalId: '',
name: '',
domain: '',
accountId: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/apps');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/apps',
headers: {'content-type': 'application/json'},
data: {
externalId: '',
name: '',
domain: '',
accountId: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"externalId":"","name":"","domain":"","accountId":"","permissions":[{"id":"","group":"","name":"","domain":"","forAccounts":false,"forApplications":false}],"roles":[],"active":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "externalId": "",\n "name": "",\n "domain": "",\n "accountId": "",\n "permissions": [\n {\n "id": "",\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n }\n ],\n "roles": [],\n "active": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps")
.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/domains/:domain/apps',
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({
externalId: '',
name: '',
domain: '',
accountId: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/apps',
headers: {'content-type': 'application/json'},
body: {
externalId: '',
name: '',
domain: '',
accountId: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false
},
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}}/domains/:domain/apps');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
externalId: '',
name: '',
domain: '',
accountId: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false
});
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}}/domains/:domain/apps',
headers: {'content-type': 'application/json'},
data: {
externalId: '',
name: '',
domain: '',
accountId: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
],
roles: [],
active: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"externalId":"","name":"","domain":"","accountId":"","permissions":[{"id":"","group":"","name":"","domain":"","forAccounts":false,"forApplications":false}],"roles":[],"active":false}'
};
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 = @{ @"externalId": @"",
@"name": @"",
@"domain": @"",
@"accountId": @"",
@"permissions": @[ @{ @"id": @"", @"group": @"", @"name": @"", @"domain": @"", @"forAccounts": @NO, @"forApplications": @NO } ],
@"roles": @[ ],
@"active": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps"]
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}}/domains/:domain/apps" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps",
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([
'externalId' => '',
'name' => '',
'domain' => '',
'accountId' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
],
'roles' => [
],
'active' => null
]),
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}}/domains/:domain/apps', [
'body' => '{
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'externalId' => '',
'name' => '',
'domain' => '',
'accountId' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
],
'roles' => [
],
'active' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'externalId' => '',
'name' => '',
'domain' => '',
'accountId' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
],
'roles' => [
],
'active' => null
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/apps');
$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}}/domains/:domain/apps' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/apps", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps"
payload = {
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": False,
"forApplications": False
}
],
"roles": [],
"active": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps"
payload <- "{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\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}}/domains/:domain/apps")
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 \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\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/domains/:domain/apps') do |req|
req.body = "{\n \"externalId\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ],\n \"roles\": [],\n \"active\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/apps";
let payload = json!({
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": (
json!({
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
})
),
"roles": (),
"active": false
});
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}}/domains/:domain/apps \
--header 'content-type: application/json' \
--data '{
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false
}'
echo '{
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
],
"roles": [],
"active": false
}' | \
http POST {{baseUrl}}/domains/:domain/apps \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "externalId": "",\n "name": "",\n "domain": "",\n "accountId": "",\n "permissions": [\n {\n "id": "",\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n }\n ],\n "roles": [],\n "active": false\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/apps
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"externalId": "",
"name": "",
"domain": "",
"accountId": "",
"permissions": [
[
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
]
],
"roles": [],
"active": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps")! 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()
PATCH
deactivateAnApp
{{baseUrl}}/domains/:domain/apps/:id/deactivate
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/:id/deactivate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/apps/:id/deactivate")
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/:id/deactivate"
response = HTTP::Client.patch url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/apps/:id/deactivate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/apps/:id/deactivate");
var request = new RestRequest("", Method.Patch);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/:id/deactivate"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/apps/:id/deactivate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/apps/:id/deactivate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/:id/deactivate"))
.method("PATCH", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/deactivate")
.patch(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/apps/:id/deactivate")
.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('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/deactivate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/deactivate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/:id/deactivate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps/:id/deactivate',
method: 'PATCH',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/deactivate")
.patch(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/:id/deactivate',
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: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/deactivate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/deactivate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/deactivate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/:id/deactivate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps/:id/deactivate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/apps/:id/deactivate" in
Client.call `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/:id/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/deactivate');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/:id/deactivate');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/apps/:id/deactivate');
$request->setRequestMethod('PATCH');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/:id/deactivate' -Method PATCH
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/:id/deactivate' -Method PATCH
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PATCH", "/baseUrl/domains/:domain/apps/:id/deactivate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/:id/deactivate"
response = requests.patch(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/:id/deactivate"
response <- VERB("PATCH", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/:id/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.patch('/baseUrl/domains/:domain/apps/:id/deactivate') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/apps/:id/deactivate";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/apps/:id/deactivate
http PATCH {{baseUrl}}/domains/:domain/apps/:id/deactivate
wget --quiet \
--method PATCH \
--output-document \
- {{baseUrl}}/domains/:domain/apps/:id/deactivate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/:id/deactivate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
deleteApp
{{baseUrl}}/domains/:domain/apps/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/domains/:domain/apps/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/:id"
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}}/domains/:domain/apps/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/apps/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/:id"
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/domains/:domain/apps/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/domains/:domain/apps/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/:id"))
.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}}/domains/:domain/apps/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/domains/:domain/apps/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/domains/:domain/apps/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/apps/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/:id';
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}}/domains/:domain/apps/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/apps/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/domains/:domain/apps/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/apps/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/:id';
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}}/domains/:domain/apps/:id"]
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}}/domains/:domain/apps/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/:id",
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}}/domains/:domain/apps/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/apps/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/domains/:domain/apps/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/:id")
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/domains/:domain/apps/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/apps/:id";
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}}/domains/:domain/apps/:id
http DELETE {{baseUrl}}/domains/:domain/apps/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/domains/:domain/apps/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getApiKeysByAppId
{{baseUrl}}/domains/:domain/apps/:id/keys
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/:id/keys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/apps/:id/keys")
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/:id/keys"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/apps/:id/keys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/apps/:id/keys");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/:id/keys"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/apps/:id/keys HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/apps/:id/keys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/:id/keys"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/keys")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/apps/:id/keys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/apps/:id/keys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/:id/keys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/:id/keys';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps/:id/keys',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/keys")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/:id/keys',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/:id/keys'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/apps/:id/keys');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/:id/keys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/:id/keys';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps/:id/keys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/apps/:id/keys" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/:id/keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/apps/:id/keys');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/:id/keys');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/apps/:id/keys');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/:id/keys' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/:id/keys' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/apps/:id/keys")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/:id/keys"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/:id/keys"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/:id/keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/apps/:id/keys') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/apps/:id/keys";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/apps/:id/keys
http GET {{baseUrl}}/domains/:domain/apps/:id/keys
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/apps/:id/keys
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/:id/keys")! 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
getAppById
{{baseUrl}}/domains/:domain/apps/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/apps/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/apps/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/apps/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/apps/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/apps/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/apps/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/apps/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/apps/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/apps/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/apps/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/apps/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/apps/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/apps/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/apps/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/apps/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/apps/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/apps/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/apps/:id
http GET {{baseUrl}}/domains/:domain/apps/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/apps/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getAppsByExternalId
{{baseUrl}}/domains/:domain/apps/externalId/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/externalId/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/apps/externalId/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/externalId/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/apps/externalId/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/apps/externalId/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/externalId/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/apps/externalId/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/apps/externalId/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/externalId/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/externalId/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/apps/externalId/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/apps/externalId/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/externalId/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/externalId/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps/externalId/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/externalId/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/externalId/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/externalId/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/apps/externalId/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/externalId/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/externalId/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps/externalId/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/apps/externalId/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/externalId/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/apps/externalId/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/externalId/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/apps/externalId/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/externalId/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/externalId/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/apps/externalId/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/externalId/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/externalId/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/externalId/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/apps/externalId/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/apps/externalId/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/apps/externalId/:id
http GET {{baseUrl}}/domains/:domain/apps/externalId/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/apps/externalId/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/externalId/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getCryptoKeysByAppId
{{baseUrl}}/domains/:domain/apps/:id/crypto_keys
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys")
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/apps/:id/crypto_keys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/apps/:id/crypto_keys");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/apps/:id/crypto_keys HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/:id/crypto_keys"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/crypto_keys")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/apps/:id/crypto_keys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/crypto_keys")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/:id/crypto_keys',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps/:id/crypto_keys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/:id/crypto_keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/:id/crypto_keys');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/apps/:id/crypto_keys');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/:id/crypto_keys' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/apps/:id/crypto_keys")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/:id/crypto_keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/apps/:id/crypto_keys') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/apps/:id/crypto_keys
http GET {{baseUrl}}/domains/:domain/apps/:id/crypto_keys
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/apps/:id/crypto_keys
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/:id/crypto_keys")! 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()
PATCH
updateAppPermissions
{{baseUrl}}/domains/:domain/apps/:id/permissions
QUERY PARAMS
domain
id
BODY json
{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/:id/permissions");
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 \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/apps/:id/permissions" {:content-type :json
:form-params {:action ""
:permissions [{:id ""
:group ""
:name ""
:domain ""
:forAccounts false
:forApplications false}]}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/:id/permissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/apps/:id/permissions"),
Content = new StringContent("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/apps/:id/permissions");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/:id/permissions"
payload := strings.NewReader("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/apps/:id/permissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 186
{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/apps/:id/permissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/:id/permissions"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/permissions")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/apps/:id/permissions")
.header("content-type", "application/json")
.body("{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
.asString();
const data = JSON.stringify({
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/permissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/permissions',
headers: {'content-type': 'application/json'},
data: {
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/:id/permissions';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"action":"","permissions":[{"id":"","group":"","name":"","domain":"","forAccounts":false,"forApplications":false}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps/:id/permissions',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "action": "",\n "permissions": [\n {\n "id": "",\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/permissions")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/:id/permissions',
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({
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/permissions',
headers: {'content-type': 'application/json'},
body: {
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/permissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/permissions',
headers: {'content-type': 'application/json'},
data: {
action: '',
permissions: [
{
id: '',
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/:id/permissions';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"action":"","permissions":[{"id":"","group":"","name":"","domain":"","forAccounts":false,"forApplications":false}]}'
};
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 = @{ @"action": @"",
@"permissions": @[ @{ @"id": @"", @"group": @"", @"name": @"", @"domain": @"", @"forAccounts": @NO, @"forApplications": @NO } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps/:id/permissions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/apps/:id/permissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/:id/permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'action' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/permissions', [
'body' => '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/:id/permissions');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'action' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'action' => '',
'permissions' => [
[
'id' => '',
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/apps/:id/permissions');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/:id/permissions' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/:id/permissions' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/apps/:id/permissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/:id/permissions"
payload = {
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": False,
"forApplications": False
}
]
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/:id/permissions"
payload <- "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/:id/permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/domains/:domain/apps/:id/permissions') do |req|
req.body = "{\n \"action\": \"\",\n \"permissions\": [\n {\n \"id\": \"\",\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n }\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}}/domains/:domain/apps/:id/permissions";
let payload = json!({
"action": "",
"permissions": (
json!({
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/apps/:id/permissions \
--header 'content-type: application/json' \
--data '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}'
echo '{
"action": "",
"permissions": [
{
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
]
}' | \
http PATCH {{baseUrl}}/domains/:domain/apps/:id/permissions \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "action": "",\n "permissions": [\n {\n "id": "",\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/apps/:id/permissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"action": "",
"permissions": [
[
"id": "",
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/:id/permissions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
updateAppRoles
{{baseUrl}}/domains/:domain/apps/:id/roles
QUERY PARAMS
domain
id
BODY json
{
"action": "",
"roles": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/apps/:id/roles");
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 \"action\": \"\",\n \"roles\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/apps/:id/roles" {:content-type :json
:form-params {:action ""
:roles []}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/apps/:id/roles"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"action\": \"\",\n \"roles\": []\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/apps/:id/roles"),
Content = new StringContent("{\n \"action\": \"\",\n \"roles\": []\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}}/domains/:domain/apps/:id/roles");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"action\": \"\",\n \"roles\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/apps/:id/roles"
payload := strings.NewReader("{\n \"action\": \"\",\n \"roles\": []\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/apps/:id/roles HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 33
{
"action": "",
"roles": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/apps/:id/roles")
.setHeader("content-type", "application/json")
.setBody("{\n \"action\": \"\",\n \"roles\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/apps/:id/roles"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"action\": \"\",\n \"roles\": []\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 \"action\": \"\",\n \"roles\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/roles")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/apps/:id/roles")
.header("content-type", "application/json")
.body("{\n \"action\": \"\",\n \"roles\": []\n}")
.asString();
const data = JSON.stringify({
action: '',
roles: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/roles');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/roles',
headers: {'content-type': 'application/json'},
data: {action: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/apps/:id/roles';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"action":"","roles":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/apps/:id/roles',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "action": "",\n "roles": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"action\": \"\",\n \"roles\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/apps/:id/roles")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/apps/:id/roles',
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({action: '', roles: []}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/roles',
headers: {'content-type': 'application/json'},
body: {action: '', roles: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/roles');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
action: '',
roles: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/apps/:id/roles',
headers: {'content-type': 'application/json'},
data: {action: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/apps/:id/roles';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"action":"","roles":[]}'
};
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 = @{ @"action": @"",
@"roles": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/apps/:id/roles"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/apps/:id/roles" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"action\": \"\",\n \"roles\": []\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/apps/:id/roles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'action' => '',
'roles' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/apps/:id/roles', [
'body' => '{
"action": "",
"roles": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/apps/:id/roles');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'action' => '',
'roles' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'action' => '',
'roles' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/apps/:id/roles');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/apps/:id/roles' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"action": "",
"roles": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/apps/:id/roles' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"action": "",
"roles": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"action\": \"\",\n \"roles\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/apps/:id/roles", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/apps/:id/roles"
payload = {
"action": "",
"roles": []
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/apps/:id/roles"
payload <- "{\n \"action\": \"\",\n \"roles\": []\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/apps/:id/roles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"action\": \"\",\n \"roles\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/domains/:domain/apps/:id/roles') do |req|
req.body = "{\n \"action\": \"\",\n \"roles\": []\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}}/domains/:domain/apps/:id/roles";
let payload = json!({
"action": "",
"roles": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/apps/:id/roles \
--header 'content-type: application/json' \
--data '{
"action": "",
"roles": []
}'
echo '{
"action": "",
"roles": []
}' | \
http PATCH {{baseUrl}}/domains/:domain/apps/:id/roles \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "action": "",\n "roles": []\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/apps/:id/roles
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"action": "",
"roles": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/apps/:id/roles")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Verify a one-time password
{{baseUrl}}/domains/:domain/otp/verify
QUERY PARAMS
domain
BODY json
{
"passwordId": "",
"password": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/otp/verify");
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 \"passwordId\": \"\",\n \"password\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/otp/verify" {:content-type :json
:form-params {:passwordId ""
:password ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/otp/verify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"passwordId\": \"\",\n \"password\": \"\"\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}}/domains/:domain/otp/verify"),
Content = new StringContent("{\n \"passwordId\": \"\",\n \"password\": \"\"\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}}/domains/:domain/otp/verify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"passwordId\": \"\",\n \"password\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/otp/verify"
payload := strings.NewReader("{\n \"passwordId\": \"\",\n \"password\": \"\"\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/domains/:domain/otp/verify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 40
{
"passwordId": "",
"password": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/otp/verify")
.setHeader("content-type", "application/json")
.setBody("{\n \"passwordId\": \"\",\n \"password\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/otp/verify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"passwordId\": \"\",\n \"password\": \"\"\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 \"passwordId\": \"\",\n \"password\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/otp/verify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/otp/verify")
.header("content-type", "application/json")
.body("{\n \"passwordId\": \"\",\n \"password\": \"\"\n}")
.asString();
const data = JSON.stringify({
passwordId: '',
password: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/otp/verify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/otp/verify',
headers: {'content-type': 'application/json'},
data: {passwordId: '', password: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/otp/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"passwordId":"","password":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/otp/verify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "passwordId": "",\n "password": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"passwordId\": \"\",\n \"password\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/otp/verify")
.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/domains/:domain/otp/verify',
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({passwordId: '', password: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/otp/verify',
headers: {'content-type': 'application/json'},
body: {passwordId: '', password: ''},
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}}/domains/:domain/otp/verify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
passwordId: '',
password: ''
});
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}}/domains/:domain/otp/verify',
headers: {'content-type': 'application/json'},
data: {passwordId: '', password: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/otp/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"passwordId":"","password":""}'
};
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 = @{ @"passwordId": @"",
@"password": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/otp/verify"]
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}}/domains/:domain/otp/verify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"passwordId\": \"\",\n \"password\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/otp/verify",
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([
'passwordId' => '',
'password' => ''
]),
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}}/domains/:domain/otp/verify', [
'body' => '{
"passwordId": "",
"password": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/otp/verify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'passwordId' => '',
'password' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'passwordId' => '',
'password' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/otp/verify');
$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}}/domains/:domain/otp/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"passwordId": "",
"password": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/otp/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"passwordId": "",
"password": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"passwordId\": \"\",\n \"password\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/otp/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/otp/verify"
payload = {
"passwordId": "",
"password": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/otp/verify"
payload <- "{\n \"passwordId\": \"\",\n \"password\": \"\"\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}}/domains/:domain/otp/verify")
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 \"passwordId\": \"\",\n \"password\": \"\"\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/domains/:domain/otp/verify') do |req|
req.body = "{\n \"passwordId\": \"\",\n \"password\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/otp/verify";
let payload = json!({
"passwordId": "",
"password": ""
});
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}}/domains/:domain/otp/verify \
--header 'content-type: application/json' \
--data '{
"passwordId": "",
"password": ""
}'
echo '{
"passwordId": "",
"password": ""
}' | \
http POST {{baseUrl}}/domains/:domain/otp/verify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "passwordId": "",\n "password": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/otp/verify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"passwordId": "",
"password": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/otp/verify")! 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
Verify a passwordless token
{{baseUrl}}/domains/:domain/passwordless/verify
QUERY PARAMS
domain
BODY json
{
"token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/passwordless/verify");
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 \"token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/passwordless/verify" {:content-type :json
:form-params {:token ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/passwordless/verify"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/passwordless/verify"),
Content = new StringContent("{\n \"token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/passwordless/verify");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/passwordless/verify"
payload := strings.NewReader("{\n \"token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/domains/:domain/passwordless/verify HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/passwordless/verify")
.setHeader("content-type", "application/json")
.setBody("{\n \"token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/passwordless/verify"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/passwordless/verify")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/passwordless/verify")
.header("content-type", "application/json")
.body("{\n \"token\": \"\"\n}")
.asString();
const data = JSON.stringify({
token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/passwordless/verify');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/passwordless/verify',
headers: {'content-type': 'application/json'},
data: {token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/passwordless/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/passwordless/verify',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/passwordless/verify")
.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/domains/:domain/passwordless/verify',
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({token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/passwordless/verify',
headers: {'content-type': 'application/json'},
body: {token: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/domains/:domain/passwordless/verify');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/passwordless/verify',
headers: {'content-type': 'application/json'},
data: {token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/passwordless/verify';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/passwordless/verify"]
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}}/domains/:domain/passwordless/verify" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/passwordless/verify",
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([
'token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/domains/:domain/passwordless/verify', [
'body' => '{
"token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/passwordless/verify');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/passwordless/verify');
$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}}/domains/:domain/passwordless/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/passwordless/verify' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/passwordless/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/passwordless/verify"
payload = { "token": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/passwordless/verify"
payload <- "{\n \"token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/passwordless/verify")
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 \"token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/domains/:domain/passwordless/verify') do |req|
req.body = "{\n \"token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/passwordless/verify";
let payload = json!({"token": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/domains/:domain/passwordless/verify \
--header 'content-type: application/json' \
--data '{
"token": ""
}'
echo '{
"token": ""
}' | \
http POST {{baseUrl}}/domains/:domain/passwordless/verify \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "token": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/passwordless/verify
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["token": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/passwordless/verify")! 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
authenticate
{{baseUrl}}/domains/:domain/auth/authenticate
QUERY PARAMS
domain
BODY json
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/auth/authenticate");
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/auth/authenticate" {:content-type :json
:form-params {:domain ""
:identifier ""
:password ""
:token ""
:deviceId ""
:externalSessionId ""
:sourceIp ""
:userAgent ""
:restrictions {:permissions []
:roles []}}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/auth/authenticate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/authenticate"),
Content = new StringContent("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/authenticate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/auth/authenticate"
payload := strings.NewReader("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/authenticate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 217
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/auth/authenticate")
.setHeader("content-type", "application/json")
.setBody("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/auth/authenticate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/authenticate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/auth/authenticate")
.header("content-type", "application/json")
.body("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.asString();
const data = JSON.stringify({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/auth/authenticate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/authenticate',
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/auth/authenticate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/auth/authenticate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/authenticate")
.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/domains/:domain/auth/authenticate',
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({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/authenticate',
headers: {'content-type': 'application/json'},
body: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
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}}/domains/:domain/auth/authenticate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
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}}/domains/:domain/auth/authenticate',
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/auth/authenticate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
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 = @{ @"domain": @"",
@"identifier": @"",
@"password": @"",
@"token": @"",
@"deviceId": @"",
@"externalSessionId": @"",
@"sourceIp": @"",
@"userAgent": @"",
@"restrictions": @{ @"permissions": @[ ], @"roles": @[ ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/auth/authenticate"]
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}}/domains/:domain/auth/authenticate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/auth/authenticate",
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([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]),
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}}/domains/:domain/auth/authenticate', [
'body' => '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/auth/authenticate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/auth/authenticate');
$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}}/domains/:domain/auth/authenticate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/auth/authenticate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/auth/authenticate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/auth/authenticate"
payload = {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/auth/authenticate"
payload <- "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/authenticate")
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/authenticate') do |req|
req.body = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/auth/authenticate";
let payload = json!({
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": json!({
"permissions": (),
"roles": ()
})
});
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}}/domains/:domain/auth/authenticate \
--header 'content-type: application/json' \
--data '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
echo '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}' | \
http POST {{baseUrl}}/domains/:domain/auth/authenticate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\n }\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/auth/authenticate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": [
"permissions": [],
"roles": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/auth/authenticate")! 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
clear
{{baseUrl}}/domains/:domain/auth/exchange/clear
QUERY PARAMS
tokenType
domain
BODY json
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=");
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/auth/exchange/clear" {:query-params {:tokenType ""}
:content-type :json
:form-params {:domain ""
:identifier ""
:password ""
:token ""
:deviceId ""
:externalSessionId ""
:sourceIp ""
:userAgent ""
:restrictions {:permissions []
:roles []}}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/exchange/clear?tokenType="),
Content = new StringContent("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/exchange/clear?tokenType=");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType="
payload := strings.NewReader("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/exchange/clear?tokenType= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 217
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=")
.setHeader("content-type", "application/json")
.setBody("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType="))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=")
.header("content-type", "application/json")
.body("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.asString();
const data = JSON.stringify({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/exchange/clear',
params: {tokenType: ''},
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=")
.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/domains/:domain/auth/exchange/clear?tokenType=',
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({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/exchange/clear',
qs: {tokenType: ''},
headers: {'content-type': 'application/json'},
body: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
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}}/domains/:domain/auth/exchange/clear');
req.query({
tokenType: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
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}}/domains/:domain/auth/exchange/clear',
params: {tokenType: ''},
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
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 = @{ @"domain": @"",
@"identifier": @"",
@"password": @"",
@"token": @"",
@"deviceId": @"",
@"externalSessionId": @"",
@"sourceIp": @"",
@"userAgent": @"",
@"restrictions": @{ @"permissions": @[ ], @"roles": @[ ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType="]
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}}/domains/:domain/auth/exchange/clear?tokenType=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=",
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([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]),
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}}/domains/:domain/auth/exchange/clear?tokenType=', [
'body' => '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/auth/exchange/clear');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'tokenType' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/auth/exchange/clear');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'tokenType' => ''
]));
$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}}/domains/:domain/auth/exchange/clear?tokenType=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/auth/exchange/clear?tokenType=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/auth/exchange/clear"
querystring = {"tokenType":""}
payload = {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/auth/exchange/clear"
queryString <- list(tokenType = "")
payload <- "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=")
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/exchange/clear') do |req|
req.params['tokenType'] = ''
req.body = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/auth/exchange/clear";
let querystring = [
("tokenType", ""),
];
let payload = json!({
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": json!({
"permissions": (),
"roles": ()
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=' \
--header 'content-type: application/json' \
--data '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
echo '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}' | \
http POST '{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=' \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\n }\n}' \
--output-document \
- '{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": [
"permissions": [],
"roles": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/auth/exchange/clear?tokenType=")! 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
exchange
{{baseUrl}}/domains/:domain/auth/exchange
QUERY PARAMS
from
to
domain
BODY json
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/auth/exchange?from=&to=");
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/auth/exchange" {:query-params {:from ""
:to ""}
:content-type :json
:form-params {:domain ""
:identifier ""
:password ""
:token ""
:deviceId ""
:externalSessionId ""
:sourceIp ""
:userAgent ""
:restrictions {:permissions []
:roles []}}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/auth/exchange?from=&to="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/exchange?from=&to="),
Content = new StringContent("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/exchange?from=&to=");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/auth/exchange?from=&to="
payload := strings.NewReader("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/exchange?from=&to= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 217
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/auth/exchange?from=&to=")
.setHeader("content-type", "application/json")
.setBody("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/auth/exchange?from=&to="))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/exchange?from=&to=")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/auth/exchange?from=&to=")
.header("content-type", "application/json")
.body("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.asString();
const data = JSON.stringify({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/auth/exchange?from=&to=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/exchange',
params: {from: '', to: ''},
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/auth/exchange?from=&to=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/auth/exchange?from=&to=',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/exchange?from=&to=")
.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/domains/:domain/auth/exchange?from=&to=',
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({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/exchange',
qs: {from: '', to: ''},
headers: {'content-type': 'application/json'},
body: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
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}}/domains/:domain/auth/exchange');
req.query({
from: '',
to: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
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}}/domains/:domain/auth/exchange',
params: {from: '', to: ''},
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/auth/exchange?from=&to=';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
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 = @{ @"domain": @"",
@"identifier": @"",
@"password": @"",
@"token": @"",
@"deviceId": @"",
@"externalSessionId": @"",
@"sourceIp": @"",
@"userAgent": @"",
@"restrictions": @{ @"permissions": @[ ], @"roles": @[ ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/auth/exchange?from=&to="]
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}}/domains/:domain/auth/exchange?from=&to=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/auth/exchange?from=&to=",
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([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]),
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}}/domains/:domain/auth/exchange?from=&to=', [
'body' => '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/auth/exchange');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'from' => '',
'to' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/auth/exchange');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'from' => '',
'to' => ''
]));
$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}}/domains/:domain/auth/exchange?from=&to=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/auth/exchange?from=&to=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/auth/exchange?from=&to=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/auth/exchange"
querystring = {"from":"","to":""}
payload = {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/auth/exchange"
queryString <- list(
from = "",
to = ""
)
payload <- "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/auth/exchange?from=&to=")
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/exchange') do |req|
req.params['from'] = ''
req.params['to'] = ''
req.body = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/auth/exchange";
let querystring = [
("from", ""),
("to", ""),
];
let payload = json!({
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": json!({
"permissions": (),
"roles": ()
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/domains/:domain/auth/exchange?from=&to=' \
--header 'content-type: application/json' \
--data '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
echo '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}' | \
http POST '{{baseUrl}}/domains/:domain/auth/exchange?from=&to=' \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\n }\n}' \
--output-document \
- '{{baseUrl}}/domains/:domain/auth/exchange?from=&to='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": [
"permissions": [],
"roles": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/auth/exchange?from=&to=")! 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
getExchangeAttempts
{{baseUrl}}/domains/:domain/auth/exchange/attempts
QUERY PARAMS
entityId
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/auth/exchange/attempts" {:query-params {:entityId ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/auth/exchange/attempts?entityId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId="))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/auth/exchange/attempts',
params: {entityId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/auth/exchange/attempts?entityId=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/auth/exchange/attempts',
qs: {entityId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/auth/exchange/attempts');
req.query({
entityId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/auth/exchange/attempts',
params: {entityId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/auth/exchange/attempts');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'entityId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/auth/exchange/attempts');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'entityId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/auth/exchange/attempts?entityId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/auth/exchange/attempts"
querystring = {"entityId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/auth/exchange/attempts"
queryString <- list(entityId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/auth/exchange/attempts') do |req|
req.params['entityId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/auth/exchange/attempts";
let querystring = [
("entityId", ""),
];
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}}/domains/:domain/auth/exchange/attempts?entityId='
http GET '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/auth/exchange/attempts?entityId=")! 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
logout
{{baseUrl}}/domains/:domain/auth/logout
QUERY PARAMS
domain
BODY json
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/auth/logout");
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/auth/logout" {:content-type :json
:form-params {:domain ""
:identifier ""
:password ""
:token ""
:deviceId ""
:externalSessionId ""
:sourceIp ""
:userAgent ""
:restrictions {:permissions []
:roles []}}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/auth/logout"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/logout"),
Content = new StringContent("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/logout");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/auth/logout"
payload := strings.NewReader("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/logout HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 217
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/auth/logout")
.setHeader("content-type", "application/json")
.setBody("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/auth/logout"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/logout")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/auth/logout")
.header("content-type", "application/json")
.body("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.asString();
const data = JSON.stringify({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/auth/logout');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/logout',
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/auth/logout';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/auth/logout',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/logout")
.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/domains/:domain/auth/logout',
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({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/logout',
headers: {'content-type': 'application/json'},
body: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
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}}/domains/:domain/auth/logout');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
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}}/domains/:domain/auth/logout',
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/auth/logout';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
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 = @{ @"domain": @"",
@"identifier": @"",
@"password": @"",
@"token": @"",
@"deviceId": @"",
@"externalSessionId": @"",
@"sourceIp": @"",
@"userAgent": @"",
@"restrictions": @{ @"permissions": @[ ], @"roles": @[ ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/auth/logout"]
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}}/domains/:domain/auth/logout" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/auth/logout",
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([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]),
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}}/domains/:domain/auth/logout', [
'body' => '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/auth/logout');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/auth/logout');
$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}}/domains/:domain/auth/logout' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/auth/logout' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/auth/logout", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/auth/logout"
payload = {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/auth/logout"
payload <- "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/logout")
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/logout') do |req|
req.body = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/auth/logout";
let payload = json!({
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": json!({
"permissions": (),
"roles": ()
})
});
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}}/domains/:domain/auth/logout \
--header 'content-type: application/json' \
--data '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
echo '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}' | \
http POST {{baseUrl}}/domains/:domain/auth/logout \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\n }\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/auth/logout
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": [
"permissions": [],
"roles": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/auth/logout")! 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
refresh
{{baseUrl}}/domains/:domain/auth/refresh
QUERY PARAMS
domain
BODY json
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/auth/refresh");
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/auth/refresh" {:content-type :json
:form-params {:domain ""
:identifier ""
:password ""
:token ""
:deviceId ""
:externalSessionId ""
:sourceIp ""
:userAgent ""
:restrictions {:permissions []
:roles []}}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/auth/refresh"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/refresh"),
Content = new StringContent("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/refresh");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/auth/refresh"
payload := strings.NewReader("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/refresh HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 217
{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/auth/refresh")
.setHeader("content-type", "application/json")
.setBody("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/auth/refresh"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/auth/refresh")
.header("content-type", "application/json")
.body("{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
.asString();
const data = JSON.stringify({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/auth/refresh');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/refresh',
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/auth/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/auth/refresh',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/auth/refresh")
.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/domains/:domain/auth/refresh',
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({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/auth/refresh',
headers: {'content-type': 'application/json'},
body: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
},
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}}/domains/:domain/auth/refresh');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {
permissions: [],
roles: []
}
});
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}}/domains/:domain/auth/refresh',
headers: {'content-type': 'application/json'},
data: {
domain: '',
identifier: '',
password: '',
token: '',
deviceId: '',
externalSessionId: '',
sourceIp: '',
userAgent: '',
restrictions: {permissions: [], roles: []}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/auth/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domain":"","identifier":"","password":"","token":"","deviceId":"","externalSessionId":"","sourceIp":"","userAgent":"","restrictions":{"permissions":[],"roles":[]}}'
};
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 = @{ @"domain": @"",
@"identifier": @"",
@"password": @"",
@"token": @"",
@"deviceId": @"",
@"externalSessionId": @"",
@"sourceIp": @"",
@"userAgent": @"",
@"restrictions": @{ @"permissions": @[ ], @"roles": @[ ] } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/auth/refresh"]
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}}/domains/:domain/auth/refresh" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/auth/refresh",
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([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]),
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}}/domains/:domain/auth/refresh', [
'body' => '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/auth/refresh');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'domain' => '',
'identifier' => '',
'password' => '',
'token' => '',
'deviceId' => '',
'externalSessionId' => '',
'sourceIp' => '',
'userAgent' => '',
'restrictions' => [
'permissions' => [
],
'roles' => [
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/auth/refresh');
$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}}/domains/:domain/auth/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/auth/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/auth/refresh", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/auth/refresh"
payload = {
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/auth/refresh"
payload <- "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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}}/domains/:domain/auth/refresh")
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 \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\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/domains/:domain/auth/refresh') do |req|
req.body = "{\n \"domain\": \"\",\n \"identifier\": \"\",\n \"password\": \"\",\n \"token\": \"\",\n \"deviceId\": \"\",\n \"externalSessionId\": \"\",\n \"sourceIp\": \"\",\n \"userAgent\": \"\",\n \"restrictions\": {\n \"permissions\": [],\n \"roles\": []\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/auth/refresh";
let payload = json!({
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": json!({
"permissions": (),
"roles": ()
})
});
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}}/domains/:domain/auth/refresh \
--header 'content-type: application/json' \
--data '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}'
echo '{
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": {
"permissions": [],
"roles": []
}
}' | \
http POST {{baseUrl}}/domains/:domain/auth/refresh \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "domain": "",\n "identifier": "",\n "password": "",\n "token": "",\n "deviceId": "",\n "externalSessionId": "",\n "sourceIp": "",\n "userAgent": "",\n "restrictions": {\n "permissions": [],\n "roles": []\n }\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/auth/refresh
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"domain": "",
"identifier": "",
"password": "",
"token": "",
"deviceId": "",
"externalSessionId": "",
"sourceIp": "",
"userAgent": "",
"restrictions": [
"permissions": [],
"roles": []
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/auth/refresh")! 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()
PATCH
activateClient
{{baseUrl}}/domains/:domain/clients/:id/activate
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/clients/:id/activate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/clients/:id/activate")
require "http/client"
url = "{{baseUrl}}/domains/:domain/clients/:id/activate"
response = HTTP::Client.patch url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/clients/:id/activate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/clients/:id/activate");
var request = new RestRequest("", Method.Patch);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/clients/:id/activate"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/clients/:id/activate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/clients/:id/activate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/clients/:id/activate"))
.method("PATCH", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id/activate")
.patch(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/clients/:id/activate")
.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('PATCH', '{{baseUrl}}/domains/:domain/clients/:id/activate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/clients/:id/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/clients/:id/activate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/clients/:id/activate',
method: 'PATCH',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id/activate")
.patch(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/clients/:id/activate',
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: 'PATCH',
url: '{{baseUrl}}/domains/:domain/clients/:id/activate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/clients/:id/activate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/clients/:id/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/clients/:id/activate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/clients/:id/activate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/clients/:id/activate" in
Client.call `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/clients/:id/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/clients/:id/activate');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/clients/:id/activate');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/clients/:id/activate');
$request->setRequestMethod('PATCH');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/clients/:id/activate' -Method PATCH
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/clients/:id/activate' -Method PATCH
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PATCH", "/baseUrl/domains/:domain/clients/:id/activate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/clients/:id/activate"
response = requests.patch(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/clients/:id/activate"
response <- VERB("PATCH", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/clients/:id/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.patch('/baseUrl/domains/:domain/clients/:id/activate') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/clients/:id/activate";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/clients/:id/activate
http PATCH {{baseUrl}}/domains/:domain/clients/:id/activate
wget --quiet \
--method PATCH \
--output-document \
- {{baseUrl}}/domains/:domain/clients/:id/activate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/clients/:id/activate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
createClient
{{baseUrl}}/domains/:domain/clients
QUERY PARAMS
domain
BODY json
{
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/clients");
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 \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/clients" {:content-type :json
:form-params {:externalId ""
:domain ""
:accountId ""
:name ""
:baseUrl ""
:clientType ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/clients"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\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}}/domains/:domain/clients"),
Content = new StringContent("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\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}}/domains/:domain/clients");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/clients"
payload := strings.NewReader("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\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/domains/:domain/clients HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 108
{
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/clients")
.setHeader("content-type", "application/json")
.setBody("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/clients"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\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 \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/clients")
.header("content-type", "application/json")
.body("{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}")
.asString();
const data = JSON.stringify({
externalId: '',
domain: '',
accountId: '',
name: '',
baseUrl: '',
clientType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/clients');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/clients',
headers: {'content-type': 'application/json'},
data: {
externalId: '',
domain: '',
accountId: '',
name: '',
baseUrl: '',
clientType: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/clients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"externalId":"","domain":"","accountId":"","name":"","baseUrl":"","clientType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/clients',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "externalId": "",\n "domain": "",\n "accountId": "",\n "name": "",\n "baseUrl": "",\n "clientType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients")
.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/domains/:domain/clients',
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({
externalId: '',
domain: '',
accountId: '',
name: '',
baseUrl: '',
clientType: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/clients',
headers: {'content-type': 'application/json'},
body: {
externalId: '',
domain: '',
accountId: '',
name: '',
baseUrl: '',
clientType: ''
},
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}}/domains/:domain/clients');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
externalId: '',
domain: '',
accountId: '',
name: '',
baseUrl: '',
clientType: ''
});
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}}/domains/:domain/clients',
headers: {'content-type': 'application/json'},
data: {
externalId: '',
domain: '',
accountId: '',
name: '',
baseUrl: '',
clientType: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/clients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"externalId":"","domain":"","accountId":"","name":"","baseUrl":"","clientType":""}'
};
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 = @{ @"externalId": @"",
@"domain": @"",
@"accountId": @"",
@"name": @"",
@"baseUrl": @"",
@"clientType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/clients"]
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}}/domains/:domain/clients" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/clients",
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([
'externalId' => '',
'domain' => '',
'accountId' => '',
'name' => '',
'baseUrl' => '',
'clientType' => ''
]),
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}}/domains/:domain/clients', [
'body' => '{
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/clients');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'externalId' => '',
'domain' => '',
'accountId' => '',
'name' => '',
'baseUrl' => '',
'clientType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'externalId' => '',
'domain' => '',
'accountId' => '',
'name' => '',
'baseUrl' => '',
'clientType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/clients');
$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}}/domains/:domain/clients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/clients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/clients", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/clients"
payload = {
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/clients"
payload <- "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\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}}/domains/:domain/clients")
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 \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\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/domains/:domain/clients') do |req|
req.body = "{\n \"externalId\": \"\",\n \"domain\": \"\",\n \"accountId\": \"\",\n \"name\": \"\",\n \"baseUrl\": \"\",\n \"clientType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/clients";
let payload = json!({
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
});
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}}/domains/:domain/clients \
--header 'content-type: application/json' \
--data '{
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
}'
echo '{
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
}' | \
http POST {{baseUrl}}/domains/:domain/clients \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "externalId": "",\n "domain": "",\n "accountId": "",\n "name": "",\n "baseUrl": "",\n "clientType": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/clients
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"externalId": "",
"domain": "",
"accountId": "",
"name": "",
"baseUrl": "",
"clientType": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/clients")! 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()
PATCH
deactivateClient
{{baseUrl}}/domains/:domain/clients/:id/deactivate
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/clients/:id/deactivate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/clients/:id/deactivate")
require "http/client"
url = "{{baseUrl}}/domains/:domain/clients/:id/deactivate"
response = HTTP::Client.patch url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/clients/:id/deactivate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/clients/:id/deactivate");
var request = new RestRequest("", Method.Patch);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/clients/:id/deactivate"
req, _ := http.NewRequest("PATCH", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/clients/:id/deactivate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/clients/:id/deactivate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/clients/:id/deactivate"))
.method("PATCH", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id/deactivate")
.patch(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/clients/:id/deactivate")
.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('PATCH', '{{baseUrl}}/domains/:domain/clients/:id/deactivate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/clients/:id/deactivate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/clients/:id/deactivate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/clients/:id/deactivate',
method: 'PATCH',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id/deactivate")
.patch(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/clients/:id/deactivate',
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: 'PATCH',
url: '{{baseUrl}}/domains/:domain/clients/:id/deactivate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/clients/:id/deactivate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/clients/:id/deactivate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/clients/:id/deactivate';
const options = {method: 'PATCH'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/clients/:id/deactivate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/clients/:id/deactivate" in
Client.call `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/clients/:id/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/clients/:id/deactivate');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/clients/:id/deactivate');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/clients/:id/deactivate');
$request->setRequestMethod('PATCH');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/clients/:id/deactivate' -Method PATCH
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/clients/:id/deactivate' -Method PATCH
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("PATCH", "/baseUrl/domains/:domain/clients/:id/deactivate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/clients/:id/deactivate"
response = requests.patch(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/clients/:id/deactivate"
response <- VERB("PATCH", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/clients/:id/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.patch('/baseUrl/domains/:domain/clients/:id/deactivate') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/clients/:id/deactivate";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/clients/:id/deactivate
http PATCH {{baseUrl}}/domains/:domain/clients/:id/deactivate
wget --quiet \
--method PATCH \
--output-document \
- {{baseUrl}}/domains/:domain/clients/:id/deactivate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/clients/:id/deactivate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
deleteClient
{{baseUrl}}/domains/:domain/clients/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/clients/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/domains/:domain/clients/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/clients/:id"
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}}/domains/:domain/clients/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/clients/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/clients/:id"
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/domains/:domain/clients/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/domains/:domain/clients/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/clients/:id"))
.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}}/domains/:domain/clients/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/domains/:domain/clients/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/domains/:domain/clients/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/clients/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/clients/:id';
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}}/domains/:domain/clients/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/clients/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/clients/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/domains/:domain/clients/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/clients/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/clients/:id';
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}}/domains/:domain/clients/:id"]
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}}/domains/:domain/clients/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/clients/:id",
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}}/domains/:domain/clients/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/clients/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/clients/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/clients/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/clients/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/domains/:domain/clients/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/clients/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/clients/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/clients/:id")
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/domains/:domain/clients/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/clients/:id";
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}}/domains/:domain/clients/:id
http DELETE {{baseUrl}}/domains/:domain/clients/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/domains/:domain/clients/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/clients/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getApiKeysByClientId
{{baseUrl}}/domains/:domain/clients/:id/keys
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/clients/:id/keys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/clients/:id/keys")
require "http/client"
url = "{{baseUrl}}/domains/:domain/clients/:id/keys"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/clients/:id/keys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/clients/:id/keys");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/clients/:id/keys"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/clients/:id/keys HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/clients/:id/keys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/clients/:id/keys"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id/keys")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/clients/:id/keys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/clients/:id/keys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/clients/:id/keys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/clients/:id/keys';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/clients/:id/keys',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id/keys")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/clients/:id/keys',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/clients/:id/keys'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/clients/:id/keys');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/clients/:id/keys'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/clients/:id/keys';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/clients/:id/keys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/clients/:id/keys" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/clients/:id/keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/clients/:id/keys');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/clients/:id/keys');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/clients/:id/keys');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/clients/:id/keys' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/clients/:id/keys' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/clients/:id/keys")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/clients/:id/keys"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/clients/:id/keys"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/clients/:id/keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/clients/:id/keys') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/clients/:id/keys";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/clients/:id/keys
http GET {{baseUrl}}/domains/:domain/clients/:id/keys
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/clients/:id/keys
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/clients/:id/keys")! 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
getClientById
{{baseUrl}}/domains/:domain/clients/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/clients/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/clients/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/clients/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/clients/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/clients/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/clients/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/clients/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/clients/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/clients/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/clients/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/clients/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/clients/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/clients/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/clients/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/clients/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/clients/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/clients/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/clients/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/clients/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/clients/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/clients/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/clients/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/clients/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/clients/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/clients/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/clients/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/clients/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/clients/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/clients/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/clients/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/clients/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/clients/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/clients/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/clients/:id
http GET {{baseUrl}}/domains/:domain/clients/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/clients/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/clients/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getClientsByDomain
{{baseUrl}}/domains/:domain/clients
QUERY PARAMS
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/clients");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/clients")
require "http/client"
url = "{{baseUrl}}/domains/:domain/clients"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/clients"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/clients");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/clients"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/clients HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/clients")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/clients"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/clients")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/clients');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/clients'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/clients';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/clients',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/clients',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/clients'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/clients');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/clients'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/clients';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/clients"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/clients" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/clients');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/clients');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/clients');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/clients' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/clients' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/clients")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/clients"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/clients"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/clients') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/clients";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/clients
http GET {{baseUrl}}/domains/:domain/clients
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/clients
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/clients")! 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
getClientsByExternalId
{{baseUrl}}/domains/:domain/clients/externalId/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/clients/externalId/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/clients/externalId/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/clients/externalId/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/clients/externalId/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/clients/externalId/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/clients/externalId/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/clients/externalId/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/clients/externalId/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/clients/externalId/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/externalId/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/clients/externalId/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/clients/externalId/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/clients/externalId/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/clients/externalId/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/clients/externalId/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/clients/externalId/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/clients/externalId/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/clients/externalId/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/clients/externalId/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/clients/externalId/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/clients/externalId/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/clients/externalId/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/clients/externalId/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/clients/externalId/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/clients/externalId/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/clients/externalId/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/clients/externalId/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/clients/externalId/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/clients/externalId/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/clients/externalId/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/clients/externalId/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/clients/externalId/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/clients/externalId/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/clients/externalId/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/clients/externalId/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/clients/externalId/:id
http GET {{baseUrl}}/domains/:domain/clients/externalId/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/clients/externalId/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/clients/externalId/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
addIdentifier
{{baseUrl}}/domains/:domain/credentials/:id/identifiers
QUERY PARAMS
domain
id
BODY json
{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/credentials/:id/identifiers");
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 \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/credentials/:id/identifiers" {:content-type :json
:form-params {:oldIdentifier ""
:identifiers [{:type ""
:identifier ""
:active false}]}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/credentials/:id/identifiers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/credentials/:id/identifiers"),
Content = new StringContent("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/credentials/:id/identifiers");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/credentials/:id/identifiers"
payload := strings.NewReader("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/credentials/:id/identifiers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 125
{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
.setHeader("content-type", "application/json")
.setBody("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/credentials/:id/identifiers"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
.header("content-type", "application/json")
.body("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
.asString();
const data = JSON.stringify({
oldIdentifier: '',
identifiers: [
{
type: '',
identifier: '',
active: false
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/credentials/:id/identifiers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/credentials/:id/identifiers',
headers: {'content-type': 'application/json'},
data: {oldIdentifier: '', identifiers: [{type: '', identifier: '', active: false}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/credentials/:id/identifiers';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"oldIdentifier":"","identifiers":[{"type":"","identifier":"","active":false}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/credentials/:id/identifiers',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "oldIdentifier": "",\n "identifiers": [\n {\n "type": "",\n "identifier": "",\n "active": false\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/credentials/:id/identifiers',
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({oldIdentifier: '', identifiers: [{type: '', identifier: '', active: false}]}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/credentials/:id/identifiers',
headers: {'content-type': 'application/json'},
body: {oldIdentifier: '', identifiers: [{type: '', identifier: '', active: false}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/credentials/:id/identifiers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
oldIdentifier: '',
identifiers: [
{
type: '',
identifier: '',
active: false
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/credentials/:id/identifiers',
headers: {'content-type': 'application/json'},
data: {oldIdentifier: '', identifiers: [{type: '', identifier: '', active: false}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/credentials/:id/identifiers';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"oldIdentifier":"","identifiers":[{"type":"","identifier":"","active":false}]}'
};
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 = @{ @"oldIdentifier": @"",
@"identifiers": @[ @{ @"type": @"", @"identifier": @"", @"active": @NO } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/credentials/:id/identifiers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/credentials/:id/identifiers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/credentials/:id/identifiers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'oldIdentifier' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/credentials/:id/identifiers', [
'body' => '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/credentials/:id/identifiers');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'oldIdentifier' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'oldIdentifier' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/credentials/:id/identifiers');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/credentials/:id/identifiers' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/credentials/:id/identifiers' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/credentials/:id/identifiers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/credentials/:id/identifiers"
payload = {
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": False
}
]
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/credentials/:id/identifiers"
payload <- "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/domains/:domain/credentials/:id/identifiers') do |req|
req.body = "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\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}}/domains/:domain/credentials/:id/identifiers";
let payload = json!({
"oldIdentifier": "",
"identifiers": (
json!({
"type": "",
"identifier": "",
"active": false
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/credentials/:id/identifiers \
--header 'content-type: application/json' \
--data '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}'
echo '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}' | \
http PATCH {{baseUrl}}/domains/:domain/credentials/:id/identifiers \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "oldIdentifier": "",\n "identifiers": [\n {\n "type": "",\n "identifier": "",\n "active": false\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/credentials/:id/identifiers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"oldIdentifier": "",
"identifiers": [
[
"type": "",
"identifier": "",
"active": false
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/credentials/:id/identifiers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
deleteIdentifier
{{baseUrl}}/domains/:domain/credentials/:id/identifiers
QUERY PARAMS
domain
id
BODY json
{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/credentials/:id/identifiers");
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 \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/domains/:domain/credentials/:id/identifiers" {:content-type :json
:form-params {:oldIdentifier ""
:identifiers [{:type ""
:identifier ""
:active false}]}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/credentials/:id/identifiers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"
response = HTTP::Client.delete url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/credentials/:id/identifiers"),
Content = new StringContent("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/credentials/:id/identifiers");
var request = new RestRequest("", Method.Delete);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/credentials/:id/identifiers"
payload := strings.NewReader("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
req, _ := http.NewRequest("DELETE", 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))
}
DELETE /baseUrl/domains/:domain/credentials/:id/identifiers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 125
{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
.setHeader("content-type", "application/json")
.setBody("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/credentials/:id/identifiers"))
.header("content-type", "application/json")
.method("DELETE", HttpRequest.BodyPublishers.ofString("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
.delete(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
.header("content-type", "application/json")
.body("{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
.asString();
const data = JSON.stringify({
oldIdentifier: '',
identifiers: [
{
type: '',
identifier: '',
active: false
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/domains/:domain/credentials/:id/identifiers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/credentials/:id/identifiers',
headers: {'content-type': 'application/json'},
data: {oldIdentifier: '', identifiers: [{type: '', identifier: '', active: false}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/credentials/:id/identifiers';
const options = {
method: 'DELETE',
headers: {'content-type': 'application/json'},
body: '{"oldIdentifier":"","identifiers":[{"type":"","identifier":"","active":false}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/credentials/:id/identifiers',
method: 'DELETE',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "oldIdentifier": "",\n "identifiers": [\n {\n "type": "",\n "identifier": "",\n "active": false\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
.delete(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/credentials/:id/identifiers',
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({oldIdentifier: '', identifiers: [{type: '', identifier: '', active: false}]}));
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/credentials/:id/identifiers',
headers: {'content-type': 'application/json'},
body: {oldIdentifier: '', identifiers: [{type: '', identifier: '', active: false}]},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/domains/:domain/credentials/:id/identifiers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
oldIdentifier: '',
identifiers: [
{
type: '',
identifier: '',
active: false
}
]
});
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}}/domains/:domain/credentials/:id/identifiers',
headers: {'content-type': 'application/json'},
data: {oldIdentifier: '', identifiers: [{type: '', identifier: '', active: false}]}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/credentials/:id/identifiers';
const options = {
method: 'DELETE',
headers: {'content-type': 'application/json'},
body: '{"oldIdentifier":"","identifiers":[{"type":"","identifier":"","active":false}]}'
};
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 = @{ @"oldIdentifier": @"",
@"identifiers": @[ @{ @"type": @"", @"identifier": @"", @"active": @NO } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/credentials/:id/identifiers"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/domains/:domain/credentials/:id/identifiers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}" in
Client.call ~headers ~body `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/credentials/:id/identifiers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'oldIdentifier' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
]
]),
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('DELETE', '{{baseUrl}}/domains/:domain/credentials/:id/identifiers', [
'body' => '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/credentials/:id/identifiers');
$request->setMethod(HTTP_METH_DELETE);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'oldIdentifier' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'oldIdentifier' => '',
'identifiers' => [
[
'type' => '',
'identifier' => '',
'active' => null
]
]
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/credentials/:id/identifiers');
$request->setRequestMethod('DELETE');
$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}}/domains/:domain/credentials/:id/identifiers' -Method DELETE -Headers $headers -ContentType 'application/json' -Body '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/credentials/:id/identifiers' -Method DELETE -Headers $headers -ContentType 'application/json' -Body '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("DELETE", "/baseUrl/domains/:domain/credentials/:id/identifiers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/credentials/:id/identifiers"
payload = {
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": False
}
]
}
headers = {"content-type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/credentials/:id/identifiers"
payload <- "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"
encode <- "json"
response <- VERB("DELETE", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/credentials/:id/identifiers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.delete('/baseUrl/domains/:domain/credentials/:id/identifiers') do |req|
req.body = "{\n \"oldIdentifier\": \"\",\n \"identifiers\": [\n {\n \"type\": \"\",\n \"identifier\": \"\",\n \"active\": false\n }\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}}/domains/:domain/credentials/:id/identifiers";
let payload = json!({
"oldIdentifier": "",
"identifiers": (
json!({
"type": "",
"identifier": "",
"active": false
})
)
});
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("DELETE").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/domains/:domain/credentials/:id/identifiers \
--header 'content-type: application/json' \
--data '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}'
echo '{
"oldIdentifier": "",
"identifiers": [
{
"type": "",
"identifier": "",
"active": false
}
]
}' | \
http DELETE {{baseUrl}}/domains/:domain/credentials/:id/identifiers \
content-type:application/json
wget --quiet \
--method DELETE \
--header 'content-type: application/json' \
--body-data '{\n "oldIdentifier": "",\n "identifiers": [\n {\n "type": "",\n "identifier": "",\n "active": false\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/credentials/:id/identifiers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"oldIdentifier": "",
"identifiers": [
[
"type": "",
"identifier": "",
"active": false
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/credentials/:id/identifiers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
generateResetToken
{{baseUrl}}/domains/:domain/credentials/reset_token
QUERY PARAMS
domain
BODY json
{
"identifier": "",
"domain": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/credentials/reset_token");
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 \"identifier\": \"\",\n \"domain\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/credentials/reset_token" {:content-type :json
:form-params {:identifier ""
:domain ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/credentials/reset_token"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"identifier\": \"\",\n \"domain\": \"\"\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}}/domains/:domain/credentials/reset_token"),
Content = new StringContent("{\n \"identifier\": \"\",\n \"domain\": \"\"\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}}/domains/:domain/credentials/reset_token");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"identifier\": \"\",\n \"domain\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/credentials/reset_token"
payload := strings.NewReader("{\n \"identifier\": \"\",\n \"domain\": \"\"\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/domains/:domain/credentials/reset_token HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 38
{
"identifier": "",
"domain": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/credentials/reset_token")
.setHeader("content-type", "application/json")
.setBody("{\n \"identifier\": \"\",\n \"domain\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/credentials/reset_token"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"identifier\": \"\",\n \"domain\": \"\"\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 \"identifier\": \"\",\n \"domain\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/reset_token")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/credentials/reset_token")
.header("content-type", "application/json")
.body("{\n \"identifier\": \"\",\n \"domain\": \"\"\n}")
.asString();
const data = JSON.stringify({
identifier: '',
domain: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/credentials/reset_token');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/credentials/reset_token',
headers: {'content-type': 'application/json'},
data: {identifier: '', domain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/credentials/reset_token';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"identifier":"","domain":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/credentials/reset_token',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "identifier": "",\n "domain": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"identifier\": \"\",\n \"domain\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/reset_token")
.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/domains/:domain/credentials/reset_token',
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({identifier: '', domain: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/credentials/reset_token',
headers: {'content-type': 'application/json'},
body: {identifier: '', domain: ''},
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}}/domains/:domain/credentials/reset_token');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
identifier: '',
domain: ''
});
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}}/domains/:domain/credentials/reset_token',
headers: {'content-type': 'application/json'},
data: {identifier: '', domain: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/credentials/reset_token';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"identifier":"","domain":""}'
};
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 = @{ @"identifier": @"",
@"domain": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/credentials/reset_token"]
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}}/domains/:domain/credentials/reset_token" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"identifier\": \"\",\n \"domain\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/credentials/reset_token",
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([
'identifier' => '',
'domain' => ''
]),
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}}/domains/:domain/credentials/reset_token', [
'body' => '{
"identifier": "",
"domain": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/credentials/reset_token');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'identifier' => '',
'domain' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'identifier' => '',
'domain' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/credentials/reset_token');
$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}}/domains/:domain/credentials/reset_token' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"identifier": "",
"domain": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/credentials/reset_token' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"identifier": "",
"domain": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"identifier\": \"\",\n \"domain\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/credentials/reset_token", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/credentials/reset_token"
payload = {
"identifier": "",
"domain": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/credentials/reset_token"
payload <- "{\n \"identifier\": \"\",\n \"domain\": \"\"\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}}/domains/:domain/credentials/reset_token")
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 \"identifier\": \"\",\n \"domain\": \"\"\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/domains/:domain/credentials/reset_token') do |req|
req.body = "{\n \"identifier\": \"\",\n \"domain\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/credentials/reset_token";
let payload = json!({
"identifier": "",
"domain": ""
});
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}}/domains/:domain/credentials/reset_token \
--header 'content-type: application/json' \
--data '{
"identifier": "",
"domain": ""
}'
echo '{
"identifier": "",
"domain": ""
}' | \
http POST {{baseUrl}}/domains/:domain/credentials/reset_token \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "identifier": "",\n "domain": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/credentials/reset_token
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"identifier": "",
"domain": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/credentials/reset_token")! 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
resetPassword
{{baseUrl}}/domains/:domain/credentials/reset
QUERY PARAMS
domain
BODY json
{
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/credentials/reset");
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 \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/credentials/reset" {:content-type :json
:form-params {:byToken false
:resetToken ""
:identifier ""
:domain ""
:oldPassword ""
:plainPassword ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/credentials/reset"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\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}}/domains/:domain/credentials/reset"),
Content = new StringContent("{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\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}}/domains/:domain/credentials/reset");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/credentials/reset"
payload := strings.NewReader("{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\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/domains/:domain/credentials/reset HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 122
{
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/credentials/reset")
.setHeader("content-type", "application/json")
.setBody("{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/credentials/reset"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\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 \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/reset")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/credentials/reset")
.header("content-type", "application/json")
.body("{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}")
.asString();
const data = JSON.stringify({
byToken: false,
resetToken: '',
identifier: '',
domain: '',
oldPassword: '',
plainPassword: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/credentials/reset');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/credentials/reset',
headers: {'content-type': 'application/json'},
data: {
byToken: false,
resetToken: '',
identifier: '',
domain: '',
oldPassword: '',
plainPassword: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/credentials/reset';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"byToken":false,"resetToken":"","identifier":"","domain":"","oldPassword":"","plainPassword":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/credentials/reset',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "byToken": false,\n "resetToken": "",\n "identifier": "",\n "domain": "",\n "oldPassword": "",\n "plainPassword": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/reset")
.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/domains/:domain/credentials/reset',
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({
byToken: false,
resetToken: '',
identifier: '',
domain: '',
oldPassword: '',
plainPassword: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/credentials/reset',
headers: {'content-type': 'application/json'},
body: {
byToken: false,
resetToken: '',
identifier: '',
domain: '',
oldPassword: '',
plainPassword: ''
},
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}}/domains/:domain/credentials/reset');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
byToken: false,
resetToken: '',
identifier: '',
domain: '',
oldPassword: '',
plainPassword: ''
});
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}}/domains/:domain/credentials/reset',
headers: {'content-type': 'application/json'},
data: {
byToken: false,
resetToken: '',
identifier: '',
domain: '',
oldPassword: '',
plainPassword: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/credentials/reset';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"byToken":false,"resetToken":"","identifier":"","domain":"","oldPassword":"","plainPassword":""}'
};
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 = @{ @"byToken": @NO,
@"resetToken": @"",
@"identifier": @"",
@"domain": @"",
@"oldPassword": @"",
@"plainPassword": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/credentials/reset"]
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}}/domains/:domain/credentials/reset" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/credentials/reset",
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([
'byToken' => null,
'resetToken' => '',
'identifier' => '',
'domain' => '',
'oldPassword' => '',
'plainPassword' => ''
]),
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}}/domains/:domain/credentials/reset', [
'body' => '{
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/credentials/reset');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'byToken' => null,
'resetToken' => '',
'identifier' => '',
'domain' => '',
'oldPassword' => '',
'plainPassword' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'byToken' => null,
'resetToken' => '',
'identifier' => '',
'domain' => '',
'oldPassword' => '',
'plainPassword' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/credentials/reset');
$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}}/domains/:domain/credentials/reset' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/credentials/reset' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/credentials/reset", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/credentials/reset"
payload = {
"byToken": False,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/credentials/reset"
payload <- "{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\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}}/domains/:domain/credentials/reset")
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 \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\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/domains/:domain/credentials/reset') do |req|
req.body = "{\n \"byToken\": false,\n \"resetToken\": \"\",\n \"identifier\": \"\",\n \"domain\": \"\",\n \"oldPassword\": \"\",\n \"plainPassword\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/credentials/reset";
let payload = json!({
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
});
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}}/domains/:domain/credentials/reset \
--header 'content-type: application/json' \
--data '{
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
}'
echo '{
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
}' | \
http POST {{baseUrl}}/domains/:domain/credentials/reset \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "byToken": false,\n "resetToken": "",\n "identifier": "",\n "domain": "",\n "oldPassword": "",\n "plainPassword": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/credentials/reset
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"byToken": false,
"resetToken": "",
"identifier": "",
"domain": "",
"oldPassword": "",
"plainPassword": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/credentials/reset")! 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()
PATCH
updatePassword
{{baseUrl}}/domains/:domain/credentials/:id/password
QUERY PARAMS
domain
id
BODY json
{
"plainPassword": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/credentials/:id/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 \"plainPassword\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/credentials/:id/password" {:content-type :json
:form-params {:plainPassword ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/credentials/:id/password"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"plainPassword\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/credentials/:id/password"),
Content = new StringContent("{\n \"plainPassword\": \"\"\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}}/domains/:domain/credentials/:id/password");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"plainPassword\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/credentials/:id/password"
payload := strings.NewReader("{\n \"plainPassword\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/credentials/:id/password HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"plainPassword": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/credentials/:id/password")
.setHeader("content-type", "application/json")
.setBody("{\n \"plainPassword\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/credentials/:id/password"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"plainPassword\": \"\"\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 \"plainPassword\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/:id/password")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/credentials/:id/password")
.header("content-type", "application/json")
.body("{\n \"plainPassword\": \"\"\n}")
.asString();
const data = JSON.stringify({
plainPassword: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/credentials/:id/password');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/credentials/:id/password',
headers: {'content-type': 'application/json'},
data: {plainPassword: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/credentials/:id/password';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"plainPassword":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/credentials/:id/password',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "plainPassword": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"plainPassword\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/credentials/:id/password")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/credentials/:id/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({plainPassword: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/credentials/:id/password',
headers: {'content-type': 'application/json'},
body: {plainPassword: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/credentials/:id/password');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
plainPassword: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/credentials/:id/password',
headers: {'content-type': 'application/json'},
data: {plainPassword: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/credentials/:id/password';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"plainPassword":""}'
};
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 = @{ @"plainPassword": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/credentials/:id/password"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/credentials/:id/password" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"plainPassword\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/credentials/:id/password",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'plainPassword' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/credentials/:id/password', [
'body' => '{
"plainPassword": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/credentials/:id/password');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'plainPassword' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'plainPassword' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/credentials/:id/password');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/credentials/:id/password' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"plainPassword": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/credentials/:id/password' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"plainPassword": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"plainPassword\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/credentials/:id/password", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/credentials/:id/password"
payload = { "plainPassword": "" }
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/credentials/:id/password"
payload <- "{\n \"plainPassword\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/credentials/:id/password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"plainPassword\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/domains/:domain/credentials/:id/password') do |req|
req.body = "{\n \"plainPassword\": \"\"\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}}/domains/:domain/credentials/:id/password";
let payload = json!({"plainPassword": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/credentials/:id/password \
--header 'content-type: application/json' \
--data '{
"plainPassword": ""
}'
echo '{
"plainPassword": ""
}' | \
http PATCH {{baseUrl}}/domains/:domain/credentials/:id/password \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "plainPassword": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/credentials/:id/password
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["plainPassword": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/credentials/:id/password")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
deleteCryptoKey
{{baseUrl}}/domains/:domain/kms/keys/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/kms/keys/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/domains/:domain/kms/keys/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/kms/keys/:id"
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}}/domains/:domain/kms/keys/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/kms/keys/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/kms/keys/:id"
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/domains/:domain/kms/keys/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/domains/:domain/kms/keys/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/kms/keys/:id"))
.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}}/domains/:domain/kms/keys/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/domains/:domain/kms/keys/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/domains/:domain/kms/keys/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/kms/keys/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/kms/keys/:id';
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}}/domains/:domain/kms/keys/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/kms/keys/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/kms/keys/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/kms/keys/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/domains/:domain/kms/keys/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/kms/keys/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/kms/keys/:id';
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}}/domains/:domain/kms/keys/:id"]
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}}/domains/:domain/kms/keys/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/kms/keys/:id",
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}}/domains/:domain/kms/keys/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/kms/keys/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/kms/keys/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/kms/keys/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/kms/keys/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/domains/:domain/kms/keys/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/kms/keys/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/kms/keys/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/kms/keys/:id")
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/domains/:domain/kms/keys/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/kms/keys/:id";
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}}/domains/:domain/kms/keys/:id
http DELETE {{baseUrl}}/domains/:domain/kms/keys/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/domains/:domain/kms/keys/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/kms/keys/:id")! 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
generateCryptoKey
{{baseUrl}}/domains/:domain/kms/generator
QUERY PARAMS
domain
BODY json
{
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/kms/generator");
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 \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/kms/generator" {:content-type :json
:form-params {:algorithm ""
:size ""
:accountId ""
:appId ""
:keyType ""
:name ""
:persist false
:passcodeProtected false
:passcode ""}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/kms/generator"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\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}}/domains/:domain/kms/generator"),
Content = new StringContent("{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\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}}/domains/:domain/kms/generator");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/kms/generator"
payload := strings.NewReader("{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\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/domains/:domain/kms/generator HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 168
{
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/kms/generator")
.setHeader("content-type", "application/json")
.setBody("{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/kms/generator"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\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 \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/kms/generator")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/kms/generator")
.header("content-type", "application/json")
.body("{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}")
.asString();
const data = JSON.stringify({
algorithm: '',
size: '',
accountId: '',
appId: '',
keyType: '',
name: '',
persist: false,
passcodeProtected: false,
passcode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/kms/generator');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/kms/generator',
headers: {'content-type': 'application/json'},
data: {
algorithm: '',
size: '',
accountId: '',
appId: '',
keyType: '',
name: '',
persist: false,
passcodeProtected: false,
passcode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/kms/generator';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"algorithm":"","size":"","accountId":"","appId":"","keyType":"","name":"","persist":false,"passcodeProtected":false,"passcode":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/kms/generator',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "algorithm": "",\n "size": "",\n "accountId": "",\n "appId": "",\n "keyType": "",\n "name": "",\n "persist": false,\n "passcodeProtected": false,\n "passcode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/kms/generator")
.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/domains/:domain/kms/generator',
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({
algorithm: '',
size: '',
accountId: '',
appId: '',
keyType: '',
name: '',
persist: false,
passcodeProtected: false,
passcode: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/kms/generator',
headers: {'content-type': 'application/json'},
body: {
algorithm: '',
size: '',
accountId: '',
appId: '',
keyType: '',
name: '',
persist: false,
passcodeProtected: false,
passcode: ''
},
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}}/domains/:domain/kms/generator');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
algorithm: '',
size: '',
accountId: '',
appId: '',
keyType: '',
name: '',
persist: false,
passcodeProtected: false,
passcode: ''
});
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}}/domains/:domain/kms/generator',
headers: {'content-type': 'application/json'},
data: {
algorithm: '',
size: '',
accountId: '',
appId: '',
keyType: '',
name: '',
persist: false,
passcodeProtected: false,
passcode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/kms/generator';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"algorithm":"","size":"","accountId":"","appId":"","keyType":"","name":"","persist":false,"passcodeProtected":false,"passcode":""}'
};
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 = @{ @"algorithm": @"",
@"size": @"",
@"accountId": @"",
@"appId": @"",
@"keyType": @"",
@"name": @"",
@"persist": @NO,
@"passcodeProtected": @NO,
@"passcode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/kms/generator"]
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}}/domains/:domain/kms/generator" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/kms/generator",
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([
'algorithm' => '',
'size' => '',
'accountId' => '',
'appId' => '',
'keyType' => '',
'name' => '',
'persist' => null,
'passcodeProtected' => null,
'passcode' => ''
]),
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}}/domains/:domain/kms/generator', [
'body' => '{
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/kms/generator');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'algorithm' => '',
'size' => '',
'accountId' => '',
'appId' => '',
'keyType' => '',
'name' => '',
'persist' => null,
'passcodeProtected' => null,
'passcode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'algorithm' => '',
'size' => '',
'accountId' => '',
'appId' => '',
'keyType' => '',
'name' => '',
'persist' => null,
'passcodeProtected' => null,
'passcode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/kms/generator');
$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}}/domains/:domain/kms/generator' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/kms/generator' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/kms/generator", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/kms/generator"
payload = {
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": False,
"passcodeProtected": False,
"passcode": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/kms/generator"
payload <- "{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\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}}/domains/:domain/kms/generator")
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 \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\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/domains/:domain/kms/generator') do |req|
req.body = "{\n \"algorithm\": \"\",\n \"size\": \"\",\n \"accountId\": \"\",\n \"appId\": \"\",\n \"keyType\": \"\",\n \"name\": \"\",\n \"persist\": false,\n \"passcodeProtected\": false,\n \"passcode\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/kms/generator";
let payload = json!({
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
});
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}}/domains/:domain/kms/generator \
--header 'content-type: application/json' \
--data '{
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
}'
echo '{
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
}' | \
http POST {{baseUrl}}/domains/:domain/kms/generator \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "algorithm": "",\n "size": "",\n "accountId": "",\n "appId": "",\n "keyType": "",\n "name": "",\n "persist": false,\n "passcodeProtected": false,\n "passcode": ""\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/kms/generator
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"algorithm": "",
"size": "",
"accountId": "",
"appId": "",
"keyType": "",
"name": "",
"persist": false,
"passcodeProtected": false,
"passcode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/kms/generator")! 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
getCryptoKeyById
{{baseUrl}}/domains/:domain/kms/keys/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/kms/keys/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/kms/keys/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/kms/keys/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/kms/keys/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/kms/keys/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/kms/keys/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/kms/keys/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/kms/keys/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/kms/keys/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/kms/keys/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/kms/keys/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/kms/keys/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/kms/keys/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/kms/keys/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/kms/keys/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/kms/keys/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/kms/keys/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/kms/keys/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/kms/keys/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/kms/keys/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/kms/keys/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/kms/keys/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/kms/keys/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/kms/keys/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/kms/keys/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/kms/keys/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/kms/keys/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/kms/keys/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/kms/keys/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/kms/keys/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/kms/keys/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/kms/keys/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/kms/keys/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/kms/keys/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/kms/keys/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/kms/keys/:id
http GET {{baseUrl}}/domains/:domain/kms/keys/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/kms/keys/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/kms/keys/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getCryptoKeysByDomain
{{baseUrl}}/domains/:domain/kms/keys/
QUERY PARAMS
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/kms/keys/");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/kms/keys/")
require "http/client"
url = "{{baseUrl}}/domains/:domain/kms/keys/"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/kms/keys/"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/kms/keys/");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/kms/keys/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/kms/keys/ HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/kms/keys/")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/kms/keys/"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/kms/keys/")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/kms/keys/")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/kms/keys/');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/kms/keys/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/kms/keys/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/kms/keys/',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/kms/keys/")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/kms/keys/',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/kms/keys/'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/kms/keys/');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/kms/keys/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/kms/keys/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/kms/keys/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/kms/keys/" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/kms/keys/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/kms/keys/');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/kms/keys/');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/kms/keys/');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/kms/keys/' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/kms/keys/' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/kms/keys/")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/kms/keys/"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/kms/keys/"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/kms/keys/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/kms/keys/') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/kms/keys/";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/kms/keys/
http GET {{baseUrl}}/domains/:domain/kms/keys/
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/kms/keys/
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/kms/keys/")! 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
createPermission
{{baseUrl}}/domains/:domain/permissions
QUERY PARAMS
domain
BODY json
{
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/permissions");
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 \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/permissions" {:content-type :json
:form-params {:group ""
:name ""
:domain ""
:forAccounts false
:forApplications false}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/permissions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/permissions"),
Content = new StringContent("{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/permissions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/permissions"
payload := strings.NewReader("{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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/domains/:domain/permissions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 99
{
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/permissions")
.setHeader("content-type", "application/json")
.setBody("{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/permissions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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 \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/permissions")
.header("content-type", "application/json")
.body("{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}")
.asString();
const data = JSON.stringify({
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/permissions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/permissions',
headers: {'content-type': 'application/json'},
data: {group: '', name: '', domain: '', forAccounts: false, forApplications: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/permissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"group":"","name":"","domain":"","forAccounts":false,"forApplications":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/permissions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions")
.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/domains/:domain/permissions',
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({group: '', name: '', domain: '', forAccounts: false, forApplications: false}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/permissions',
headers: {'content-type': 'application/json'},
body: {group: '', name: '', domain: '', forAccounts: false, forApplications: false},
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}}/domains/:domain/permissions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
group: '',
name: '',
domain: '',
forAccounts: false,
forApplications: false
});
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}}/domains/:domain/permissions',
headers: {'content-type': 'application/json'},
data: {group: '', name: '', domain: '', forAccounts: false, forApplications: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/permissions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"group":"","name":"","domain":"","forAccounts":false,"forApplications":false}'
};
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 = @{ @"group": @"",
@"name": @"",
@"domain": @"",
@"forAccounts": @NO,
@"forApplications": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/permissions"]
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}}/domains/:domain/permissions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/permissions",
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([
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]),
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}}/domains/:domain/permissions', [
'body' => '{
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/permissions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'group' => '',
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/permissions');
$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}}/domains/:domain/permissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/permissions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/permissions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/permissions"
payload = {
"group": "",
"name": "",
"domain": "",
"forAccounts": False,
"forApplications": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/permissions"
payload <- "{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/permissions")
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 \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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/domains/:domain/permissions') do |req|
req.body = "{\n \"group\": \"\",\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/permissions";
let payload = json!({
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
});
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}}/domains/:domain/permissions \
--header 'content-type: application/json' \
--data '{
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}'
echo '{
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}' | \
http POST {{baseUrl}}/domains/:domain/permissions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "group": "",\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/permissions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"group": "",
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/permissions")! 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
deletePermission
{{baseUrl}}/domains/:domain/permissions/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/permissions/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/domains/:domain/permissions/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/permissions/:id"
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}}/domains/:domain/permissions/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/permissions/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/permissions/:id"
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/domains/:domain/permissions/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/domains/:domain/permissions/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/permissions/:id"))
.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}}/domains/:domain/permissions/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/domains/:domain/permissions/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/domains/:domain/permissions/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/permissions/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/permissions/:id';
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}}/domains/:domain/permissions/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/permissions/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/permissions/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/domains/:domain/permissions/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/domains/:domain/permissions/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/permissions/:id';
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}}/domains/:domain/permissions/:id"]
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}}/domains/:domain/permissions/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/permissions/:id",
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}}/domains/:domain/permissions/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/permissions/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/permissions/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/permissions/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/permissions/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/domains/:domain/permissions/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/permissions/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/permissions/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/permissions/:id")
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/domains/:domain/permissions/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/permissions/:id";
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}}/domains/:domain/permissions/:id
http DELETE {{baseUrl}}/domains/:domain/permissions/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/domains/:domain/permissions/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/permissions/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getAllPermissions
{{baseUrl}}/domains/:domain/permissions/
QUERY PARAMS
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/permissions/");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/permissions/")
require "http/client"
url = "{{baseUrl}}/domains/:domain/permissions/"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/permissions/"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/permissions/");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/permissions/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/permissions/ HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/permissions/")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/permissions/"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/permissions/")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/permissions/');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/permissions/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/permissions/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/permissions/',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/permissions/',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/permissions/'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/permissions/');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/permissions/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/permissions/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/permissions/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/permissions/" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/permissions/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/permissions/');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/permissions/');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/permissions/');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/permissions/' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/permissions/' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/permissions/")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/permissions/"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/permissions/"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/permissions/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/permissions/') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/permissions/";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/permissions/
http GET {{baseUrl}}/domains/:domain/permissions/
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/permissions/
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/permissions/")! 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
getPermissionById
{{baseUrl}}/domains/:domain/permissions/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/permissions/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/permissions/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/permissions/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/permissions/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/permissions/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/permissions/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/permissions/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/permissions/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/permissions/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/permissions/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/permissions/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/permissions/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/permissions/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/permissions/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/permissions/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/permissions/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/permissions/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/permissions/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/permissions/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/permissions/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/permissions/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/permissions/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/permissions/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/permissions/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/permissions/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/permissions/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/permissions/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/permissions/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/permissions/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/permissions/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/permissions/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/permissions/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/permissions/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/permissions/:id
http GET {{baseUrl}}/domains/:domain/permissions/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/permissions/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/permissions/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getPermissionsByGroupName
{{baseUrl}}/domains/:domain/permissions/group/:group
QUERY PARAMS
domain
group
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/permissions/group/:group");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/permissions/group/:group")
require "http/client"
url = "{{baseUrl}}/domains/:domain/permissions/group/:group"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/permissions/group/:group"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/permissions/group/:group");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/permissions/group/:group"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/permissions/group/:group HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/permissions/group/:group")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/permissions/group/:group"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/group/:group")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/permissions/group/:group")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/permissions/group/:group');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/permissions/group/:group'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/permissions/group/:group';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/permissions/group/:group',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/group/:group")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/permissions/group/:group',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/permissions/group/:group'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/permissions/group/:group');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/permissions/group/:group'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/permissions/group/:group';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/permissions/group/:group"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/permissions/group/:group" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/permissions/group/:group",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/permissions/group/:group');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/permissions/group/:group');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/permissions/group/:group');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/permissions/group/:group' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/permissions/group/:group' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/permissions/group/:group")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/permissions/group/:group"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/permissions/group/:group"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/permissions/group/:group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/permissions/group/:group') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/permissions/group/:group";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/permissions/group/:group
http GET {{baseUrl}}/domains/:domain/permissions/group/:group
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/permissions/group/:group
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/permissions/group/:group")! 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()
PATCH
patchPermission
{{baseUrl}}/domains/:domain/permissions/:id
QUERY PARAMS
domain
id
BODY json
{
"forAccounts": false,
"forApplications": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/permissions/:id");
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 \"forAccounts\": false,\n \"forApplications\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/permissions/:id" {:content-type :json
:form-params {:forAccounts false
:forApplications false}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/permissions/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"forAccounts\": false,\n \"forApplications\": false\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/permissions/:id"),
Content = new StringContent("{\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/permissions/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"forAccounts\": false,\n \"forApplications\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/permissions/:id"
payload := strings.NewReader("{\n \"forAccounts\": false,\n \"forApplications\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/permissions/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"forAccounts": false,
"forApplications": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/permissions/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"forAccounts\": false,\n \"forApplications\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/permissions/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"forAccounts\": false,\n \"forApplications\": false\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 \"forAccounts\": false,\n \"forApplications\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/permissions/:id")
.header("content-type", "application/json")
.body("{\n \"forAccounts\": false,\n \"forApplications\": false\n}")
.asString();
const data = JSON.stringify({
forAccounts: false,
forApplications: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/permissions/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/permissions/:id',
headers: {'content-type': 'application/json'},
data: {forAccounts: false, forApplications: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/permissions/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"forAccounts":false,"forApplications":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/permissions/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "forAccounts": false,\n "forApplications": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"forAccounts\": false,\n \"forApplications\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/permissions/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/permissions/:id',
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({forAccounts: false, forApplications: false}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/permissions/:id',
headers: {'content-type': 'application/json'},
body: {forAccounts: false, forApplications: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/permissions/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
forAccounts: false,
forApplications: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/permissions/:id',
headers: {'content-type': 'application/json'},
data: {forAccounts: false, forApplications: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/permissions/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"forAccounts":false,"forApplications":false}'
};
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 = @{ @"forAccounts": @NO,
@"forApplications": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/permissions/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/permissions/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"forAccounts\": false,\n \"forApplications\": false\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/permissions/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'forAccounts' => null,
'forApplications' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/permissions/:id', [
'body' => '{
"forAccounts": false,
"forApplications": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/permissions/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'forAccounts' => null,
'forApplications' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'forAccounts' => null,
'forApplications' => null
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/permissions/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/permissions/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"forAccounts": false,
"forApplications": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/permissions/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"forAccounts": false,
"forApplications": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"forAccounts\": false,\n \"forApplications\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/permissions/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/permissions/:id"
payload = {
"forAccounts": False,
"forApplications": False
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/permissions/:id"
payload <- "{\n \"forAccounts\": false,\n \"forApplications\": false\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/permissions/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"forAccounts\": false,\n \"forApplications\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/domains/:domain/permissions/:id') do |req|
req.body = "{\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/permissions/:id";
let payload = json!({
"forAccounts": false,
"forApplications": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/permissions/:id \
--header 'content-type: application/json' \
--data '{
"forAccounts": false,
"forApplications": false
}'
echo '{
"forAccounts": false,
"forApplications": false
}' | \
http PATCH {{baseUrl}}/domains/:domain/permissions/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "forAccounts": false,\n "forApplications": false\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/permissions/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"forAccounts": false,
"forApplications": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/permissions/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
createRole
{{baseUrl}}/domains/:domain/roles
QUERY PARAMS
domain
BODY json
{
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/roles");
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 \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/domains/:domain/roles" {:content-type :json
:form-params {:name ""
:domain ""
:forAccounts false
:forApplications false}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/roles"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/roles"),
Content = new StringContent("{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/roles");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/roles"
payload := strings.NewReader("{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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/domains/:domain/roles HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/domains/:domain/roles")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/roles"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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 \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/domains/:domain/roles")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}")
.asString();
const data = JSON.stringify({
name: '',
domain: '',
forAccounts: false,
forApplications: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/domains/:domain/roles');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/roles',
headers: {'content-type': 'application/json'},
data: {name: '', domain: '', forAccounts: false, forApplications: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/roles';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","domain":"","forAccounts":false,"forApplications":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/roles',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\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 \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles")
.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/domains/:domain/roles',
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: '', domain: '', forAccounts: false, forApplications: false}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/domains/:domain/roles',
headers: {'content-type': 'application/json'},
body: {name: '', domain: '', forAccounts: false, forApplications: false},
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}}/domains/:domain/roles');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
domain: '',
forAccounts: false,
forApplications: false
});
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}}/domains/:domain/roles',
headers: {'content-type': 'application/json'},
data: {name: '', domain: '', forAccounts: false, forApplications: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/roles';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","domain":"","forAccounts":false,"forApplications":false}'
};
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": @"",
@"domain": @"",
@"forAccounts": @NO,
@"forApplications": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/roles"]
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}}/domains/:domain/roles" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/roles",
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' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]),
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}}/domains/:domain/roles', [
'body' => '{
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/roles');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'domain' => '',
'forAccounts' => null,
'forApplications' => null
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/roles');
$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}}/domains/:domain/roles' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/roles' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/domains/:domain/roles", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/roles"
payload = {
"name": "",
"domain": "",
"forAccounts": False,
"forApplications": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/roles"
payload <- "{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/roles")
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 \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\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/domains/:domain/roles') do |req|
req.body = "{\n \"name\": \"\",\n \"domain\": \"\",\n \"forAccounts\": false,\n \"forApplications\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/roles";
let payload = json!({
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
});
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}}/domains/:domain/roles \
--header 'content-type: application/json' \
--data '{
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}'
echo '{
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
}' | \
http POST {{baseUrl}}/domains/:domain/roles \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "domain": "",\n "forAccounts": false,\n "forApplications": false\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/roles
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"domain": "",
"forAccounts": false,
"forApplications": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/roles")! 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
deleteRole
{{baseUrl}}/domains/:domain/roles/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/roles/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/domains/:domain/roles/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/roles/:id"
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}}/domains/:domain/roles/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/roles/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/roles/:id"
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/domains/:domain/roles/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/domains/:domain/roles/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/roles/:id"))
.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}}/domains/:domain/roles/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/domains/:domain/roles/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/domains/:domain/roles/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/roles/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/roles/:id';
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}}/domains/:domain/roles/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/:id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/roles/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/roles/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/domains/:domain/roles/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/domains/:domain/roles/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/roles/:id';
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}}/domains/:domain/roles/:id"]
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}}/domains/:domain/roles/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/roles/:id",
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}}/domains/:domain/roles/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/roles/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/roles/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/roles/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/roles/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/domains/:domain/roles/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/roles/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/roles/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/roles/:id")
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/domains/:domain/roles/:id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/roles/:id";
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}}/domains/:domain/roles/:id
http DELETE {{baseUrl}}/domains/:domain/roles/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/domains/:domain/roles/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/roles/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getAllRoles
{{baseUrl}}/domains/:domain/roles/
QUERY PARAMS
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/roles/");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/roles/")
require "http/client"
url = "{{baseUrl}}/domains/:domain/roles/"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/roles/"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/roles/");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/roles/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/roles/ HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/roles/")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/roles/"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/roles/")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/roles/');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/roles/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/roles/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/roles/',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/roles/',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/roles/'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/roles/');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/roles/'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/roles/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/roles/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/roles/" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/roles/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/roles/');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/roles/');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/roles/');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/roles/' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/roles/' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/roles/")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/roles/"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/roles/"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/roles/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/roles/') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/roles/";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/roles/
http GET {{baseUrl}}/domains/:domain/roles/
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/roles/
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/roles/")! 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
getRoleById
{{baseUrl}}/domains/:domain/roles/:id
QUERY PARAMS
domain
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/roles/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/roles/:id")
require "http/client"
url = "{{baseUrl}}/domains/:domain/roles/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/roles/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/roles/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/roles/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/roles/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/roles/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/roles/:id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/roles/:id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/roles/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/roles/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/roles/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/roles/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/roles/:id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/roles/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/roles/:id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/domains/:domain/roles/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/roles/:id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/roles/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/roles/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/roles/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/roles/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/roles/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/roles/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/roles/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/roles/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/roles/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/roles/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/roles/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/roles/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/roles/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/roles/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/roles/:id
http GET {{baseUrl}}/domains/:domain/roles/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/roles/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/roles/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getRoleByName
{{baseUrl}}/domains/:domain/roles/domain/name/:name
QUERY PARAMS
domain
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/roles/domain/name/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/domains/:domain/roles/domain/name/:name")
require "http/client"
url = "{{baseUrl}}/domains/:domain/roles/domain/name/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/roles/domain/name/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/domains/:domain/roles/domain/name/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/roles/domain/name/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/domains/:domain/roles/domain/name/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/domains/:domain/roles/domain/name/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/roles/domain/name/:name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/domain/name/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/domains/:domain/roles/domain/name/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/domains/:domain/roles/domain/name/:name');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/roles/domain/name/:name'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/roles/domain/name/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/roles/domain/name/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/domain/name/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/roles/domain/name/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/roles/domain/name/:name'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/domains/:domain/roles/domain/name/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/domains/:domain/roles/domain/name/:name'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/roles/domain/name/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/roles/domain/name/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/roles/domain/name/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/roles/domain/name/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/domains/:domain/roles/domain/name/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/roles/domain/name/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/domains/:domain/roles/domain/name/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/roles/domain/name/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/roles/domain/name/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/domains/:domain/roles/domain/name/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/roles/domain/name/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/roles/domain/name/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/roles/domain/name/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/domains/:domain/roles/domain/name/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/domains/:domain/roles/domain/name/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/domains/:domain/roles/domain/name/:name
http GET {{baseUrl}}/domains/:domain/roles/domain/name/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/domains/:domain/roles/domain/name/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/roles/domain/name/:name")! 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()
PATCH
patchRole
{{baseUrl}}/domains/:domain/roles/:id
QUERY PARAMS
domain
id
BODY json
{
"forAccounts": false,
"forApplications": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/domains/:domain/roles/:id");
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 \"forAccounts\": false,\n \"forApplications\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/domains/:domain/roles/:id" {:content-type :json
:form-params {:forAccounts false
:forApplications false}})
require "http/client"
url = "{{baseUrl}}/domains/:domain/roles/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"forAccounts\": false,\n \"forApplications\": false\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/domains/:domain/roles/:id"),
Content = new StringContent("{\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/roles/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"forAccounts\": false,\n \"forApplications\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/domains/:domain/roles/:id"
payload := strings.NewReader("{\n \"forAccounts\": false,\n \"forApplications\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/domains/:domain/roles/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"forAccounts": false,
"forApplications": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/domains/:domain/roles/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"forAccounts\": false,\n \"forApplications\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/domains/:domain/roles/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"forAccounts\": false,\n \"forApplications\": false\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 \"forAccounts\": false,\n \"forApplications\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/domains/:domain/roles/:id")
.header("content-type", "application/json")
.body("{\n \"forAccounts\": false,\n \"forApplications\": false\n}")
.asString();
const data = JSON.stringify({
forAccounts: false,
forApplications: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/domains/:domain/roles/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/roles/:id',
headers: {'content-type': 'application/json'},
data: {forAccounts: false, forApplications: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/domains/:domain/roles/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"forAccounts":false,"forApplications":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/domains/:domain/roles/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "forAccounts": false,\n "forApplications": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"forAccounts\": false,\n \"forApplications\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/domains/:domain/roles/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/domains/:domain/roles/:id',
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({forAccounts: false, forApplications: false}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/roles/:id',
headers: {'content-type': 'application/json'},
body: {forAccounts: false, forApplications: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/domains/:domain/roles/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
forAccounts: false,
forApplications: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/domains/:domain/roles/:id',
headers: {'content-type': 'application/json'},
data: {forAccounts: false, forApplications: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/domains/:domain/roles/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"forAccounts":false,"forApplications":false}'
};
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 = @{ @"forAccounts": @NO,
@"forApplications": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/domains/:domain/roles/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/domains/:domain/roles/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"forAccounts\": false,\n \"forApplications\": false\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/domains/:domain/roles/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'forAccounts' => null,
'forApplications' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/domains/:domain/roles/:id', [
'body' => '{
"forAccounts": false,
"forApplications": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/domains/:domain/roles/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'forAccounts' => null,
'forApplications' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'forAccounts' => null,
'forApplications' => null
]));
$request->setRequestUrl('{{baseUrl}}/domains/:domain/roles/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/domains/:domain/roles/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"forAccounts": false,
"forApplications": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/domains/:domain/roles/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"forAccounts": false,
"forApplications": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"forAccounts\": false,\n \"forApplications\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/domains/:domain/roles/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/domains/:domain/roles/:id"
payload = {
"forAccounts": False,
"forApplications": False
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/domains/:domain/roles/:id"
payload <- "{\n \"forAccounts\": false,\n \"forApplications\": false\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/domains/:domain/roles/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"forAccounts\": false,\n \"forApplications\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/domains/:domain/roles/:id') do |req|
req.body = "{\n \"forAccounts\": false,\n \"forApplications\": false\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}}/domains/:domain/roles/:id";
let payload = json!({
"forAccounts": false,
"forApplications": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/domains/:domain/roles/:id \
--header 'content-type: application/json' \
--data '{
"forAccounts": false,
"forApplications": false
}'
echo '{
"forAccounts": false,
"forApplications": false
}' | \
http PATCH {{baseUrl}}/domains/:domain/roles/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "forAccounts": false,\n "forApplications": false\n}' \
--output-document \
- {{baseUrl}}/domains/:domain/roles/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"forAccounts": false,
"forApplications": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/domains/:domain/roles/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Verify an email
{{baseUrl}}/verification/email
QUERY PARAMS
token
domain
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/verification/email?token=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/verification/email" {:query-params {:token ""}})
require "http/client"
url = "{{baseUrl}}/verification/email?token="
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/verification/email?token="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/verification/email?token=");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/verification/email?token="
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/verification/email?token= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/verification/email?token=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/verification/email?token="))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/verification/email?token=")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/verification/email?token=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/verification/email?token=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/verification/email',
params: {token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/verification/email?token=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/verification/email?token=',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/verification/email?token=")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/verification/email?token=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/verification/email',
qs: {token: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/verification/email');
req.query({
token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/verification/email',
params: {token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/verification/email?token=';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/verification/email?token="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/verification/email?token=" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/verification/email?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/verification/email?token=');
echo $response->getBody();
setUrl('{{baseUrl}}/verification/email');
$request->setMethod(HTTP_METH_POST);
$request->setQueryData([
'token' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/verification/email');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
'token' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/verification/email?token=' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/verification/email?token=' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/verification/email?token=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/verification/email"
querystring = {"token":""}
response = requests.post(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/verification/email"
queryString <- list(token = "")
response <- VERB("POST", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/verification/email?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/verification/email') do |req|
req.params['token'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/verification/email";
let querystring = [
("token", ""),
];
let client = reqwest::Client::new();
let response = client.post(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url '{{baseUrl}}/verification/email?token='
http POST '{{baseUrl}}/verification/email?token='
wget --quiet \
--method POST \
--output-document \
- '{{baseUrl}}/verification/email?token='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/verification/email?token=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()