AWS AppSync
POST
AssociateApi
{{baseUrl}}/v1/domainnames/:domainName/apiassociation
QUERY PARAMS
domainName
BODY json
{
"apiId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/domainnames/:domainName/apiassociation");
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 \"apiId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/domainnames/:domainName/apiassociation" {:content-type :json
:form-params {:apiId ""}})
require "http/client"
url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"apiId\": \"\"\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}}/v1/domainnames/:domainName/apiassociation"),
Content = new StringContent("{\n \"apiId\": \"\"\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}}/v1/domainnames/:domainName/apiassociation");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"apiId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
payload := strings.NewReader("{\n \"apiId\": \"\"\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/v1/domainnames/:domainName/apiassociation HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 17
{
"apiId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.setHeader("content-type", "application/json")
.setBody("{\n \"apiId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/domainnames/:domainName/apiassociation"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"apiId\": \"\"\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 \"apiId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.header("content-type", "application/json")
.body("{\n \"apiId\": \"\"\n}")
.asString();
const data = JSON.stringify({
apiId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/domainnames/:domainName/apiassociation',
headers: {'content-type': 'application/json'},
data: {apiId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/domainnames/:domainName/apiassociation';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"apiId":""}'
};
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}}/v1/domainnames/:domainName/apiassociation',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "apiId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"apiId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.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/v1/domainnames/:domainName/apiassociation',
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({apiId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/domainnames/:domainName/apiassociation',
headers: {'content-type': 'application/json'},
body: {apiId: ''},
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}}/v1/domainnames/:domainName/apiassociation');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
apiId: ''
});
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}}/v1/domainnames/:domainName/apiassociation',
headers: {'content-type': 'application/json'},
data: {apiId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/domainnames/:domainName/apiassociation';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"apiId":""}'
};
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 = @{ @"apiId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/domainnames/:domainName/apiassociation"]
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}}/v1/domainnames/:domainName/apiassociation" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"apiId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/domainnames/:domainName/apiassociation",
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([
'apiId' => ''
]),
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}}/v1/domainnames/:domainName/apiassociation', [
'body' => '{
"apiId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'apiId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'apiId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
$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}}/v1/domainnames/:domainName/apiassociation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"apiId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/domainnames/:domainName/apiassociation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"apiId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"apiId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/domainnames/:domainName/apiassociation", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
payload = { "apiId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
payload <- "{\n \"apiId\": \"\"\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}}/v1/domainnames/:domainName/apiassociation")
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 \"apiId\": \"\"\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/v1/domainnames/:domainName/apiassociation') do |req|
req.body = "{\n \"apiId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation";
let payload = json!({"apiId": ""});
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}}/v1/domainnames/:domainName/apiassociation \
--header 'content-type: application/json' \
--data '{
"apiId": ""
}'
echo '{
"apiId": ""
}' | \
http POST {{baseUrl}}/v1/domainnames/:domainName/apiassociation \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "apiId": ""\n}' \
--output-document \
- {{baseUrl}}/v1/domainnames/:domainName/apiassociation
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["apiId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/domainnames/:domainName/apiassociation")! 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
CreateApiCache
{{baseUrl}}/v1/apis/:apiId/ApiCaches
QUERY PARAMS
apiId
BODY json
{
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/ApiCaches");
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 \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/ApiCaches" {:content-type :json
:form-params {:ttl 0
:transitEncryptionEnabled false
:atRestEncryptionEnabled false
:apiCachingBehavior ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\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}}/v1/apis/:apiId/ApiCaches"),
Content = new StringContent("{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/ApiCaches");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
payload := strings.NewReader("{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\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/v1/apis/:apiId/ApiCaches HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 129
{
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.setHeader("content-type", "application/json")
.setBody("{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/ApiCaches"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.header("content-type", "application/json")
.body("{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
ttl: 0,
transitEncryptionEnabled: false,
atRestEncryptionEnabled: false,
apiCachingBehavior: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/ApiCaches');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches',
headers: {'content-type': 'application/json'},
data: {
ttl: 0,
transitEncryptionEnabled: false,
atRestEncryptionEnabled: false,
apiCachingBehavior: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/ApiCaches';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ttl":0,"transitEncryptionEnabled":false,"atRestEncryptionEnabled":false,"apiCachingBehavior":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ttl": 0,\n "transitEncryptionEnabled": false,\n "atRestEncryptionEnabled": false,\n "apiCachingBehavior": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.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/v1/apis/:apiId/ApiCaches',
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({
ttl: 0,
transitEncryptionEnabled: false,
atRestEncryptionEnabled: false,
apiCachingBehavior: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches',
headers: {'content-type': 'application/json'},
body: {
ttl: 0,
transitEncryptionEnabled: false,
atRestEncryptionEnabled: false,
apiCachingBehavior: '',
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/apis/:apiId/ApiCaches');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ttl: 0,
transitEncryptionEnabled: false,
atRestEncryptionEnabled: false,
apiCachingBehavior: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches',
headers: {'content-type': 'application/json'},
data: {
ttl: 0,
transitEncryptionEnabled: false,
atRestEncryptionEnabled: false,
apiCachingBehavior: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/ApiCaches';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ttl":0,"transitEncryptionEnabled":false,"atRestEncryptionEnabled":false,"apiCachingBehavior":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ttl": @0,
@"transitEncryptionEnabled": @NO,
@"atRestEncryptionEnabled": @NO,
@"apiCachingBehavior": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/ApiCaches"]
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}}/v1/apis/:apiId/ApiCaches" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/ApiCaches",
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([
'ttl' => 0,
'transitEncryptionEnabled' => null,
'atRestEncryptionEnabled' => null,
'apiCachingBehavior' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/apis/:apiId/ApiCaches', [
'body' => '{
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/ApiCaches');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ttl' => 0,
'transitEncryptionEnabled' => null,
'atRestEncryptionEnabled' => null,
'apiCachingBehavior' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ttl' => 0,
'transitEncryptionEnabled' => null,
'atRestEncryptionEnabled' => null,
'apiCachingBehavior' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/ApiCaches');
$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}}/v1/apis/:apiId/ApiCaches' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/ApiCaches' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/ApiCaches", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
payload = {
"ttl": 0,
"transitEncryptionEnabled": False,
"atRestEncryptionEnabled": False,
"apiCachingBehavior": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
payload <- "{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\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}}/v1/apis/:apiId/ApiCaches")
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 \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/apis/:apiId/ApiCaches') do |req|
req.body = "{\n \"ttl\": 0,\n \"transitEncryptionEnabled\": false,\n \"atRestEncryptionEnabled\": false,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches";
let payload = json!({
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
});
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}}/v1/apis/:apiId/ApiCaches \
--header 'content-type: application/json' \
--data '{
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
}'
echo '{
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/ApiCaches \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ttl": 0,\n "transitEncryptionEnabled": false,\n "atRestEncryptionEnabled": false,\n "apiCachingBehavior": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/ApiCaches
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ttl": 0,
"transitEncryptionEnabled": false,
"atRestEncryptionEnabled": false,
"apiCachingBehavior": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/ApiCaches")! 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
CreateApiKey
{{baseUrl}}/v1/apis/:apiId/apikeys
QUERY PARAMS
apiId
BODY json
{
"description": "",
"expires": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/apikeys");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"expires\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/apikeys" {:content-type :json
:form-params {:description ""
:expires 0}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/apikeys"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"expires\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/apis/:apiId/apikeys"),
Content = new StringContent("{\n \"description\": \"\",\n \"expires\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/apikeys");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"expires\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/apikeys"
payload := strings.NewReader("{\n \"description\": \"\",\n \"expires\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/apis/:apiId/apikeys HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 39
{
"description": "",
"expires": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/apikeys")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"expires\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/apikeys"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"expires\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"expires\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/apikeys")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/apikeys")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"expires\": 0\n}")
.asString();
const data = JSON.stringify({
description: '',
expires: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/apikeys');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/apikeys',
headers: {'content-type': 'application/json'},
data: {description: '', expires: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/apikeys';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","expires":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/apis/:apiId/apikeys',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "expires": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"expires\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/apikeys")
.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/v1/apis/:apiId/apikeys',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', expires: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/apikeys',
headers: {'content-type': 'application/json'},
body: {description: '', expires: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/apis/:apiId/apikeys');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
expires: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/apikeys',
headers: {'content-type': 'application/json'},
data: {description: '', expires: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/apikeys';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","expires":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"expires": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/apikeys"]
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}}/v1/apis/:apiId/apikeys" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"expires\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/apikeys",
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([
'description' => '',
'expires' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/apis/:apiId/apikeys', [
'body' => '{
"description": "",
"expires": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/apikeys');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'expires' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'expires' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/apikeys');
$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}}/v1/apis/:apiId/apikeys' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"expires": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/apikeys' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"expires": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"expires\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/apikeys", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/apikeys"
payload = {
"description": "",
"expires": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/apikeys"
payload <- "{\n \"description\": \"\",\n \"expires\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/apikeys")
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 \"description\": \"\",\n \"expires\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/apis/:apiId/apikeys') do |req|
req.body = "{\n \"description\": \"\",\n \"expires\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/apikeys";
let payload = json!({
"description": "",
"expires": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/apis/:apiId/apikeys \
--header 'content-type: application/json' \
--data '{
"description": "",
"expires": 0
}'
echo '{
"description": "",
"expires": 0
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/apikeys \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "expires": 0\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/apikeys
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"expires": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/apikeys")! 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
CreateDataSource
{{baseUrl}}/v1/apis/:apiId/datasources
QUERY PARAMS
apiId
BODY json
{
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/datasources");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/datasources" {:content-type :json
:form-params {:name ""
:description ""
:type ""
:serviceRoleArn ""
:dynamodbConfig {:tableName ""
:awsRegion ""
:useCallerCredentials ""
:deltaSyncConfig ""
:versioned ""}
:lambdaConfig {:lambdaFunctionArn ""}
:elasticsearchConfig {:endpoint ""
:awsRegion ""}
:openSearchServiceConfig {:endpoint ""
:awsRegion ""}
:httpConfig {:endpoint ""
:authorizationConfig ""}
:relationalDatabaseConfig {:relationalDatabaseSourceType ""
:rdsHttpEndpointConfig ""}
:eventBridgeConfig {:eventBusArn ""}}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/datasources"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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}}/v1/apis/:apiId/datasources"),
Content = new StringContent("{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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}}/v1/apis/:apiId/datasources");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/datasources"
payload := strings.NewReader("{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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/v1/apis/:apiId/datasources HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 658
{
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/datasources")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/datasources"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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 \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/datasources")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/datasources")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
name: '',
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {
lambdaFunctionArn: ''
},
elasticsearchConfig: {
endpoint: '',
awsRegion: ''
},
openSearchServiceConfig: {
endpoint: '',
awsRegion: ''
},
httpConfig: {
endpoint: '',
authorizationConfig: ''
},
relationalDatabaseConfig: {
relationalDatabaseSourceType: '',
rdsHttpEndpointConfig: ''
},
eventBridgeConfig: {
eventBusArn: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/datasources');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/datasources',
headers: {'content-type': 'application/json'},
data: {
name: '',
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {lambdaFunctionArn: ''},
elasticsearchConfig: {endpoint: '', awsRegion: ''},
openSearchServiceConfig: {endpoint: '', awsRegion: ''},
httpConfig: {endpoint: '', authorizationConfig: ''},
relationalDatabaseConfig: {relationalDatabaseSourceType: '', rdsHttpEndpointConfig: ''},
eventBridgeConfig: {eventBusArn: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/datasources';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","type":"","serviceRoleArn":"","dynamodbConfig":{"tableName":"","awsRegion":"","useCallerCredentials":"","deltaSyncConfig":"","versioned":""},"lambdaConfig":{"lambdaFunctionArn":""},"elasticsearchConfig":{"endpoint":"","awsRegion":""},"openSearchServiceConfig":{"endpoint":"","awsRegion":""},"httpConfig":{"endpoint":"","authorizationConfig":""},"relationalDatabaseConfig":{"relationalDatabaseSourceType":"","rdsHttpEndpointConfig":""},"eventBridgeConfig":{"eventBusArn":""}}'
};
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}}/v1/apis/:apiId/datasources',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "description": "",\n "type": "",\n "serviceRoleArn": "",\n "dynamodbConfig": {\n "tableName": "",\n "awsRegion": "",\n "useCallerCredentials": "",\n "deltaSyncConfig": "",\n "versioned": ""\n },\n "lambdaConfig": {\n "lambdaFunctionArn": ""\n },\n "elasticsearchConfig": {\n "endpoint": "",\n "awsRegion": ""\n },\n "openSearchServiceConfig": {\n "endpoint": "",\n "awsRegion": ""\n },\n "httpConfig": {\n "endpoint": "",\n "authorizationConfig": ""\n },\n "relationalDatabaseConfig": {\n "relationalDatabaseSourceType": "",\n "rdsHttpEndpointConfig": ""\n },\n "eventBridgeConfig": {\n "eventBusArn": ""\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 \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/datasources")
.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/v1/apis/:apiId/datasources',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
name: '',
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {lambdaFunctionArn: ''},
elasticsearchConfig: {endpoint: '', awsRegion: ''},
openSearchServiceConfig: {endpoint: '', awsRegion: ''},
httpConfig: {endpoint: '', authorizationConfig: ''},
relationalDatabaseConfig: {relationalDatabaseSourceType: '', rdsHttpEndpointConfig: ''},
eventBridgeConfig: {eventBusArn: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/datasources',
headers: {'content-type': 'application/json'},
body: {
name: '',
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {lambdaFunctionArn: ''},
elasticsearchConfig: {endpoint: '', awsRegion: ''},
openSearchServiceConfig: {endpoint: '', awsRegion: ''},
httpConfig: {endpoint: '', authorizationConfig: ''},
relationalDatabaseConfig: {relationalDatabaseSourceType: '', rdsHttpEndpointConfig: ''},
eventBridgeConfig: {eventBusArn: ''}
},
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}}/v1/apis/:apiId/datasources');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {
lambdaFunctionArn: ''
},
elasticsearchConfig: {
endpoint: '',
awsRegion: ''
},
openSearchServiceConfig: {
endpoint: '',
awsRegion: ''
},
httpConfig: {
endpoint: '',
authorizationConfig: ''
},
relationalDatabaseConfig: {
relationalDatabaseSourceType: '',
rdsHttpEndpointConfig: ''
},
eventBridgeConfig: {
eventBusArn: ''
}
});
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}}/v1/apis/:apiId/datasources',
headers: {'content-type': 'application/json'},
data: {
name: '',
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {lambdaFunctionArn: ''},
elasticsearchConfig: {endpoint: '', awsRegion: ''},
openSearchServiceConfig: {endpoint: '', awsRegion: ''},
httpConfig: {endpoint: '', authorizationConfig: ''},
relationalDatabaseConfig: {relationalDatabaseSourceType: '', rdsHttpEndpointConfig: ''},
eventBridgeConfig: {eventBusArn: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/datasources';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","type":"","serviceRoleArn":"","dynamodbConfig":{"tableName":"","awsRegion":"","useCallerCredentials":"","deltaSyncConfig":"","versioned":""},"lambdaConfig":{"lambdaFunctionArn":""},"elasticsearchConfig":{"endpoint":"","awsRegion":""},"openSearchServiceConfig":{"endpoint":"","awsRegion":""},"httpConfig":{"endpoint":"","authorizationConfig":""},"relationalDatabaseConfig":{"relationalDatabaseSourceType":"","rdsHttpEndpointConfig":""},"eventBridgeConfig":{"eventBusArn":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"description": @"",
@"type": @"",
@"serviceRoleArn": @"",
@"dynamodbConfig": @{ @"tableName": @"", @"awsRegion": @"", @"useCallerCredentials": @"", @"deltaSyncConfig": @"", @"versioned": @"" },
@"lambdaConfig": @{ @"lambdaFunctionArn": @"" },
@"elasticsearchConfig": @{ @"endpoint": @"", @"awsRegion": @"" },
@"openSearchServiceConfig": @{ @"endpoint": @"", @"awsRegion": @"" },
@"httpConfig": @{ @"endpoint": @"", @"authorizationConfig": @"" },
@"relationalDatabaseConfig": @{ @"relationalDatabaseSourceType": @"", @"rdsHttpEndpointConfig": @"" },
@"eventBridgeConfig": @{ @"eventBusArn": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/datasources"]
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}}/v1/apis/:apiId/datasources" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/datasources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'description' => '',
'type' => '',
'serviceRoleArn' => '',
'dynamodbConfig' => [
'tableName' => '',
'awsRegion' => '',
'useCallerCredentials' => '',
'deltaSyncConfig' => '',
'versioned' => ''
],
'lambdaConfig' => [
'lambdaFunctionArn' => ''
],
'elasticsearchConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'openSearchServiceConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'httpConfig' => [
'endpoint' => '',
'authorizationConfig' => ''
],
'relationalDatabaseConfig' => [
'relationalDatabaseSourceType' => '',
'rdsHttpEndpointConfig' => ''
],
'eventBridgeConfig' => [
'eventBusArn' => ''
]
]),
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}}/v1/apis/:apiId/datasources', [
'body' => '{
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/datasources');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'description' => '',
'type' => '',
'serviceRoleArn' => '',
'dynamodbConfig' => [
'tableName' => '',
'awsRegion' => '',
'useCallerCredentials' => '',
'deltaSyncConfig' => '',
'versioned' => ''
],
'lambdaConfig' => [
'lambdaFunctionArn' => ''
],
'elasticsearchConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'openSearchServiceConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'httpConfig' => [
'endpoint' => '',
'authorizationConfig' => ''
],
'relationalDatabaseConfig' => [
'relationalDatabaseSourceType' => '',
'rdsHttpEndpointConfig' => ''
],
'eventBridgeConfig' => [
'eventBusArn' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'description' => '',
'type' => '',
'serviceRoleArn' => '',
'dynamodbConfig' => [
'tableName' => '',
'awsRegion' => '',
'useCallerCredentials' => '',
'deltaSyncConfig' => '',
'versioned' => ''
],
'lambdaConfig' => [
'lambdaFunctionArn' => ''
],
'elasticsearchConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'openSearchServiceConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'httpConfig' => [
'endpoint' => '',
'authorizationConfig' => ''
],
'relationalDatabaseConfig' => [
'relationalDatabaseSourceType' => '',
'rdsHttpEndpointConfig' => ''
],
'eventBridgeConfig' => [
'eventBusArn' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/datasources');
$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}}/v1/apis/:apiId/datasources' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/datasources' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/datasources", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/datasources"
payload = {
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": { "lambdaFunctionArn": "" },
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": { "eventBusArn": "" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/datasources"
payload <- "{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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}}/v1/apis/:apiId/datasources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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/v1/apis/:apiId/datasources') do |req|
req.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/datasources";
let payload = json!({
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": json!({
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
}),
"lambdaConfig": json!({"lambdaFunctionArn": ""}),
"elasticsearchConfig": json!({
"endpoint": "",
"awsRegion": ""
}),
"openSearchServiceConfig": json!({
"endpoint": "",
"awsRegion": ""
}),
"httpConfig": json!({
"endpoint": "",
"authorizationConfig": ""
}),
"relationalDatabaseConfig": json!({
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
}),
"eventBridgeConfig": json!({"eventBusArn": ""})
});
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}}/v1/apis/:apiId/datasources \
--header 'content-type: application/json' \
--data '{
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}'
echo '{
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/datasources \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "description": "",\n "type": "",\n "serviceRoleArn": "",\n "dynamodbConfig": {\n "tableName": "",\n "awsRegion": "",\n "useCallerCredentials": "",\n "deltaSyncConfig": "",\n "versioned": ""\n },\n "lambdaConfig": {\n "lambdaFunctionArn": ""\n },\n "elasticsearchConfig": {\n "endpoint": "",\n "awsRegion": ""\n },\n "openSearchServiceConfig": {\n "endpoint": "",\n "awsRegion": ""\n },\n "httpConfig": {\n "endpoint": "",\n "authorizationConfig": ""\n },\n "relationalDatabaseConfig": {\n "relationalDatabaseSourceType": "",\n "rdsHttpEndpointConfig": ""\n },\n "eventBridgeConfig": {\n "eventBusArn": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/datasources
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": [
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
],
"lambdaConfig": ["lambdaFunctionArn": ""],
"elasticsearchConfig": [
"endpoint": "",
"awsRegion": ""
],
"openSearchServiceConfig": [
"endpoint": "",
"awsRegion": ""
],
"httpConfig": [
"endpoint": "",
"authorizationConfig": ""
],
"relationalDatabaseConfig": [
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
],
"eventBridgeConfig": ["eventBusArn": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/datasources")! 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
CreateDomainName
{{baseUrl}}/v1/domainnames
BODY json
{
"domainName": "",
"certificateArn": "",
"description": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/domainnames");
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 \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/domainnames" {:content-type :json
:form-params {:domainName ""
:certificateArn ""
:description ""}})
require "http/client"
url = "{{baseUrl}}/v1/domainnames"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\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}}/v1/domainnames"),
Content = new StringContent("{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\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}}/v1/domainnames");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/domainnames"
payload := strings.NewReader("{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\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/v1/domainnames HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67
{
"domainName": "",
"certificateArn": "",
"description": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/domainnames")
.setHeader("content-type", "application/json")
.setBody("{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/domainnames"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\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 \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/domainnames")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/domainnames")
.header("content-type", "application/json")
.body("{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}")
.asString();
const data = JSON.stringify({
domainName: '',
certificateArn: '',
description: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/domainnames');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/domainnames',
headers: {'content-type': 'application/json'},
data: {domainName: '', certificateArn: '', description: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/domainnames';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domainName":"","certificateArn":"","description":""}'
};
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}}/v1/domainnames',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "domainName": "",\n "certificateArn": "",\n "description": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/domainnames")
.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/v1/domainnames',
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({domainName: '', certificateArn: '', description: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/domainnames',
headers: {'content-type': 'application/json'},
body: {domainName: '', certificateArn: '', description: ''},
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}}/v1/domainnames');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
domainName: '',
certificateArn: '',
description: ''
});
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}}/v1/domainnames',
headers: {'content-type': 'application/json'},
data: {domainName: '', certificateArn: '', description: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/domainnames';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domainName":"","certificateArn":"","description":""}'
};
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 = @{ @"domainName": @"",
@"certificateArn": @"",
@"description": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/domainnames"]
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}}/v1/domainnames" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/domainnames",
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([
'domainName' => '',
'certificateArn' => '',
'description' => ''
]),
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}}/v1/domainnames', [
'body' => '{
"domainName": "",
"certificateArn": "",
"description": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/domainnames');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'domainName' => '',
'certificateArn' => '',
'description' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'domainName' => '',
'certificateArn' => '',
'description' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/domainnames');
$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}}/v1/domainnames' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domainName": "",
"certificateArn": "",
"description": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/domainnames' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domainName": "",
"certificateArn": "",
"description": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/domainnames", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/domainnames"
payload = {
"domainName": "",
"certificateArn": "",
"description": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/domainnames"
payload <- "{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\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}}/v1/domainnames")
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 \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\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/v1/domainnames') do |req|
req.body = "{\n \"domainName\": \"\",\n \"certificateArn\": \"\",\n \"description\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/domainnames";
let payload = json!({
"domainName": "",
"certificateArn": "",
"description": ""
});
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}}/v1/domainnames \
--header 'content-type: application/json' \
--data '{
"domainName": "",
"certificateArn": "",
"description": ""
}'
echo '{
"domainName": "",
"certificateArn": "",
"description": ""
}' | \
http POST {{baseUrl}}/v1/domainnames \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "domainName": "",\n "certificateArn": "",\n "description": ""\n}' \
--output-document \
- {{baseUrl}}/v1/domainnames
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"domainName": "",
"certificateArn": "",
"description": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/domainnames")! 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
CreateFunction
{{baseUrl}}/v1/apis/:apiId/functions
QUERY PARAMS
apiId
BODY json
{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/functions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/functions" {:content-type :json
:form-params {:name ""
:description ""
:dataSourceName ""
:requestMappingTemplate ""
:responseMappingTemplate ""
:functionVersion ""
:syncConfig {:conflictHandler ""
:conflictDetection ""
:lambdaConflictHandlerConfig ""}
:maxBatchSize 0
:runtime {:name ""
:runtimeVersion ""}
:code ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/functions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/functions"),
Content = new StringContent("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/functions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/functions"
payload := strings.NewReader("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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/v1/apis/:apiId/functions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 364
{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/functions")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/functions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/functions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/functions")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {
conflictHandler: '',
conflictDetection: '',
lambdaConflictHandlerConfig: ''
},
maxBatchSize: 0,
runtime: {
name: '',
runtimeVersion: ''
},
code: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/functions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/functions',
headers: {'content-type': 'application/json'},
data: {
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/functions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","dataSourceName":"","requestMappingTemplate":"","responseMappingTemplate":"","functionVersion":"","syncConfig":{"conflictHandler":"","conflictDetection":"","lambdaConflictHandlerConfig":""},"maxBatchSize":0,"runtime":{"name":"","runtimeVersion":""},"code":""}'
};
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}}/v1/apis/:apiId/functions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "description": "",\n "dataSourceName": "",\n "requestMappingTemplate": "",\n "responseMappingTemplate": "",\n "functionVersion": "",\n "syncConfig": {\n "conflictHandler": "",\n "conflictDetection": "",\n "lambdaConflictHandlerConfig": ""\n },\n "maxBatchSize": 0,\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/functions")
.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/v1/apis/:apiId/functions',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/functions',
headers: {'content-type': 'application/json'},
body: {
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
},
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}}/v1/apis/:apiId/functions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {
conflictHandler: '',
conflictDetection: '',
lambdaConflictHandlerConfig: ''
},
maxBatchSize: 0,
runtime: {
name: '',
runtimeVersion: ''
},
code: ''
});
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}}/v1/apis/:apiId/functions',
headers: {'content-type': 'application/json'},
data: {
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/functions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","dataSourceName":"","requestMappingTemplate":"","responseMappingTemplate":"","functionVersion":"","syncConfig":{"conflictHandler":"","conflictDetection":"","lambdaConflictHandlerConfig":""},"maxBatchSize":0,"runtime":{"name":"","runtimeVersion":""},"code":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"description": @"",
@"dataSourceName": @"",
@"requestMappingTemplate": @"",
@"responseMappingTemplate": @"",
@"functionVersion": @"",
@"syncConfig": @{ @"conflictHandler": @"", @"conflictDetection": @"", @"lambdaConflictHandlerConfig": @"" },
@"maxBatchSize": @0,
@"runtime": @{ @"name": @"", @"runtimeVersion": @"" },
@"code": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/functions"]
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}}/v1/apis/:apiId/functions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/functions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'description' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'functionVersion' => '',
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]),
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}}/v1/apis/:apiId/functions', [
'body' => '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/functions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'description' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'functionVersion' => '',
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'description' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'functionVersion' => '',
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/functions');
$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}}/v1/apis/:apiId/functions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/functions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/functions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/functions"
payload = {
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/functions"
payload <- "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/functions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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/v1/apis/:apiId/functions') do |req|
req.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/functions";
let payload = json!({
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": json!({
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
}),
"maxBatchSize": 0,
"runtime": json!({
"name": "",
"runtimeVersion": ""
}),
"code": ""
});
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}}/v1/apis/:apiId/functions \
--header 'content-type: application/json' \
--data '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
echo '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/functions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "description": "",\n "dataSourceName": "",\n "requestMappingTemplate": "",\n "responseMappingTemplate": "",\n "functionVersion": "",\n "syncConfig": {\n "conflictHandler": "",\n "conflictDetection": "",\n "lambdaConflictHandlerConfig": ""\n },\n "maxBatchSize": 0,\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/functions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": [
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
],
"maxBatchSize": 0,
"runtime": [
"name": "",
"runtimeVersion": ""
],
"code": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/functions")! 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
CreateGraphqlApi
{{baseUrl}}/v1/apis
BODY json
{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"tags": {},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis");
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 \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis" {:content-type :json
:form-params {:name ""
:logConfig {:fieldLogLevel ""
:cloudWatchLogsRoleArn ""
:excludeVerboseContent ""}
:authenticationType ""
:userPoolConfig {:userPoolId ""
:awsRegion ""
:defaultAction ""
:appIdClientRegex ""}
:openIDConnectConfig {:issuer ""
:clientId ""
:iatTTL ""
:authTTL ""}
:tags {}
:additionalAuthenticationProviders [{:authenticationType ""
:openIDConnectConfig ""
:userPoolConfig ""
:lambdaAuthorizerConfig ""}]
:xrayEnabled false
:lambdaAuthorizerConfig {:authorizerResultTtlInSeconds ""
:authorizerUri ""
:identityValidationExpression ""}}})
require "http/client"
url = "{{baseUrl}}/v1/apis"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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}}/v1/apis"),
Content = new StringContent("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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}}/v1/apis");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis"
payload := strings.NewReader("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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/v1/apis HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 747
{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"tags": {},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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 \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
name: '',
logConfig: {
fieldLogLevel: '',
cloudWatchLogsRoleArn: '',
excludeVerboseContent: ''
},
authenticationType: '',
userPoolConfig: {
userPoolId: '',
awsRegion: '',
defaultAction: '',
appIdClientRegex: ''
},
openIDConnectConfig: {
issuer: '',
clientId: '',
iatTTL: '',
authTTL: ''
},
tags: {},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis',
headers: {'content-type': 'application/json'},
data: {
name: '',
logConfig: {fieldLogLevel: '', cloudWatchLogsRoleArn: '', excludeVerboseContent: ''},
authenticationType: '',
userPoolConfig: {userPoolId: '', awsRegion: '', defaultAction: '', appIdClientRegex: ''},
openIDConnectConfig: {issuer: '', clientId: '', iatTTL: '', authTTL: ''},
tags: {},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","logConfig":{"fieldLogLevel":"","cloudWatchLogsRoleArn":"","excludeVerboseContent":""},"authenticationType":"","userPoolConfig":{"userPoolId":"","awsRegion":"","defaultAction":"","appIdClientRegex":""},"openIDConnectConfig":{"issuer":"","clientId":"","iatTTL":"","authTTL":""},"tags":{},"additionalAuthenticationProviders":[{"authenticationType":"","openIDConnectConfig":"","userPoolConfig":"","lambdaAuthorizerConfig":""}],"xrayEnabled":false,"lambdaAuthorizerConfig":{"authorizerResultTtlInSeconds":"","authorizerUri":"","identityValidationExpression":""}}'
};
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}}/v1/apis',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "logConfig": {\n "fieldLogLevel": "",\n "cloudWatchLogsRoleArn": "",\n "excludeVerboseContent": ""\n },\n "authenticationType": "",\n "userPoolConfig": {\n "userPoolId": "",\n "awsRegion": "",\n "defaultAction": "",\n "appIdClientRegex": ""\n },\n "openIDConnectConfig": {\n "issuer": "",\n "clientId": "",\n "iatTTL": "",\n "authTTL": ""\n },\n "tags": {},\n "additionalAuthenticationProviders": [\n {\n "authenticationType": "",\n "openIDConnectConfig": "",\n "userPoolConfig": "",\n "lambdaAuthorizerConfig": ""\n }\n ],\n "xrayEnabled": false,\n "lambdaAuthorizerConfig": {\n "authorizerResultTtlInSeconds": "",\n "authorizerUri": "",\n "identityValidationExpression": ""\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 \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis")
.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/v1/apis',
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: '',
logConfig: {fieldLogLevel: '', cloudWatchLogsRoleArn: '', excludeVerboseContent: ''},
authenticationType: '',
userPoolConfig: {userPoolId: '', awsRegion: '', defaultAction: '', appIdClientRegex: ''},
openIDConnectConfig: {issuer: '', clientId: '', iatTTL: '', authTTL: ''},
tags: {},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis',
headers: {'content-type': 'application/json'},
body: {
name: '',
logConfig: {fieldLogLevel: '', cloudWatchLogsRoleArn: '', excludeVerboseContent: ''},
authenticationType: '',
userPoolConfig: {userPoolId: '', awsRegion: '', defaultAction: '', appIdClientRegex: ''},
openIDConnectConfig: {issuer: '', clientId: '', iatTTL: '', authTTL: ''},
tags: {},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
},
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}}/v1/apis');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
logConfig: {
fieldLogLevel: '',
cloudWatchLogsRoleArn: '',
excludeVerboseContent: ''
},
authenticationType: '',
userPoolConfig: {
userPoolId: '',
awsRegion: '',
defaultAction: '',
appIdClientRegex: ''
},
openIDConnectConfig: {
issuer: '',
clientId: '',
iatTTL: '',
authTTL: ''
},
tags: {},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
});
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}}/v1/apis',
headers: {'content-type': 'application/json'},
data: {
name: '',
logConfig: {fieldLogLevel: '', cloudWatchLogsRoleArn: '', excludeVerboseContent: ''},
authenticationType: '',
userPoolConfig: {userPoolId: '', awsRegion: '', defaultAction: '', appIdClientRegex: ''},
openIDConnectConfig: {issuer: '', clientId: '', iatTTL: '', authTTL: ''},
tags: {},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","logConfig":{"fieldLogLevel":"","cloudWatchLogsRoleArn":"","excludeVerboseContent":""},"authenticationType":"","userPoolConfig":{"userPoolId":"","awsRegion":"","defaultAction":"","appIdClientRegex":""},"openIDConnectConfig":{"issuer":"","clientId":"","iatTTL":"","authTTL":""},"tags":{},"additionalAuthenticationProviders":[{"authenticationType":"","openIDConnectConfig":"","userPoolConfig":"","lambdaAuthorizerConfig":""}],"xrayEnabled":false,"lambdaAuthorizerConfig":{"authorizerResultTtlInSeconds":"","authorizerUri":"","identityValidationExpression":""}}'
};
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": @"",
@"logConfig": @{ @"fieldLogLevel": @"", @"cloudWatchLogsRoleArn": @"", @"excludeVerboseContent": @"" },
@"authenticationType": @"",
@"userPoolConfig": @{ @"userPoolId": @"", @"awsRegion": @"", @"defaultAction": @"", @"appIdClientRegex": @"" },
@"openIDConnectConfig": @{ @"issuer": @"", @"clientId": @"", @"iatTTL": @"", @"authTTL": @"" },
@"tags": @{ },
@"additionalAuthenticationProviders": @[ @{ @"authenticationType": @"", @"openIDConnectConfig": @"", @"userPoolConfig": @"", @"lambdaAuthorizerConfig": @"" } ],
@"xrayEnabled": @NO,
@"lambdaAuthorizerConfig": @{ @"authorizerResultTtlInSeconds": @"", @"authorizerUri": @"", @"identityValidationExpression": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis"]
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}}/v1/apis" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis",
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' => '',
'logConfig' => [
'fieldLogLevel' => '',
'cloudWatchLogsRoleArn' => '',
'excludeVerboseContent' => ''
],
'authenticationType' => '',
'userPoolConfig' => [
'userPoolId' => '',
'awsRegion' => '',
'defaultAction' => '',
'appIdClientRegex' => ''
],
'openIDConnectConfig' => [
'issuer' => '',
'clientId' => '',
'iatTTL' => '',
'authTTL' => ''
],
'tags' => [
],
'additionalAuthenticationProviders' => [
[
'authenticationType' => '',
'openIDConnectConfig' => '',
'userPoolConfig' => '',
'lambdaAuthorizerConfig' => ''
]
],
'xrayEnabled' => null,
'lambdaAuthorizerConfig' => [
'authorizerResultTtlInSeconds' => '',
'authorizerUri' => '',
'identityValidationExpression' => ''
]
]),
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}}/v1/apis', [
'body' => '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"tags": {},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'logConfig' => [
'fieldLogLevel' => '',
'cloudWatchLogsRoleArn' => '',
'excludeVerboseContent' => ''
],
'authenticationType' => '',
'userPoolConfig' => [
'userPoolId' => '',
'awsRegion' => '',
'defaultAction' => '',
'appIdClientRegex' => ''
],
'openIDConnectConfig' => [
'issuer' => '',
'clientId' => '',
'iatTTL' => '',
'authTTL' => ''
],
'tags' => [
],
'additionalAuthenticationProviders' => [
[
'authenticationType' => '',
'openIDConnectConfig' => '',
'userPoolConfig' => '',
'lambdaAuthorizerConfig' => ''
]
],
'xrayEnabled' => null,
'lambdaAuthorizerConfig' => [
'authorizerResultTtlInSeconds' => '',
'authorizerUri' => '',
'identityValidationExpression' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'logConfig' => [
'fieldLogLevel' => '',
'cloudWatchLogsRoleArn' => '',
'excludeVerboseContent' => ''
],
'authenticationType' => '',
'userPoolConfig' => [
'userPoolId' => '',
'awsRegion' => '',
'defaultAction' => '',
'appIdClientRegex' => ''
],
'openIDConnectConfig' => [
'issuer' => '',
'clientId' => '',
'iatTTL' => '',
'authTTL' => ''
],
'tags' => [
],
'additionalAuthenticationProviders' => [
[
'authenticationType' => '',
'openIDConnectConfig' => '',
'userPoolConfig' => '',
'lambdaAuthorizerConfig' => ''
]
],
'xrayEnabled' => null,
'lambdaAuthorizerConfig' => [
'authorizerResultTtlInSeconds' => '',
'authorizerUri' => '',
'identityValidationExpression' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis');
$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}}/v1/apis' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"tags": {},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"tags": {},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis"
payload = {
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"tags": {},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": False,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis"
payload <- "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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}}/v1/apis")
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 \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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/v1/apis') do |req|
req.body = "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"tags\": {},\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis";
let payload = json!({
"name": "",
"logConfig": json!({
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
}),
"authenticationType": "",
"userPoolConfig": json!({
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
}),
"openIDConnectConfig": json!({
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
}),
"tags": json!({}),
"additionalAuthenticationProviders": (
json!({
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
})
),
"xrayEnabled": false,
"lambdaAuthorizerConfig": json!({
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
})
});
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}}/v1/apis \
--header 'content-type: application/json' \
--data '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"tags": {},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}'
echo '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"tags": {},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}' | \
http POST {{baseUrl}}/v1/apis \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "logConfig": {\n "fieldLogLevel": "",\n "cloudWatchLogsRoleArn": "",\n "excludeVerboseContent": ""\n },\n "authenticationType": "",\n "userPoolConfig": {\n "userPoolId": "",\n "awsRegion": "",\n "defaultAction": "",\n "appIdClientRegex": ""\n },\n "openIDConnectConfig": {\n "issuer": "",\n "clientId": "",\n "iatTTL": "",\n "authTTL": ""\n },\n "tags": {},\n "additionalAuthenticationProviders": [\n {\n "authenticationType": "",\n "openIDConnectConfig": "",\n "userPoolConfig": "",\n "lambdaAuthorizerConfig": ""\n }\n ],\n "xrayEnabled": false,\n "lambdaAuthorizerConfig": {\n "authorizerResultTtlInSeconds": "",\n "authorizerUri": "",\n "identityValidationExpression": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1/apis
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"logConfig": [
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
],
"authenticationType": "",
"userPoolConfig": [
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
],
"openIDConnectConfig": [
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
],
"tags": [],
"additionalAuthenticationProviders": [
[
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
]
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": [
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis")! 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
CreateResolver
{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers
QUERY PARAMS
apiId
typeName
BODY json
{
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers");
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 \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers" {:content-type :json
:form-params {:fieldName ""
:dataSourceName ""
:requestMappingTemplate ""
:responseMappingTemplate ""
:kind ""
:pipelineConfig {:functions ""}
:syncConfig {:conflictHandler ""
:conflictDetection ""
:lambdaConflictHandlerConfig ""}
:cachingConfig {:ttl ""
:cachingKeys ""}
:maxBatchSize 0
:runtime {:name ""
:runtimeVersion ""}
:code ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/types/:typeName/resolvers"),
Content = new StringContent("{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/types/:typeName/resolvers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"
payload := strings.NewReader("{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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/v1/apis/:apiId/types/:typeName/resolvers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 447
{
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
.setHeader("content-type", "application/json")
.setBody("{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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 \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
.header("content-type", "application/json")
.body("{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
.asString();
const data = JSON.stringify({
fieldName: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {
functions: ''
},
syncConfig: {
conflictHandler: '',
conflictDetection: '',
lambdaConflictHandlerConfig: ''
},
cachingConfig: {
ttl: '',
cachingKeys: ''
},
maxBatchSize: 0,
runtime: {
name: '',
runtimeVersion: ''
},
code: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers',
headers: {'content-type': 'application/json'},
data: {
fieldName: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {functions: ''},
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
cachingConfig: {ttl: '', cachingKeys: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fieldName":"","dataSourceName":"","requestMappingTemplate":"","responseMappingTemplate":"","kind":"","pipelineConfig":{"functions":""},"syncConfig":{"conflictHandler":"","conflictDetection":"","lambdaConflictHandlerConfig":""},"cachingConfig":{"ttl":"","cachingKeys":""},"maxBatchSize":0,"runtime":{"name":"","runtimeVersion":""},"code":""}'
};
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}}/v1/apis/:apiId/types/:typeName/resolvers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "fieldName": "",\n "dataSourceName": "",\n "requestMappingTemplate": "",\n "responseMappingTemplate": "",\n "kind": "",\n "pipelineConfig": {\n "functions": ""\n },\n "syncConfig": {\n "conflictHandler": "",\n "conflictDetection": "",\n "lambdaConflictHandlerConfig": ""\n },\n "cachingConfig": {\n "ttl": "",\n "cachingKeys": ""\n },\n "maxBatchSize": 0,\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
.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/v1/apis/:apiId/types/:typeName/resolvers',
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({
fieldName: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {functions: ''},
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
cachingConfig: {ttl: '', cachingKeys: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers',
headers: {'content-type': 'application/json'},
body: {
fieldName: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {functions: ''},
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
cachingConfig: {ttl: '', cachingKeys: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
},
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}}/v1/apis/:apiId/types/:typeName/resolvers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
fieldName: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {
functions: ''
},
syncConfig: {
conflictHandler: '',
conflictDetection: '',
lambdaConflictHandlerConfig: ''
},
cachingConfig: {
ttl: '',
cachingKeys: ''
},
maxBatchSize: 0,
runtime: {
name: '',
runtimeVersion: ''
},
code: ''
});
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}}/v1/apis/:apiId/types/:typeName/resolvers',
headers: {'content-type': 'application/json'},
data: {
fieldName: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {functions: ''},
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
cachingConfig: {ttl: '', cachingKeys: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"fieldName":"","dataSourceName":"","requestMappingTemplate":"","responseMappingTemplate":"","kind":"","pipelineConfig":{"functions":""},"syncConfig":{"conflictHandler":"","conflictDetection":"","lambdaConflictHandlerConfig":""},"cachingConfig":{"ttl":"","cachingKeys":""},"maxBatchSize":0,"runtime":{"name":"","runtimeVersion":""},"code":""}'
};
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 = @{ @"fieldName": @"",
@"dataSourceName": @"",
@"requestMappingTemplate": @"",
@"responseMappingTemplate": @"",
@"kind": @"",
@"pipelineConfig": @{ @"functions": @"" },
@"syncConfig": @{ @"conflictHandler": @"", @"conflictDetection": @"", @"lambdaConflictHandlerConfig": @"" },
@"cachingConfig": @{ @"ttl": @"", @"cachingKeys": @"" },
@"maxBatchSize": @0,
@"runtime": @{ @"name": @"", @"runtimeVersion": @"" },
@"code": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"]
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}}/v1/apis/:apiId/types/:typeName/resolvers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers",
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([
'fieldName' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'kind' => '',
'pipelineConfig' => [
'functions' => ''
],
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'cachingConfig' => [
'ttl' => '',
'cachingKeys' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]),
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}}/v1/apis/:apiId/types/:typeName/resolvers', [
'body' => '{
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'fieldName' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'kind' => '',
'pipelineConfig' => [
'functions' => ''
],
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'cachingConfig' => [
'ttl' => '',
'cachingKeys' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'fieldName' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'kind' => '',
'pipelineConfig' => [
'functions' => ''
],
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'cachingConfig' => [
'ttl' => '',
'cachingKeys' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers');
$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}}/v1/apis/:apiId/types/:typeName/resolvers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/types/:typeName/resolvers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"
payload = {
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": { "functions": "" },
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"
payload <- "{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/types/:typeName/resolvers")
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 \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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/v1/apis/:apiId/types/:typeName/resolvers') do |req|
req.body = "{\n \"fieldName\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers";
let payload = json!({
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": json!({"functions": ""}),
"syncConfig": json!({
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
}),
"cachingConfig": json!({
"ttl": "",
"cachingKeys": ""
}),
"maxBatchSize": 0,
"runtime": json!({
"name": "",
"runtimeVersion": ""
}),
"code": ""
});
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}}/v1/apis/:apiId/types/:typeName/resolvers \
--header 'content-type: application/json' \
--data '{
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
echo '{
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "fieldName": "",\n "dataSourceName": "",\n "requestMappingTemplate": "",\n "responseMappingTemplate": "",\n "kind": "",\n "pipelineConfig": {\n "functions": ""\n },\n "syncConfig": {\n "conflictHandler": "",\n "conflictDetection": "",\n "lambdaConflictHandlerConfig": ""\n },\n "cachingConfig": {\n "ttl": "",\n "cachingKeys": ""\n },\n "maxBatchSize": 0,\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"fieldName": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": ["functions": ""],
"syncConfig": [
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
],
"cachingConfig": [
"ttl": "",
"cachingKeys": ""
],
"maxBatchSize": 0,
"runtime": [
"name": "",
"runtimeVersion": ""
],
"code": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")! 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
CreateType
{{baseUrl}}/v1/apis/:apiId/types
QUERY PARAMS
apiId
BODY json
{
"definition": "",
"format": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types");
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 \"definition\": \"\",\n \"format\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/types" {:content-type :json
:form-params {:definition ""
:format ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"definition\": \"\",\n \"format\": \"\"\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}}/v1/apis/:apiId/types"),
Content = new StringContent("{\n \"definition\": \"\",\n \"format\": \"\"\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}}/v1/apis/:apiId/types");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"definition\": \"\",\n \"format\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types"
payload := strings.NewReader("{\n \"definition\": \"\",\n \"format\": \"\"\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/v1/apis/:apiId/types HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 38
{
"definition": "",
"format": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/types")
.setHeader("content-type", "application/json")
.setBody("{\n \"definition\": \"\",\n \"format\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"definition\": \"\",\n \"format\": \"\"\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 \"definition\": \"\",\n \"format\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/types")
.header("content-type", "application/json")
.body("{\n \"definition\": \"\",\n \"format\": \"\"\n}")
.asString();
const data = JSON.stringify({
definition: '',
format: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/types');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/types',
headers: {'content-type': 'application/json'},
data: {definition: '', format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"definition":"","format":""}'
};
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}}/v1/apis/:apiId/types',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "definition": "",\n "format": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"definition\": \"\",\n \"format\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types")
.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/v1/apis/:apiId/types',
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({definition: '', format: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/types',
headers: {'content-type': 'application/json'},
body: {definition: '', format: ''},
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}}/v1/apis/:apiId/types');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
definition: '',
format: ''
});
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}}/v1/apis/:apiId/types',
headers: {'content-type': 'application/json'},
data: {definition: '', format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"definition":"","format":""}'
};
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 = @{ @"definition": @"",
@"format": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/types"]
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}}/v1/apis/:apiId/types" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"definition\": \"\",\n \"format\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types",
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([
'definition' => '',
'format' => ''
]),
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}}/v1/apis/:apiId/types', [
'body' => '{
"definition": "",
"format": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'definition' => '',
'format' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'definition' => '',
'format' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types');
$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}}/v1/apis/:apiId/types' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"definition": "",
"format": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"definition": "",
"format": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"definition\": \"\",\n \"format\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/types", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types"
payload = {
"definition": "",
"format": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types"
payload <- "{\n \"definition\": \"\",\n \"format\": \"\"\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}}/v1/apis/:apiId/types")
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 \"definition\": \"\",\n \"format\": \"\"\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/v1/apis/:apiId/types') do |req|
req.body = "{\n \"definition\": \"\",\n \"format\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types";
let payload = json!({
"definition": "",
"format": ""
});
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}}/v1/apis/:apiId/types \
--header 'content-type: application/json' \
--data '{
"definition": "",
"format": ""
}'
echo '{
"definition": "",
"format": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/types \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "definition": "",\n "format": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/types
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"definition": "",
"format": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types")! 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
DeleteApiCache
{{baseUrl}}/v1/apis/:apiId/ApiCaches
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/ApiCaches");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/apis/:apiId/ApiCaches")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
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}}/v1/apis/:apiId/ApiCaches"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/ApiCaches");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
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/v1/apis/:apiId/ApiCaches HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/ApiCaches"))
.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}}/v1/apis/:apiId/ApiCaches")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.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}}/v1/apis/:apiId/ApiCaches');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/ApiCaches';
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}}/v1/apis/:apiId/ApiCaches',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/ApiCaches',
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}}/v1/apis/:apiId/ApiCaches'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/apis/:apiId/ApiCaches');
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}}/v1/apis/:apiId/ApiCaches'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/ApiCaches';
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}}/v1/apis/:apiId/ApiCaches"]
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}}/v1/apis/:apiId/ApiCaches" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/ApiCaches",
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}}/v1/apis/:apiId/ApiCaches');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/ApiCaches');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/ApiCaches');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/ApiCaches' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/ApiCaches' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/apis/:apiId/ApiCaches")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
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/v1/apis/:apiId/ApiCaches') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches";
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}}/v1/apis/:apiId/ApiCaches
http DELETE {{baseUrl}}/v1/apis/:apiId/ApiCaches
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/ApiCaches
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/ApiCaches")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteApiKey
{{baseUrl}}/v1/apis/:apiId/apikeys/:id
QUERY PARAMS
apiId
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/apikeys/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/apis/:apiId/apikeys/:id")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/apikeys/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/apikeys/: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/v1/apis/:apiId/apikeys/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/apis/:apiId/apikeys/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/apis/:apiId/apikeys/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/apikeys/: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/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/apikeys/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/apikeys/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/apikeys/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/apikeys/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/apis/:apiId/apikeys/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/apikeys/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/apikeys/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/apikeys/: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/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/: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}}/v1/apis/:apiId/apikeys/:id
http DELETE {{baseUrl}}/v1/apis/:apiId/apikeys/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/apikeys/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/apikeys/: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()
DELETE
DeleteDataSource
{{baseUrl}}/v1/apis/:apiId/datasources/:name
QUERY PARAMS
apiId
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/datasources/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/apis/:apiId/datasources/:name")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
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}}/v1/apis/:apiId/datasources/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/datasources/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
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/v1/apis/:apiId/datasources/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/apis/:apiId/datasources/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/datasources/:name"))
.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}}/v1/apis/:apiId/datasources/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/apis/:apiId/datasources/: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('DELETE', '{{baseUrl}}/v1/apis/:apiId/datasources/:name');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/apis/:apiId/datasources/:name'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/datasources/:name';
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}}/v1/apis/:apiId/datasources/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/datasources/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/datasources/: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: 'DELETE',
url: '{{baseUrl}}/v1/apis/:apiId/datasources/:name'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/apis/:apiId/datasources/: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: 'DELETE',
url: '{{baseUrl}}/v1/apis/:apiId/datasources/:name'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/datasources/:name';
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}}/v1/apis/:apiId/datasources/:name"]
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}}/v1/apis/:apiId/datasources/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/datasources/:name",
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}}/v1/apis/:apiId/datasources/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/datasources/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/datasources/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/datasources/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/datasources/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/apis/:apiId/datasources/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/datasources/:name")
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/v1/apis/:apiId/datasources/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/datasources/:name";
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}}/v1/apis/:apiId/datasources/:name
http DELETE {{baseUrl}}/v1/apis/:apiId/datasources/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/datasources/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/datasources/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteDomainName
{{baseUrl}}/v1/domainnames/:domainName
QUERY PARAMS
domainName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/domainnames/:domainName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/domainnames/:domainName")
require "http/client"
url = "{{baseUrl}}/v1/domainnames/:domainName"
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}}/v1/domainnames/:domainName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/domainnames/:domainName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/domainnames/:domainName"
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/v1/domainnames/:domainName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/domainnames/:domainName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/domainnames/:domainName"))
.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}}/v1/domainnames/:domainName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/domainnames/:domainName")
.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}}/v1/domainnames/:domainName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/domainnames/:domainName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/domainnames/:domainName';
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}}/v1/domainnames/:domainName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/domainnames/:domainName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/domainnames/:domainName',
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}}/v1/domainnames/:domainName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/domainnames/:domainName');
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}}/v1/domainnames/:domainName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/domainnames/:domainName';
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}}/v1/domainnames/:domainName"]
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}}/v1/domainnames/:domainName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/domainnames/:domainName",
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}}/v1/domainnames/:domainName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/domainnames/:domainName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/domainnames/:domainName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/domainnames/:domainName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/domainnames/:domainName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/domainnames/:domainName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/domainnames/:domainName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/domainnames/:domainName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/domainnames/:domainName")
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/v1/domainnames/:domainName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/domainnames/:domainName";
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}}/v1/domainnames/:domainName
http DELETE {{baseUrl}}/v1/domainnames/:domainName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/domainnames/:domainName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/domainnames/:domainName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteFunction
{{baseUrl}}/v1/apis/:apiId/functions/:functionId
QUERY PARAMS
apiId
functionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/functions/:functionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
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}}/v1/apis/:apiId/functions/:functionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/functions/:functionId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
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/v1/apis/:apiId/functions/:functionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/functions/:functionId"))
.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}}/v1/apis/:apiId/functions/:functionId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.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}}/v1/apis/:apiId/functions/:functionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/apis/:apiId/functions/:functionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/functions/:functionId';
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}}/v1/apis/:apiId/functions/:functionId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/functions/:functionId',
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}}/v1/apis/:apiId/functions/:functionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
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}}/v1/apis/:apiId/functions/:functionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/functions/:functionId';
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}}/v1/apis/:apiId/functions/:functionId"]
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}}/v1/apis/:apiId/functions/:functionId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/functions/:functionId",
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}}/v1/apis/:apiId/functions/:functionId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/functions/:functionId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/functions/:functionId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/apis/:apiId/functions/:functionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
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/v1/apis/:apiId/functions/:functionId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId";
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}}/v1/apis/:apiId/functions/:functionId
http DELETE {{baseUrl}}/v1/apis/:apiId/functions/:functionId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/functions/:functionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/functions/:functionId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteGraphqlApi
{{baseUrl}}/v1/apis/:apiId
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/apis/:apiId")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId"
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}}/v1/apis/:apiId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId"
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/v1/apis/:apiId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/apis/:apiId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId"))
.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}}/v1/apis/:apiId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/apis/:apiId")
.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}}/v1/apis/:apiId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/apis/:apiId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId';
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}}/v1/apis/:apiId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId',
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}}/v1/apis/:apiId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/apis/:apiId');
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}}/v1/apis/:apiId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId';
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}}/v1/apis/:apiId"]
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}}/v1/apis/:apiId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId",
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}}/v1/apis/:apiId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/apis/:apiId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId")
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/v1/apis/:apiId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId";
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}}/v1/apis/:apiId
http DELETE {{baseUrl}}/v1/apis/:apiId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/apis/:apiId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteResolver
{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
QUERY PARAMS
apiId
typeName
fieldName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
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/v1/apis/:apiId/types/:typeName/resolvers/:fieldName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"))
.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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName';
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName';
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"]
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName",
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
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/v1/apis/:apiId/types/:typeName/resolvers/:fieldName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName";
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
http DELETE {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeleteType
{{baseUrl}}/v1/apis/:apiId/types/:typeName
QUERY PARAMS
apiId
typeName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types/:typeName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/apis/:apiId/types/:typeName")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName"
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}}/v1/apis/:apiId/types/:typeName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/types/:typeName");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types/:typeName"
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/v1/apis/:apiId/types/:typeName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/apis/:apiId/types/:typeName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types/:typeName"))
.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}}/v1/apis/:apiId/types/:typeName")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/apis/:apiId/types/:typeName")
.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}}/v1/apis/:apiId/types/:typeName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName';
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}}/v1/apis/:apiId/types/:typeName',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/types/:typeName',
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}}/v1/apis/:apiId/types/:typeName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/apis/:apiId/types/:typeName');
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}}/v1/apis/:apiId/types/:typeName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName';
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}}/v1/apis/:apiId/types/:typeName"]
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}}/v1/apis/:apiId/types/:typeName" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types/:typeName",
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}}/v1/apis/:apiId/types/:typeName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/apis/:apiId/types/:typeName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types/:typeName"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/types/:typeName")
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/v1/apis/:apiId/types/:typeName') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName";
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}}/v1/apis/:apiId/types/:typeName
http DELETE {{baseUrl}}/v1/apis/:apiId/types/:typeName
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/types/:typeName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types/:typeName")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DisassociateApi
{{baseUrl}}/v1/domainnames/:domainName/apiassociation
QUERY PARAMS
domainName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/domainnames/:domainName/apiassociation");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
require "http/client"
url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
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}}/v1/domainnames/:domainName/apiassociation"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/domainnames/:domainName/apiassociation");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
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/v1/domainnames/:domainName/apiassociation HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/domainnames/:domainName/apiassociation"))
.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}}/v1/domainnames/:domainName/apiassociation")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.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}}/v1/domainnames/:domainName/apiassociation');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/domainnames/:domainName/apiassociation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/domainnames/:domainName/apiassociation';
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}}/v1/domainnames/:domainName/apiassociation',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/domainnames/:domainName/apiassociation',
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}}/v1/domainnames/:domainName/apiassociation'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
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}}/v1/domainnames/:domainName/apiassociation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/domainnames/:domainName/apiassociation';
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}}/v1/domainnames/:domainName/apiassociation"]
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}}/v1/domainnames/:domainName/apiassociation" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/domainnames/:domainName/apiassociation",
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}}/v1/domainnames/:domainName/apiassociation');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/domainnames/:domainName/apiassociation' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/domainnames/:domainName/apiassociation' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/domainnames/:domainName/apiassociation")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
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/v1/domainnames/:domainName/apiassociation') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation";
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}}/v1/domainnames/:domainName/apiassociation
http DELETE {{baseUrl}}/v1/domainnames/:domainName/apiassociation
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/domainnames/:domainName/apiassociation
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/domainnames/:domainName/apiassociation")! 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
EvaluateCode
{{baseUrl}}/v1/dataplane-evaluatecode
BODY json
{
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": "",
"context": "",
"function": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/dataplane-evaluatecode");
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 \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/dataplane-evaluatecode" {:content-type :json
:form-params {:runtime {:name ""
:runtimeVersion ""}
:code ""
:context ""
:function ""}})
require "http/client"
url = "{{baseUrl}}/v1/dataplane-evaluatecode"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\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}}/v1/dataplane-evaluatecode"),
Content = new StringContent("{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\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}}/v1/dataplane-evaluatecode");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/dataplane-evaluatecode"
payload := strings.NewReader("{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\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/v1/dataplane-evaluatecode HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 112
{
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": "",
"context": "",
"function": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/dataplane-evaluatecode")
.setHeader("content-type", "application/json")
.setBody("{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/dataplane-evaluatecode"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\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 \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/dataplane-evaluatecode")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/dataplane-evaluatecode")
.header("content-type", "application/json")
.body("{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}")
.asString();
const data = JSON.stringify({
runtime: {
name: '',
runtimeVersion: ''
},
code: '',
context: '',
function: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/dataplane-evaluatecode');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/dataplane-evaluatecode',
headers: {'content-type': 'application/json'},
data: {runtime: {name: '', runtimeVersion: ''}, code: '', context: '', function: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/dataplane-evaluatecode';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"runtime":{"name":"","runtimeVersion":""},"code":"","context":"","function":""}'
};
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}}/v1/dataplane-evaluatecode',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": "",\n "context": "",\n "function": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/dataplane-evaluatecode")
.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/v1/dataplane-evaluatecode',
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({runtime: {name: '', runtimeVersion: ''}, code: '', context: '', function: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/dataplane-evaluatecode',
headers: {'content-type': 'application/json'},
body: {runtime: {name: '', runtimeVersion: ''}, code: '', context: '', function: ''},
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}}/v1/dataplane-evaluatecode');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
runtime: {
name: '',
runtimeVersion: ''
},
code: '',
context: '',
function: ''
});
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}}/v1/dataplane-evaluatecode',
headers: {'content-type': 'application/json'},
data: {runtime: {name: '', runtimeVersion: ''}, code: '', context: '', function: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/dataplane-evaluatecode';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"runtime":{"name":"","runtimeVersion":""},"code":"","context":"","function":""}'
};
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 = @{ @"runtime": @{ @"name": @"", @"runtimeVersion": @"" },
@"code": @"",
@"context": @"",
@"function": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/dataplane-evaluatecode"]
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}}/v1/dataplane-evaluatecode" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/dataplane-evaluatecode",
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([
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => '',
'context' => '',
'function' => ''
]),
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}}/v1/dataplane-evaluatecode', [
'body' => '{
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": "",
"context": "",
"function": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/dataplane-evaluatecode');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => '',
'context' => '',
'function' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => '',
'context' => '',
'function' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/dataplane-evaluatecode');
$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}}/v1/dataplane-evaluatecode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": "",
"context": "",
"function": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/dataplane-evaluatecode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": "",
"context": "",
"function": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/dataplane-evaluatecode", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/dataplane-evaluatecode"
payload = {
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": "",
"context": "",
"function": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/dataplane-evaluatecode"
payload <- "{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\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}}/v1/dataplane-evaluatecode")
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 \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\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/v1/dataplane-evaluatecode') do |req|
req.body = "{\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\",\n \"context\": \"\",\n \"function\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/dataplane-evaluatecode";
let payload = json!({
"runtime": json!({
"name": "",
"runtimeVersion": ""
}),
"code": "",
"context": "",
"function": ""
});
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}}/v1/dataplane-evaluatecode \
--header 'content-type: application/json' \
--data '{
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": "",
"context": "",
"function": ""
}'
echo '{
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": "",
"context": "",
"function": ""
}' | \
http POST {{baseUrl}}/v1/dataplane-evaluatecode \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": "",\n "context": "",\n "function": ""\n}' \
--output-document \
- {{baseUrl}}/v1/dataplane-evaluatecode
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"runtime": [
"name": "",
"runtimeVersion": ""
],
"code": "",
"context": "",
"function": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/dataplane-evaluatecode")! 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
EvaluateMappingTemplate
{{baseUrl}}/v1/dataplane-evaluatetemplate
BODY json
{
"template": "",
"context": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/dataplane-evaluatetemplate");
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 \"template\": \"\",\n \"context\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/dataplane-evaluatetemplate" {:content-type :json
:form-params {:template ""
:context ""}})
require "http/client"
url = "{{baseUrl}}/v1/dataplane-evaluatetemplate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"template\": \"\",\n \"context\": \"\"\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}}/v1/dataplane-evaluatetemplate"),
Content = new StringContent("{\n \"template\": \"\",\n \"context\": \"\"\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}}/v1/dataplane-evaluatetemplate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"template\": \"\",\n \"context\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/dataplane-evaluatetemplate"
payload := strings.NewReader("{\n \"template\": \"\",\n \"context\": \"\"\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/v1/dataplane-evaluatetemplate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"template": "",
"context": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/dataplane-evaluatetemplate")
.setHeader("content-type", "application/json")
.setBody("{\n \"template\": \"\",\n \"context\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/dataplane-evaluatetemplate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"template\": \"\",\n \"context\": \"\"\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 \"template\": \"\",\n \"context\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/dataplane-evaluatetemplate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/dataplane-evaluatetemplate")
.header("content-type", "application/json")
.body("{\n \"template\": \"\",\n \"context\": \"\"\n}")
.asString();
const data = JSON.stringify({
template: '',
context: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/dataplane-evaluatetemplate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/dataplane-evaluatetemplate',
headers: {'content-type': 'application/json'},
data: {template: '', context: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/dataplane-evaluatetemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"template":"","context":""}'
};
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}}/v1/dataplane-evaluatetemplate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "template": "",\n "context": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"template\": \"\",\n \"context\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/dataplane-evaluatetemplate")
.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/v1/dataplane-evaluatetemplate',
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({template: '', context: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/dataplane-evaluatetemplate',
headers: {'content-type': 'application/json'},
body: {template: '', context: ''},
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}}/v1/dataplane-evaluatetemplate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
template: '',
context: ''
});
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}}/v1/dataplane-evaluatetemplate',
headers: {'content-type': 'application/json'},
data: {template: '', context: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/dataplane-evaluatetemplate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"template":"","context":""}'
};
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 = @{ @"template": @"",
@"context": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/dataplane-evaluatetemplate"]
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}}/v1/dataplane-evaluatetemplate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"template\": \"\",\n \"context\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/dataplane-evaluatetemplate",
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([
'template' => '',
'context' => ''
]),
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}}/v1/dataplane-evaluatetemplate', [
'body' => '{
"template": "",
"context": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/dataplane-evaluatetemplate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'template' => '',
'context' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'template' => '',
'context' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/dataplane-evaluatetemplate');
$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}}/v1/dataplane-evaluatetemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"template": "",
"context": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/dataplane-evaluatetemplate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"template": "",
"context": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"template\": \"\",\n \"context\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/dataplane-evaluatetemplate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/dataplane-evaluatetemplate"
payload = {
"template": "",
"context": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/dataplane-evaluatetemplate"
payload <- "{\n \"template\": \"\",\n \"context\": \"\"\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}}/v1/dataplane-evaluatetemplate")
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 \"template\": \"\",\n \"context\": \"\"\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/v1/dataplane-evaluatetemplate') do |req|
req.body = "{\n \"template\": \"\",\n \"context\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/dataplane-evaluatetemplate";
let payload = json!({
"template": "",
"context": ""
});
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}}/v1/dataplane-evaluatetemplate \
--header 'content-type: application/json' \
--data '{
"template": "",
"context": ""
}'
echo '{
"template": "",
"context": ""
}' | \
http POST {{baseUrl}}/v1/dataplane-evaluatetemplate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "template": "",\n "context": ""\n}' \
--output-document \
- {{baseUrl}}/v1/dataplane-evaluatetemplate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"template": "",
"context": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/dataplane-evaluatetemplate")! 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
FlushApiCache
{{baseUrl}}/v1/apis/:apiId/FlushCache
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/FlushCache");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/apis/:apiId/FlushCache")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/FlushCache"
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}}/v1/apis/:apiId/FlushCache"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/FlushCache");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/FlushCache"
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/v1/apis/:apiId/FlushCache HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/apis/:apiId/FlushCache")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/FlushCache"))
.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}}/v1/apis/:apiId/FlushCache")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/apis/:apiId/FlushCache")
.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}}/v1/apis/:apiId/FlushCache');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/apis/:apiId/FlushCache'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/FlushCache';
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}}/v1/apis/:apiId/FlushCache',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/FlushCache")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/FlushCache',
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}}/v1/apis/:apiId/FlushCache'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/apis/:apiId/FlushCache');
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}}/v1/apis/:apiId/FlushCache'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/FlushCache';
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}}/v1/apis/:apiId/FlushCache"]
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}}/v1/apis/:apiId/FlushCache" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/FlushCache",
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}}/v1/apis/:apiId/FlushCache');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/FlushCache');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/FlushCache');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/FlushCache' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/FlushCache' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/apis/:apiId/FlushCache")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/FlushCache"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/FlushCache"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/FlushCache")
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/v1/apis/:apiId/FlushCache') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/FlushCache";
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}}/v1/apis/:apiId/FlushCache
http DELETE {{baseUrl}}/v1/apis/:apiId/FlushCache
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/FlushCache
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/FlushCache")! 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
GetApiAssociation
{{baseUrl}}/v1/domainnames/:domainName/apiassociation
QUERY PARAMS
domainName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/domainnames/:domainName/apiassociation");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
require "http/client"
url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
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}}/v1/domainnames/:domainName/apiassociation"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/domainnames/:domainName/apiassociation");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
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/v1/domainnames/:domainName/apiassociation HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/domainnames/:domainName/apiassociation"))
.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}}/v1/domainnames/:domainName/apiassociation")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.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}}/v1/domainnames/:domainName/apiassociation');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/domainnames/:domainName/apiassociation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/domainnames/:domainName/apiassociation';
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}}/v1/domainnames/:domainName/apiassociation',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/domainnames/:domainName/apiassociation',
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}}/v1/domainnames/:domainName/apiassociation'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
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}}/v1/domainnames/:domainName/apiassociation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/domainnames/:domainName/apiassociation';
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}}/v1/domainnames/:domainName/apiassociation"]
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}}/v1/domainnames/:domainName/apiassociation" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/domainnames/:domainName/apiassociation",
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}}/v1/domainnames/:domainName/apiassociation');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/domainnames/:domainName/apiassociation');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/domainnames/:domainName/apiassociation' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/domainnames/:domainName/apiassociation' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/domainnames/:domainName/apiassociation")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/domainnames/:domainName/apiassociation"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/domainnames/:domainName/apiassociation")
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/v1/domainnames/:domainName/apiassociation') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/domainnames/:domainName/apiassociation";
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}}/v1/domainnames/:domainName/apiassociation
http GET {{baseUrl}}/v1/domainnames/:domainName/apiassociation
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/domainnames/:domainName/apiassociation
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/domainnames/:domainName/apiassociation")! 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
GetApiCache
{{baseUrl}}/v1/apis/:apiId/ApiCaches
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/ApiCaches");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/ApiCaches")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
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}}/v1/apis/:apiId/ApiCaches"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/ApiCaches");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
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/v1/apis/:apiId/ApiCaches HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/ApiCaches"))
.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}}/v1/apis/:apiId/ApiCaches")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.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}}/v1/apis/:apiId/ApiCaches');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/ApiCaches';
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}}/v1/apis/:apiId/ApiCaches',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/ApiCaches',
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}}/v1/apis/:apiId/ApiCaches'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/ApiCaches');
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}}/v1/apis/:apiId/ApiCaches'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/ApiCaches';
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}}/v1/apis/:apiId/ApiCaches"]
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}}/v1/apis/:apiId/ApiCaches" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/ApiCaches",
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}}/v1/apis/:apiId/ApiCaches');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/ApiCaches');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/ApiCaches');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/ApiCaches' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/ApiCaches' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/ApiCaches")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/ApiCaches"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/ApiCaches")
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/v1/apis/:apiId/ApiCaches') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches";
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}}/v1/apis/:apiId/ApiCaches
http GET {{baseUrl}}/v1/apis/:apiId/ApiCaches
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/ApiCaches
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/ApiCaches")! 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
GetDataSource
{{baseUrl}}/v1/apis/:apiId/datasources/:name
QUERY PARAMS
apiId
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/datasources/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/datasources/:name")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/datasources/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/datasources/: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/v1/apis/:apiId/datasources/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/datasources/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/:name');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/datasources/:name'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/datasources/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/:name'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/datasources/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/datasources/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/datasources/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/datasources/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/datasources/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/datasources/: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/v1/apis/:apiId/datasources/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/datasources/: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}}/v1/apis/:apiId/datasources/:name
http GET {{baseUrl}}/v1/apis/:apiId/datasources/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/datasources/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/datasources/: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()
GET
GetDomainName
{{baseUrl}}/v1/domainnames/:domainName
QUERY PARAMS
domainName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/domainnames/:domainName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/domainnames/:domainName")
require "http/client"
url = "{{baseUrl}}/v1/domainnames/:domainName"
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}}/v1/domainnames/:domainName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/domainnames/:domainName");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/domainnames/:domainName"
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/v1/domainnames/:domainName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/domainnames/:domainName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/domainnames/:domainName"))
.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}}/v1/domainnames/:domainName")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/domainnames/:domainName")
.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}}/v1/domainnames/:domainName');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/domainnames/:domainName'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/domainnames/:domainName';
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}}/v1/domainnames/:domainName',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/domainnames/:domainName")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/domainnames/:domainName',
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}}/v1/domainnames/:domainName'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/domainnames/:domainName');
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}}/v1/domainnames/:domainName'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/domainnames/:domainName';
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}}/v1/domainnames/:domainName"]
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}}/v1/domainnames/:domainName" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/domainnames/:domainName",
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}}/v1/domainnames/:domainName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/domainnames/:domainName');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/domainnames/:domainName');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/domainnames/:domainName' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/domainnames/:domainName' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/domainnames/:domainName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/domainnames/:domainName"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/domainnames/:domainName"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/domainnames/:domainName")
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/v1/domainnames/:domainName') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/domainnames/:domainName";
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}}/v1/domainnames/:domainName
http GET {{baseUrl}}/v1/domainnames/:domainName
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/domainnames/:domainName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/domainnames/:domainName")! 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
GetFunction
{{baseUrl}}/v1/apis/:apiId/functions/:functionId
QUERY PARAMS
apiId
functionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/functions/:functionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
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}}/v1/apis/:apiId/functions/:functionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/functions/:functionId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
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/v1/apis/:apiId/functions/:functionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/functions/:functionId"))
.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}}/v1/apis/:apiId/functions/:functionId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.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}}/v1/apis/:apiId/functions/:functionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/functions/:functionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/functions/:functionId';
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}}/v1/apis/:apiId/functions/:functionId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/functions/:functionId',
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}}/v1/apis/:apiId/functions/:functionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
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}}/v1/apis/:apiId/functions/:functionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/functions/:functionId';
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}}/v1/apis/:apiId/functions/:functionId"]
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}}/v1/apis/:apiId/functions/:functionId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/functions/:functionId",
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}}/v1/apis/:apiId/functions/:functionId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/functions/:functionId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/functions/:functionId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/functions/:functionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
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/v1/apis/:apiId/functions/:functionId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId";
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}}/v1/apis/:apiId/functions/:functionId
http GET {{baseUrl}}/v1/apis/:apiId/functions/:functionId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/functions/:functionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/functions/:functionId")! 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
GetGraphqlApi
{{baseUrl}}/v1/apis/:apiId
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId"
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}}/v1/apis/:apiId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId"
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/v1/apis/:apiId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId"))
.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}}/v1/apis/:apiId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId")
.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}}/v1/apis/:apiId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/apis/:apiId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId';
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}}/v1/apis/:apiId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId',
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}}/v1/apis/:apiId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId');
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}}/v1/apis/:apiId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId';
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}}/v1/apis/:apiId"]
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}}/v1/apis/:apiId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId",
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}}/v1/apis/:apiId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId")
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/v1/apis/:apiId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId";
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}}/v1/apis/:apiId
http GET {{baseUrl}}/v1/apis/:apiId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId")! 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
GetIntrospectionSchema
{{baseUrl}}/v1/apis/:apiId/schema#format
QUERY PARAMS
format
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/schema?format=#format");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/schema#format" {:query-params {:format ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/schema?format=#format"
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}}/v1/apis/:apiId/schema?format=#format"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/schema?format=#format");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/schema?format=#format"
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/v1/apis/:apiId/schema?format= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/schema?format=#format")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/schema?format=#format"))
.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}}/v1/apis/:apiId/schema?format=#format")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/schema?format=#format")
.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}}/v1/apis/:apiId/schema?format=#format');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/schema#format',
params: {format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/schema?format=#format';
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}}/v1/apis/:apiId/schema?format=#format',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/schema?format=#format")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/schema?format=',
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}}/v1/apis/:apiId/schema#format',
qs: {format: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/schema#format');
req.query({
format: ''
});
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}}/v1/apis/:apiId/schema#format',
params: {format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/schema?format=#format';
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}}/v1/apis/:apiId/schema?format=#format"]
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}}/v1/apis/:apiId/schema?format=#format" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/schema?format=#format",
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}}/v1/apis/:apiId/schema?format=#format');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/schema#format');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'format' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/schema#format');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'format' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/schema?format=#format' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/schema?format=#format' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/schema?format=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/schema#format"
querystring = {"format":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/schema#format"
queryString <- list(format = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/schema?format=#format")
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/v1/apis/:apiId/schema') do |req|
req.params['format'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/schema#format";
let querystring = [
("format", ""),
];
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}}/v1/apis/:apiId/schema?format=#format'
http GET '{{baseUrl}}/v1/apis/:apiId/schema?format=#format'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/apis/:apiId/schema?format=#format'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/schema?format=#format")! 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
GetResolver
{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
QUERY PARAMS
apiId
typeName
fieldName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
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/v1/apis/:apiId/types/:typeName/resolvers/:fieldName HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"))
.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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName';
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName';
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"]
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName",
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
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/v1/apis/:apiId/types/:typeName/resolvers/:fieldName') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName";
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
http GET {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")! 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
GetSchemaCreationStatus
{{baseUrl}}/v1/apis/:apiId/schemacreation
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/schemacreation");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/schemacreation")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/schemacreation"
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}}/v1/apis/:apiId/schemacreation"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/schemacreation");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/schemacreation"
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/v1/apis/:apiId/schemacreation HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/schemacreation")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/schemacreation"))
.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}}/v1/apis/:apiId/schemacreation")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/schemacreation")
.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}}/v1/apis/:apiId/schemacreation');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/schemacreation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/schemacreation';
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}}/v1/apis/:apiId/schemacreation',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/schemacreation")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/schemacreation',
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}}/v1/apis/:apiId/schemacreation'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/schemacreation');
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}}/v1/apis/:apiId/schemacreation'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/schemacreation';
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}}/v1/apis/:apiId/schemacreation"]
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}}/v1/apis/:apiId/schemacreation" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/schemacreation",
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}}/v1/apis/:apiId/schemacreation');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/schemacreation');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/schemacreation');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/schemacreation' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/schemacreation' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/schemacreation")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/schemacreation"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/schemacreation"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/schemacreation")
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/v1/apis/:apiId/schemacreation') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/schemacreation";
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}}/v1/apis/:apiId/schemacreation
http GET {{baseUrl}}/v1/apis/:apiId/schemacreation
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/schemacreation
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/schemacreation")! 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
GetType
{{baseUrl}}/v1/apis/:apiId/types/:typeName#format
QUERY PARAMS
format
apiId
typeName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/types/:typeName#format" {:query-params {:format ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format"
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}}/v1/apis/:apiId/types/:typeName?format=#format"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format"
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/v1/apis/:apiId/types/:typeName?format= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format"))
.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}}/v1/apis/:apiId/types/:typeName?format=#format")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format")
.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}}/v1/apis/:apiId/types/:typeName?format=#format');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName#format',
params: {format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format';
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}}/v1/apis/:apiId/types/:typeName?format=#format',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/types/:typeName?format=',
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}}/v1/apis/:apiId/types/:typeName#format',
qs: {format: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/types/:typeName#format');
req.query({
format: ''
});
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}}/v1/apis/:apiId/types/:typeName#format',
params: {format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format';
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}}/v1/apis/:apiId/types/:typeName?format=#format"]
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}}/v1/apis/:apiId/types/:typeName?format=#format" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format",
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}}/v1/apis/:apiId/types/:typeName?format=#format');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName#format');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'format' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName#format');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'format' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/types/:typeName?format=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName#format"
querystring = {"format":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types/:typeName#format"
queryString <- list(format = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format")
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/v1/apis/:apiId/types/:typeName') do |req|
req.params['format'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName#format";
let querystring = [
("format", ""),
];
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}}/v1/apis/:apiId/types/:typeName?format=#format'
http GET '{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types/:typeName?format=#format")! 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
ListApiKeys
{{baseUrl}}/v1/apis/:apiId/apikeys
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/apikeys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/apikeys")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/apikeys"
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}}/v1/apis/:apiId/apikeys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/apikeys");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/apikeys"
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/v1/apis/:apiId/apikeys HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/apikeys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/apikeys"))
.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}}/v1/apis/:apiId/apikeys")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/apikeys")
.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}}/v1/apis/:apiId/apikeys');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/apis/:apiId/apikeys'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/apikeys';
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}}/v1/apis/:apiId/apikeys',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/apikeys")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/apikeys',
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}}/v1/apis/:apiId/apikeys'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/apikeys');
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}}/v1/apis/:apiId/apikeys'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/apikeys';
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}}/v1/apis/:apiId/apikeys"]
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}}/v1/apis/:apiId/apikeys" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/apikeys",
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}}/v1/apis/:apiId/apikeys');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/apikeys');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/apikeys');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/apikeys' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/apikeys' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/apikeys")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/apikeys"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/apikeys"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/apikeys")
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/v1/apis/:apiId/apikeys') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/apikeys";
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}}/v1/apis/:apiId/apikeys
http GET {{baseUrl}}/v1/apis/:apiId/apikeys
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/apikeys
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/apikeys")! 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
ListDataSources
{{baseUrl}}/v1/apis/:apiId/datasources
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/datasources");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/datasources")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/datasources"
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}}/v1/apis/:apiId/datasources"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/datasources");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/datasources"
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/v1/apis/:apiId/datasources HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/datasources")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/datasources"))
.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}}/v1/apis/:apiId/datasources")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/datasources")
.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}}/v1/apis/:apiId/datasources');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/apis/:apiId/datasources'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/datasources';
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}}/v1/apis/:apiId/datasources',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/datasources")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/datasources',
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}}/v1/apis/:apiId/datasources'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/datasources');
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}}/v1/apis/:apiId/datasources'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/datasources';
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}}/v1/apis/:apiId/datasources"]
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}}/v1/apis/:apiId/datasources" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/datasources",
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}}/v1/apis/:apiId/datasources');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/datasources');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/datasources');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/datasources' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/datasources' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/datasources")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/datasources"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/datasources"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/datasources")
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/v1/apis/:apiId/datasources') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/datasources";
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}}/v1/apis/:apiId/datasources
http GET {{baseUrl}}/v1/apis/:apiId/datasources
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/datasources
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/datasources")! 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
ListDomainNames
{{baseUrl}}/v1/domainnames
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/domainnames");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/domainnames")
require "http/client"
url = "{{baseUrl}}/v1/domainnames"
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}}/v1/domainnames"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/domainnames");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/domainnames"
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/v1/domainnames HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/domainnames")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/domainnames"))
.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}}/v1/domainnames")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/domainnames")
.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}}/v1/domainnames');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/domainnames'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/domainnames';
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}}/v1/domainnames',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/domainnames")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/domainnames',
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}}/v1/domainnames'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/domainnames');
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}}/v1/domainnames'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/domainnames';
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}}/v1/domainnames"]
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}}/v1/domainnames" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/domainnames",
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}}/v1/domainnames');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/domainnames');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/domainnames');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/domainnames' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/domainnames' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/domainnames")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/domainnames"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/domainnames"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/domainnames")
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/v1/domainnames') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/domainnames";
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}}/v1/domainnames
http GET {{baseUrl}}/v1/domainnames
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/domainnames
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/domainnames")! 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
ListFunctions
{{baseUrl}}/v1/apis/:apiId/functions
QUERY PARAMS
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/functions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/functions")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/functions"
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}}/v1/apis/:apiId/functions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/functions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/functions"
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/v1/apis/:apiId/functions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/functions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/functions"))
.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}}/v1/apis/:apiId/functions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/functions")
.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}}/v1/apis/:apiId/functions');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/apis/:apiId/functions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/functions';
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}}/v1/apis/:apiId/functions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/functions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/functions',
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}}/v1/apis/:apiId/functions'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/functions');
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}}/v1/apis/:apiId/functions'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/functions';
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}}/v1/apis/:apiId/functions"]
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}}/v1/apis/:apiId/functions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/functions",
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}}/v1/apis/:apiId/functions');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/functions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/functions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/functions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/functions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/functions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/functions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/functions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/functions")
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/v1/apis/:apiId/functions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/functions";
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}}/v1/apis/:apiId/functions
http GET {{baseUrl}}/v1/apis/:apiId/functions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/functions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/functions")! 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
ListGraphqlApis
{{baseUrl}}/v1/apis
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis")
require "http/client"
url = "{{baseUrl}}/v1/apis"
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}}/v1/apis"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis"
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/v1/apis HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis"))
.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}}/v1/apis")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis")
.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}}/v1/apis');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/apis'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis';
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}}/v1/apis',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis',
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}}/v1/apis'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis');
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}}/v1/apis'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis';
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}}/v1/apis"]
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}}/v1/apis" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis",
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}}/v1/apis');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis")
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/v1/apis') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis";
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}}/v1/apis
http GET {{baseUrl}}/v1/apis
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis")! 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
ListResolvers
{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers
QUERY PARAMS
apiId
typeName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"
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}}/v1/apis/:apiId/types/:typeName/resolvers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"
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/v1/apis/:apiId/types/:typeName/resolvers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"))
.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}}/v1/apis/:apiId/types/:typeName/resolvers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
.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}}/v1/apis/:apiId/types/:typeName/resolvers');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers';
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}}/v1/apis/:apiId/types/:typeName/resolvers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/types/:typeName/resolvers',
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}}/v1/apis/:apiId/types/:typeName/resolvers'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers');
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}}/v1/apis/:apiId/types/:typeName/resolvers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers';
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}}/v1/apis/:apiId/types/:typeName/resolvers"]
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}}/v1/apis/:apiId/types/:typeName/resolvers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers",
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}}/v1/apis/:apiId/types/:typeName/resolvers');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/types/:typeName/resolvers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")
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/v1/apis/:apiId/types/:typeName/resolvers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers";
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}}/v1/apis/:apiId/types/:typeName/resolvers
http GET {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers")! 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
ListResolversByFunction
{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers
QUERY PARAMS
apiId
functionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers")
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers"
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}}/v1/apis/:apiId/functions/:functionId/resolvers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers"
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/v1/apis/:apiId/functions/:functionId/resolvers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers"))
.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}}/v1/apis/:apiId/functions/:functionId/resolvers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers")
.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}}/v1/apis/:apiId/functions/:functionId/resolvers');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers';
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}}/v1/apis/:apiId/functions/:functionId/resolvers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/functions/:functionId/resolvers',
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}}/v1/apis/:apiId/functions/:functionId/resolvers'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers');
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}}/v1/apis/:apiId/functions/:functionId/resolvers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers';
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}}/v1/apis/:apiId/functions/:functionId/resolvers"]
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}}/v1/apis/:apiId/functions/:functionId/resolvers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers",
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}}/v1/apis/:apiId/functions/:functionId/resolvers');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/functions/:functionId/resolvers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers")
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/v1/apis/:apiId/functions/:functionId/resolvers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers";
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}}/v1/apis/:apiId/functions/:functionId/resolvers
http GET {{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/functions/:functionId/resolvers")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListTagsForResource
{{baseUrl}}/v1/tags/:resourceArn
QUERY PARAMS
resourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/tags/:resourceArn");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/tags/:resourceArn")
require "http/client"
url = "{{baseUrl}}/v1/tags/:resourceArn"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/tags/:resourceArn"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/tags/:resourceArn");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/tags/:resourceArn"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/tags/:resourceArn HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/tags/:resourceArn")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/tags/:resourceArn"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/tags/:resourceArn")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/tags/:resourceArn")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/tags/:resourceArn');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/tags/:resourceArn'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/tags/:resourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/tags/:resourceArn',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/tags/:resourceArn")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/tags/:resourceArn',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/tags/:resourceArn'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/tags/:resourceArn');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/tags/:resourceArn'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/tags/:resourceArn';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/tags/:resourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/tags/:resourceArn" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/tags/:resourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/tags/:resourceArn');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/tags/:resourceArn');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/tags/:resourceArn');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/tags/:resourceArn' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/tags/:resourceArn' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/tags/:resourceArn")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/tags/:resourceArn"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/tags/:resourceArn"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/tags/:resourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/tags/:resourceArn') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/tags/:resourceArn";
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}}/v1/tags/:resourceArn
http GET {{baseUrl}}/v1/tags/:resourceArn
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/tags/:resourceArn
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/tags/:resourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListTypes
{{baseUrl}}/v1/apis/:apiId/types#format
QUERY PARAMS
format
apiId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types?format=#format");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/apis/:apiId/types#format" {:query-params {:format ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types?format=#format"
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}}/v1/apis/:apiId/types?format=#format"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/types?format=#format");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types?format=#format"
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/v1/apis/:apiId/types?format= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/apis/:apiId/types?format=#format")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types?format=#format"))
.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}}/v1/apis/:apiId/types?format=#format")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/apis/:apiId/types?format=#format")
.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}}/v1/apis/:apiId/types?format=#format');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1/apis/:apiId/types#format',
params: {format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types?format=#format';
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}}/v1/apis/:apiId/types?format=#format',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types?format=#format")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/apis/:apiId/types?format=',
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}}/v1/apis/:apiId/types#format',
qs: {format: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/apis/:apiId/types#format');
req.query({
format: ''
});
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}}/v1/apis/:apiId/types#format',
params: {format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types?format=#format';
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}}/v1/apis/:apiId/types?format=#format"]
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}}/v1/apis/:apiId/types?format=#format" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types?format=#format",
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}}/v1/apis/:apiId/types?format=#format');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types#format');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'format' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types#format');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'format' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/apis/:apiId/types?format=#format' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types?format=#format' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/apis/:apiId/types?format=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types#format"
querystring = {"format":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types#format"
queryString <- list(format = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/types?format=#format")
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/v1/apis/:apiId/types') do |req|
req.params['format'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types#format";
let querystring = [
("format", ""),
];
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}}/v1/apis/:apiId/types?format=#format'
http GET '{{baseUrl}}/v1/apis/:apiId/types?format=#format'
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/v1/apis/:apiId/types?format=#format'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types?format=#format")! 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
StartSchemaCreation
{{baseUrl}}/v1/apis/:apiId/schemacreation
QUERY PARAMS
apiId
BODY json
{
"definition": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/schemacreation");
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 \"definition\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/schemacreation" {:content-type :json
:form-params {:definition ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/schemacreation"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"definition\": \"\"\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}}/v1/apis/:apiId/schemacreation"),
Content = new StringContent("{\n \"definition\": \"\"\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}}/v1/apis/:apiId/schemacreation");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"definition\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/schemacreation"
payload := strings.NewReader("{\n \"definition\": \"\"\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/v1/apis/:apiId/schemacreation HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"definition": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/schemacreation")
.setHeader("content-type", "application/json")
.setBody("{\n \"definition\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/schemacreation"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"definition\": \"\"\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 \"definition\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/schemacreation")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/schemacreation")
.header("content-type", "application/json")
.body("{\n \"definition\": \"\"\n}")
.asString();
const data = JSON.stringify({
definition: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/schemacreation');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/schemacreation',
headers: {'content-type': 'application/json'},
data: {definition: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/schemacreation';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"definition":""}'
};
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}}/v1/apis/:apiId/schemacreation',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "definition": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"definition\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/schemacreation")
.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/v1/apis/:apiId/schemacreation',
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({definition: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/schemacreation',
headers: {'content-type': 'application/json'},
body: {definition: ''},
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}}/v1/apis/:apiId/schemacreation');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
definition: ''
});
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}}/v1/apis/:apiId/schemacreation',
headers: {'content-type': 'application/json'},
data: {definition: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/schemacreation';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"definition":""}'
};
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 = @{ @"definition": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/schemacreation"]
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}}/v1/apis/:apiId/schemacreation" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"definition\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/schemacreation",
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([
'definition' => ''
]),
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}}/v1/apis/:apiId/schemacreation', [
'body' => '{
"definition": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/schemacreation');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'definition' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'definition' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/schemacreation');
$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}}/v1/apis/:apiId/schemacreation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"definition": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/schemacreation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"definition": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"definition\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/schemacreation", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/schemacreation"
payload = { "definition": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/schemacreation"
payload <- "{\n \"definition\": \"\"\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}}/v1/apis/:apiId/schemacreation")
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 \"definition\": \"\"\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/v1/apis/:apiId/schemacreation') do |req|
req.body = "{\n \"definition\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/schemacreation";
let payload = json!({"definition": ""});
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}}/v1/apis/:apiId/schemacreation \
--header 'content-type: application/json' \
--data '{
"definition": ""
}'
echo '{
"definition": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/schemacreation \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "definition": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/schemacreation
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["definition": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/schemacreation")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
TagResource
{{baseUrl}}/v1/tags/:resourceArn
QUERY PARAMS
resourceArn
BODY json
{
"tags": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/tags/:resourceArn");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"tags\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/tags/:resourceArn" {:content-type :json
:form-params {:tags {}}})
require "http/client"
url = "{{baseUrl}}/v1/tags/:resourceArn"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"tags\": {}\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/tags/:resourceArn"),
Content = new StringContent("{\n \"tags\": {}\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/tags/:resourceArn");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"tags\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/tags/:resourceArn"
payload := strings.NewReader("{\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/tags/:resourceArn HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"tags": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/tags/:resourceArn")
.setHeader("content-type", "application/json")
.setBody("{\n \"tags\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/tags/:resourceArn"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"tags\": {}\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"tags\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/tags/:resourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/tags/:resourceArn")
.header("content-type", "application/json")
.body("{\n \"tags\": {}\n}")
.asString();
const data = JSON.stringify({
tags: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/tags/:resourceArn');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/tags/:resourceArn',
headers: {'content-type': 'application/json'},
data: {tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/tags/:resourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/tags/:resourceArn',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "tags": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"tags\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/tags/:resourceArn")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/tags/:resourceArn',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({tags: {}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/tags/:resourceArn',
headers: {'content-type': 'application/json'},
body: {tags: {}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/tags/:resourceArn');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
tags: {}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/tags/:resourceArn',
headers: {'content-type': 'application/json'},
data: {tags: {}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/tags/:resourceArn';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"tags":{}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"tags": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/tags/:resourceArn"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/tags/:resourceArn" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"tags\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/tags/:resourceArn",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/tags/:resourceArn', [
'body' => '{
"tags": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/tags/:resourceArn');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/tags/:resourceArn');
$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}}/v1/tags/:resourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/tags/:resourceArn' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"tags": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"tags\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/tags/:resourceArn", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/tags/:resourceArn"
payload = { "tags": {} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/tags/:resourceArn"
payload <- "{\n \"tags\": {}\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/tags/:resourceArn")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/tags/:resourceArn') do |req|
req.body = "{\n \"tags\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/tags/:resourceArn";
let payload = json!({"tags": json!({})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/tags/:resourceArn \
--header 'content-type: application/json' \
--data '{
"tags": {}
}'
echo '{
"tags": {}
}' | \
http POST {{baseUrl}}/v1/tags/:resourceArn \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "tags": {}\n}' \
--output-document \
- {{baseUrl}}/v1/tags/:resourceArn
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["tags": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/tags/:resourceArn")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
UntagResource
{{baseUrl}}/v1/tags/:resourceArn#tagKeys
QUERY PARAMS
tagKeys
resourceArn
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/tags/:resourceArn#tagKeys" {:query-params {:tagKeys ""}})
require "http/client"
url = "{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/tags/:resourceArn?tagKeys= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/tags/:resourceArn#tagKeys',
params: {tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/tags/:resourceArn?tagKeys=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/tags/:resourceArn#tagKeys',
qs: {tagKeys: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/tags/:resourceArn#tagKeys');
req.query({
tagKeys: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1/tags/:resourceArn#tagKeys',
params: {tagKeys: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/tags/:resourceArn#tagKeys');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'tagKeys' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/tags/:resourceArn#tagKeys');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'tagKeys' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/tags/:resourceArn?tagKeys=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/tags/:resourceArn#tagKeys"
querystring = {"tagKeys":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/tags/:resourceArn#tagKeys"
queryString <- list(tagKeys = "")
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/tags/:resourceArn') do |req|
req.params['tagKeys'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/tags/:resourceArn#tagKeys";
let querystring = [
("tagKeys", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys'
http DELETE '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys'
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys'
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/tags/:resourceArn?tagKeys=#tagKeys")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
UpdateApiCache
{{baseUrl}}/v1/apis/:apiId/ApiCaches/update
QUERY PARAMS
apiId
BODY json
{
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update");
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 \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update" {:content-type :json
:form-params {:ttl 0
:apiCachingBehavior ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\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}}/v1/apis/:apiId/ApiCaches/update"),
Content = new StringContent("{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/ApiCaches/update");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update"
payload := strings.NewReader("{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\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/v1/apis/:apiId/ApiCaches/update HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 56
{
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update")
.setHeader("content-type", "application/json")
.setBody("{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/ApiCaches/update"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/ApiCaches/update")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/ApiCaches/update")
.header("content-type", "application/json")
.body("{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
ttl: 0,
apiCachingBehavior: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update',
headers: {'content-type': 'application/json'},
data: {ttl: 0, apiCachingBehavior: '', type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ttl":0,"apiCachingBehavior":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ttl": 0,\n "apiCachingBehavior": "",\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/ApiCaches/update")
.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/v1/apis/:apiId/ApiCaches/update',
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({ttl: 0, apiCachingBehavior: '', type: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update',
headers: {'content-type': 'application/json'},
body: {ttl: 0, apiCachingBehavior: '', type: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ttl: 0,
apiCachingBehavior: '',
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update',
headers: {'content-type': 'application/json'},
data: {ttl: 0, apiCachingBehavior: '', type: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ttl":0,"apiCachingBehavior":"","type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ttl": @0,
@"apiCachingBehavior": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/ApiCaches/update"]
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}}/v1/apis/:apiId/ApiCaches/update" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/ApiCaches/update",
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([
'ttl' => 0,
'apiCachingBehavior' => '',
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update', [
'body' => '{
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/ApiCaches/update');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ttl' => 0,
'apiCachingBehavior' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ttl' => 0,
'apiCachingBehavior' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/ApiCaches/update');
$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}}/v1/apis/:apiId/ApiCaches/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/ApiCaches/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/ApiCaches/update", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update"
payload = {
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update"
payload <- "{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\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}}/v1/apis/:apiId/ApiCaches/update")
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 \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/apis/:apiId/ApiCaches/update') do |req|
req.body = "{\n \"ttl\": 0,\n \"apiCachingBehavior\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update";
let payload = json!({
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
});
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}}/v1/apis/:apiId/ApiCaches/update \
--header 'content-type: application/json' \
--data '{
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
}'
echo '{
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/ApiCaches/update \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ttl": 0,\n "apiCachingBehavior": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/ApiCaches/update
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ttl": 0,
"apiCachingBehavior": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/ApiCaches/update")! 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
UpdateApiKey
{{baseUrl}}/v1/apis/:apiId/apikeys/:id
QUERY PARAMS
apiId
id
BODY json
{
"description": "",
"expires": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/apikeys/: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 \"description\": \"\",\n \"expires\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/apikeys/:id" {:content-type :json
:form-params {:description ""
:expires 0}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/apikeys/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"expires\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/apis/:apiId/apikeys/:id"),
Content = new StringContent("{\n \"description\": \"\",\n \"expires\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/apis/:apiId/apikeys/:id");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"expires\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/apikeys/:id"
payload := strings.NewReader("{\n \"description\": \"\",\n \"expires\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/apis/:apiId/apikeys/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 39
{
"description": "",
"expires": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/apikeys/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"expires\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/apikeys/:id"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"expires\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"expires\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/apikeys/:id")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/apikeys/:id")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"expires\": 0\n}")
.asString();
const data = JSON.stringify({
description: '',
expires: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/apikeys/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/apikeys/:id',
headers: {'content-type': 'application/json'},
data: {description: '', expires: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/apikeys/:id';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","expires":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/apis/:apiId/apikeys/:id',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "expires": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"expires\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/apikeys/:id")
.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/v1/apis/:apiId/apikeys/: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({description: '', expires: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/apikeys/:id',
headers: {'content-type': 'application/json'},
body: {description: '', expires: 0},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/apis/:apiId/apikeys/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
expires: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/apikeys/:id',
headers: {'content-type': 'application/json'},
data: {description: '', expires: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/apikeys/:id';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","expires":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"expires": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/apikeys/:id"]
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}}/v1/apis/:apiId/apikeys/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"expires\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/apikeys/:id",
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([
'description' => '',
'expires' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/apis/:apiId/apikeys/:id', [
'body' => '{
"description": "",
"expires": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/apikeys/:id');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'expires' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'expires' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/apikeys/:id');
$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}}/v1/apis/:apiId/apikeys/:id' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"expires": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/apikeys/:id' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"expires": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"expires\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/apikeys/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/apikeys/:id"
payload = {
"description": "",
"expires": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/apikeys/:id"
payload <- "{\n \"description\": \"\",\n \"expires\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/apis/:apiId/apikeys/:id")
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 \"description\": \"\",\n \"expires\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/apis/:apiId/apikeys/:id') do |req|
req.body = "{\n \"description\": \"\",\n \"expires\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/apikeys/:id";
let payload = json!({
"description": "",
"expires": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/apis/:apiId/apikeys/:id \
--header 'content-type: application/json' \
--data '{
"description": "",
"expires": 0
}'
echo '{
"description": "",
"expires": 0
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/apikeys/:id \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "expires": 0\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/apikeys/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"expires": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/apikeys/:id")! 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
UpdateDataSource
{{baseUrl}}/v1/apis/:apiId/datasources/:name
QUERY PARAMS
apiId
name
BODY json
{
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/datasources/:name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/datasources/:name" {:content-type :json
:form-params {:description ""
:type ""
:serviceRoleArn ""
:dynamodbConfig {:tableName ""
:awsRegion ""
:useCallerCredentials ""
:deltaSyncConfig ""
:versioned ""}
:lambdaConfig {:lambdaFunctionArn ""}
:elasticsearchConfig {:endpoint ""
:awsRegion ""}
:openSearchServiceConfig {:endpoint ""
:awsRegion ""}
:httpConfig {:endpoint ""
:authorizationConfig ""}
:relationalDatabaseConfig {:relationalDatabaseSourceType ""
:rdsHttpEndpointConfig ""}
:eventBridgeConfig {:eventBusArn ""}}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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}}/v1/apis/:apiId/datasources/:name"),
Content = new StringContent("{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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}}/v1/apis/:apiId/datasources/:name");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
payload := strings.NewReader("{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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/v1/apis/:apiId/datasources/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 644
{
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/datasources/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/datasources/:name"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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 \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/datasources/:name")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/datasources/:name")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {
lambdaFunctionArn: ''
},
elasticsearchConfig: {
endpoint: '',
awsRegion: ''
},
openSearchServiceConfig: {
endpoint: '',
awsRegion: ''
},
httpConfig: {
endpoint: '',
authorizationConfig: ''
},
relationalDatabaseConfig: {
relationalDatabaseSourceType: '',
rdsHttpEndpointConfig: ''
},
eventBridgeConfig: {
eventBusArn: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/datasources/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/datasources/:name',
headers: {'content-type': 'application/json'},
data: {
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {lambdaFunctionArn: ''},
elasticsearchConfig: {endpoint: '', awsRegion: ''},
openSearchServiceConfig: {endpoint: '', awsRegion: ''},
httpConfig: {endpoint: '', authorizationConfig: ''},
relationalDatabaseConfig: {relationalDatabaseSourceType: '', rdsHttpEndpointConfig: ''},
eventBridgeConfig: {eventBusArn: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/datasources/:name';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","type":"","serviceRoleArn":"","dynamodbConfig":{"tableName":"","awsRegion":"","useCallerCredentials":"","deltaSyncConfig":"","versioned":""},"lambdaConfig":{"lambdaFunctionArn":""},"elasticsearchConfig":{"endpoint":"","awsRegion":""},"openSearchServiceConfig":{"endpoint":"","awsRegion":""},"httpConfig":{"endpoint":"","authorizationConfig":""},"relationalDatabaseConfig":{"relationalDatabaseSourceType":"","rdsHttpEndpointConfig":""},"eventBridgeConfig":{"eventBusArn":""}}'
};
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}}/v1/apis/:apiId/datasources/:name',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "type": "",\n "serviceRoleArn": "",\n "dynamodbConfig": {\n "tableName": "",\n "awsRegion": "",\n "useCallerCredentials": "",\n "deltaSyncConfig": "",\n "versioned": ""\n },\n "lambdaConfig": {\n "lambdaFunctionArn": ""\n },\n "elasticsearchConfig": {\n "endpoint": "",\n "awsRegion": ""\n },\n "openSearchServiceConfig": {\n "endpoint": "",\n "awsRegion": ""\n },\n "httpConfig": {\n "endpoint": "",\n "authorizationConfig": ""\n },\n "relationalDatabaseConfig": {\n "relationalDatabaseSourceType": "",\n "rdsHttpEndpointConfig": ""\n },\n "eventBridgeConfig": {\n "eventBusArn": ""\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 \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/datasources/:name")
.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/v1/apis/:apiId/datasources/:name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {lambdaFunctionArn: ''},
elasticsearchConfig: {endpoint: '', awsRegion: ''},
openSearchServiceConfig: {endpoint: '', awsRegion: ''},
httpConfig: {endpoint: '', authorizationConfig: ''},
relationalDatabaseConfig: {relationalDatabaseSourceType: '', rdsHttpEndpointConfig: ''},
eventBridgeConfig: {eventBusArn: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/datasources/:name',
headers: {'content-type': 'application/json'},
body: {
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {lambdaFunctionArn: ''},
elasticsearchConfig: {endpoint: '', awsRegion: ''},
openSearchServiceConfig: {endpoint: '', awsRegion: ''},
httpConfig: {endpoint: '', authorizationConfig: ''},
relationalDatabaseConfig: {relationalDatabaseSourceType: '', rdsHttpEndpointConfig: ''},
eventBridgeConfig: {eventBusArn: ''}
},
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}}/v1/apis/:apiId/datasources/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {
lambdaFunctionArn: ''
},
elasticsearchConfig: {
endpoint: '',
awsRegion: ''
},
openSearchServiceConfig: {
endpoint: '',
awsRegion: ''
},
httpConfig: {
endpoint: '',
authorizationConfig: ''
},
relationalDatabaseConfig: {
relationalDatabaseSourceType: '',
rdsHttpEndpointConfig: ''
},
eventBridgeConfig: {
eventBusArn: ''
}
});
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}}/v1/apis/:apiId/datasources/:name',
headers: {'content-type': 'application/json'},
data: {
description: '',
type: '',
serviceRoleArn: '',
dynamodbConfig: {
tableName: '',
awsRegion: '',
useCallerCredentials: '',
deltaSyncConfig: '',
versioned: ''
},
lambdaConfig: {lambdaFunctionArn: ''},
elasticsearchConfig: {endpoint: '', awsRegion: ''},
openSearchServiceConfig: {endpoint: '', awsRegion: ''},
httpConfig: {endpoint: '', authorizationConfig: ''},
relationalDatabaseConfig: {relationalDatabaseSourceType: '', rdsHttpEndpointConfig: ''},
eventBridgeConfig: {eventBusArn: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/datasources/:name';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","type":"","serviceRoleArn":"","dynamodbConfig":{"tableName":"","awsRegion":"","useCallerCredentials":"","deltaSyncConfig":"","versioned":""},"lambdaConfig":{"lambdaFunctionArn":""},"elasticsearchConfig":{"endpoint":"","awsRegion":""},"openSearchServiceConfig":{"endpoint":"","awsRegion":""},"httpConfig":{"endpoint":"","authorizationConfig":""},"relationalDatabaseConfig":{"relationalDatabaseSourceType":"","rdsHttpEndpointConfig":""},"eventBridgeConfig":{"eventBusArn":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"type": @"",
@"serviceRoleArn": @"",
@"dynamodbConfig": @{ @"tableName": @"", @"awsRegion": @"", @"useCallerCredentials": @"", @"deltaSyncConfig": @"", @"versioned": @"" },
@"lambdaConfig": @{ @"lambdaFunctionArn": @"" },
@"elasticsearchConfig": @{ @"endpoint": @"", @"awsRegion": @"" },
@"openSearchServiceConfig": @{ @"endpoint": @"", @"awsRegion": @"" },
@"httpConfig": @{ @"endpoint": @"", @"authorizationConfig": @"" },
@"relationalDatabaseConfig": @{ @"relationalDatabaseSourceType": @"", @"rdsHttpEndpointConfig": @"" },
@"eventBridgeConfig": @{ @"eventBusArn": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/datasources/:name"]
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}}/v1/apis/:apiId/datasources/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/datasources/:name",
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([
'description' => '',
'type' => '',
'serviceRoleArn' => '',
'dynamodbConfig' => [
'tableName' => '',
'awsRegion' => '',
'useCallerCredentials' => '',
'deltaSyncConfig' => '',
'versioned' => ''
],
'lambdaConfig' => [
'lambdaFunctionArn' => ''
],
'elasticsearchConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'openSearchServiceConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'httpConfig' => [
'endpoint' => '',
'authorizationConfig' => ''
],
'relationalDatabaseConfig' => [
'relationalDatabaseSourceType' => '',
'rdsHttpEndpointConfig' => ''
],
'eventBridgeConfig' => [
'eventBusArn' => ''
]
]),
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}}/v1/apis/:apiId/datasources/:name', [
'body' => '{
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/datasources/:name');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'type' => '',
'serviceRoleArn' => '',
'dynamodbConfig' => [
'tableName' => '',
'awsRegion' => '',
'useCallerCredentials' => '',
'deltaSyncConfig' => '',
'versioned' => ''
],
'lambdaConfig' => [
'lambdaFunctionArn' => ''
],
'elasticsearchConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'openSearchServiceConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'httpConfig' => [
'endpoint' => '',
'authorizationConfig' => ''
],
'relationalDatabaseConfig' => [
'relationalDatabaseSourceType' => '',
'rdsHttpEndpointConfig' => ''
],
'eventBridgeConfig' => [
'eventBusArn' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'type' => '',
'serviceRoleArn' => '',
'dynamodbConfig' => [
'tableName' => '',
'awsRegion' => '',
'useCallerCredentials' => '',
'deltaSyncConfig' => '',
'versioned' => ''
],
'lambdaConfig' => [
'lambdaFunctionArn' => ''
],
'elasticsearchConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'openSearchServiceConfig' => [
'endpoint' => '',
'awsRegion' => ''
],
'httpConfig' => [
'endpoint' => '',
'authorizationConfig' => ''
],
'relationalDatabaseConfig' => [
'relationalDatabaseSourceType' => '',
'rdsHttpEndpointConfig' => ''
],
'eventBridgeConfig' => [
'eventBusArn' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/datasources/:name');
$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}}/v1/apis/:apiId/datasources/:name' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/datasources/:name' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/datasources/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
payload = {
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": { "lambdaFunctionArn": "" },
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": { "eventBusArn": "" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/datasources/:name"
payload <- "{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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}}/v1/apis/:apiId/datasources/:name")
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 \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\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/v1/apis/:apiId/datasources/:name') do |req|
req.body = "{\n \"description\": \"\",\n \"type\": \"\",\n \"serviceRoleArn\": \"\",\n \"dynamodbConfig\": {\n \"tableName\": \"\",\n \"awsRegion\": \"\",\n \"useCallerCredentials\": \"\",\n \"deltaSyncConfig\": \"\",\n \"versioned\": \"\"\n },\n \"lambdaConfig\": {\n \"lambdaFunctionArn\": \"\"\n },\n \"elasticsearchConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"openSearchServiceConfig\": {\n \"endpoint\": \"\",\n \"awsRegion\": \"\"\n },\n \"httpConfig\": {\n \"endpoint\": \"\",\n \"authorizationConfig\": \"\"\n },\n \"relationalDatabaseConfig\": {\n \"relationalDatabaseSourceType\": \"\",\n \"rdsHttpEndpointConfig\": \"\"\n },\n \"eventBridgeConfig\": {\n \"eventBusArn\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/datasources/:name";
let payload = json!({
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": json!({
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
}),
"lambdaConfig": json!({"lambdaFunctionArn": ""}),
"elasticsearchConfig": json!({
"endpoint": "",
"awsRegion": ""
}),
"openSearchServiceConfig": json!({
"endpoint": "",
"awsRegion": ""
}),
"httpConfig": json!({
"endpoint": "",
"authorizationConfig": ""
}),
"relationalDatabaseConfig": json!({
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
}),
"eventBridgeConfig": json!({"eventBusArn": ""})
});
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}}/v1/apis/:apiId/datasources/:name \
--header 'content-type: application/json' \
--data '{
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}'
echo '{
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": {
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
},
"lambdaConfig": {
"lambdaFunctionArn": ""
},
"elasticsearchConfig": {
"endpoint": "",
"awsRegion": ""
},
"openSearchServiceConfig": {
"endpoint": "",
"awsRegion": ""
},
"httpConfig": {
"endpoint": "",
"authorizationConfig": ""
},
"relationalDatabaseConfig": {
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
},
"eventBridgeConfig": {
"eventBusArn": ""
}
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/datasources/:name \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "type": "",\n "serviceRoleArn": "",\n "dynamodbConfig": {\n "tableName": "",\n "awsRegion": "",\n "useCallerCredentials": "",\n "deltaSyncConfig": "",\n "versioned": ""\n },\n "lambdaConfig": {\n "lambdaFunctionArn": ""\n },\n "elasticsearchConfig": {\n "endpoint": "",\n "awsRegion": ""\n },\n "openSearchServiceConfig": {\n "endpoint": "",\n "awsRegion": ""\n },\n "httpConfig": {\n "endpoint": "",\n "authorizationConfig": ""\n },\n "relationalDatabaseConfig": {\n "relationalDatabaseSourceType": "",\n "rdsHttpEndpointConfig": ""\n },\n "eventBridgeConfig": {\n "eventBusArn": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/datasources/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"type": "",
"serviceRoleArn": "",
"dynamodbConfig": [
"tableName": "",
"awsRegion": "",
"useCallerCredentials": "",
"deltaSyncConfig": "",
"versioned": ""
],
"lambdaConfig": ["lambdaFunctionArn": ""],
"elasticsearchConfig": [
"endpoint": "",
"awsRegion": ""
],
"openSearchServiceConfig": [
"endpoint": "",
"awsRegion": ""
],
"httpConfig": [
"endpoint": "",
"authorizationConfig": ""
],
"relationalDatabaseConfig": [
"relationalDatabaseSourceType": "",
"rdsHttpEndpointConfig": ""
],
"eventBridgeConfig": ["eventBusArn": ""]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/datasources/:name")! 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
UpdateDomainName
{{baseUrl}}/v1/domainnames/:domainName
QUERY PARAMS
domainName
BODY json
{
"description": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/domainnames/:domainName");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/domainnames/:domainName" {:content-type :json
:form-params {:description ""}})
require "http/client"
url = "{{baseUrl}}/v1/domainnames/:domainName"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\"\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}}/v1/domainnames/:domainName"),
Content = new StringContent("{\n \"description\": \"\"\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}}/v1/domainnames/:domainName");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/domainnames/:domainName"
payload := strings.NewReader("{\n \"description\": \"\"\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/v1/domainnames/:domainName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"description": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/domainnames/:domainName")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/domainnames/:domainName"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/domainnames/:domainName")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/domainnames/:domainName")
.header("content-type", "application/json")
.body("{\n \"description\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/domainnames/:domainName');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/domainnames/:domainName',
headers: {'content-type': 'application/json'},
data: {description: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/domainnames/:domainName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":""}'
};
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}}/v1/domainnames/:domainName',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/domainnames/:domainName")
.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/v1/domainnames/:domainName',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/domainnames/:domainName',
headers: {'content-type': 'application/json'},
body: {description: ''},
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}}/v1/domainnames/:domainName');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: ''
});
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}}/v1/domainnames/:domainName',
headers: {'content-type': 'application/json'},
data: {description: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/domainnames/:domainName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/domainnames/:domainName"]
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}}/v1/domainnames/:domainName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/domainnames/:domainName",
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([
'description' => ''
]),
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}}/v1/domainnames/:domainName', [
'body' => '{
"description": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/domainnames/:domainName');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/domainnames/:domainName');
$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}}/v1/domainnames/:domainName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/domainnames/:domainName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/domainnames/:domainName", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/domainnames/:domainName"
payload = { "description": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/domainnames/:domainName"
payload <- "{\n \"description\": \"\"\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}}/v1/domainnames/:domainName")
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 \"description\": \"\"\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/v1/domainnames/:domainName') do |req|
req.body = "{\n \"description\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/domainnames/:domainName";
let payload = json!({"description": ""});
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}}/v1/domainnames/:domainName \
--header 'content-type: application/json' \
--data '{
"description": ""
}'
echo '{
"description": ""
}' | \
http POST {{baseUrl}}/v1/domainnames/:domainName \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": ""\n}' \
--output-document \
- {{baseUrl}}/v1/domainnames/:domainName
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["description": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/domainnames/:domainName")! 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
UpdateFunction
{{baseUrl}}/v1/apis/:apiId/functions/:functionId
QUERY PARAMS
apiId
functionId
BODY json
{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/functions/:functionId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/functions/:functionId" {:content-type :json
:form-params {:name ""
:description ""
:dataSourceName ""
:requestMappingTemplate ""
:responseMappingTemplate ""
:functionVersion ""
:syncConfig {:conflictHandler ""
:conflictDetection ""
:lambdaConflictHandlerConfig ""}
:maxBatchSize 0
:runtime {:name ""
:runtimeVersion ""}
:code ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/functions/:functionId"),
Content = new StringContent("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/functions/:functionId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
payload := strings.NewReader("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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/v1/apis/:apiId/functions/:functionId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 364
{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/functions/:functionId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
.asString();
const data = JSON.stringify({
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {
conflictHandler: '',
conflictDetection: '',
lambdaConflictHandlerConfig: ''
},
maxBatchSize: 0,
runtime: {
name: '',
runtimeVersion: ''
},
code: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/functions/:functionId',
headers: {'content-type': 'application/json'},
data: {
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/functions/:functionId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","dataSourceName":"","requestMappingTemplate":"","responseMappingTemplate":"","functionVersion":"","syncConfig":{"conflictHandler":"","conflictDetection":"","lambdaConflictHandlerConfig":""},"maxBatchSize":0,"runtime":{"name":"","runtimeVersion":""},"code":""}'
};
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}}/v1/apis/:apiId/functions/:functionId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "description": "",\n "dataSourceName": "",\n "requestMappingTemplate": "",\n "responseMappingTemplate": "",\n "functionVersion": "",\n "syncConfig": {\n "conflictHandler": "",\n "conflictDetection": "",\n "lambdaConflictHandlerConfig": ""\n },\n "maxBatchSize": 0,\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/functions/:functionId")
.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/v1/apis/:apiId/functions/:functionId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/functions/:functionId',
headers: {'content-type': 'application/json'},
body: {
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
},
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}}/v1/apis/:apiId/functions/:functionId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {
conflictHandler: '',
conflictDetection: '',
lambdaConflictHandlerConfig: ''
},
maxBatchSize: 0,
runtime: {
name: '',
runtimeVersion: ''
},
code: ''
});
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}}/v1/apis/:apiId/functions/:functionId',
headers: {'content-type': 'application/json'},
data: {
name: '',
description: '',
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
functionVersion: '',
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/functions/:functionId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","description":"","dataSourceName":"","requestMappingTemplate":"","responseMappingTemplate":"","functionVersion":"","syncConfig":{"conflictHandler":"","conflictDetection":"","lambdaConflictHandlerConfig":""},"maxBatchSize":0,"runtime":{"name":"","runtimeVersion":""},"code":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"name": @"",
@"description": @"",
@"dataSourceName": @"",
@"requestMappingTemplate": @"",
@"responseMappingTemplate": @"",
@"functionVersion": @"",
@"syncConfig": @{ @"conflictHandler": @"", @"conflictDetection": @"", @"lambdaConflictHandlerConfig": @"" },
@"maxBatchSize": @0,
@"runtime": @{ @"name": @"", @"runtimeVersion": @"" },
@"code": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/functions/:functionId"]
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}}/v1/apis/:apiId/functions/:functionId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/functions/:functionId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '',
'description' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'functionVersion' => '',
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]),
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}}/v1/apis/:apiId/functions/:functionId', [
'body' => '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'description' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'functionVersion' => '',
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'description' => '',
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'functionVersion' => '',
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/functions/:functionId');
$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}}/v1/apis/:apiId/functions/:functionId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/functions/:functionId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/functions/:functionId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
payload = {
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/functions/:functionId"
payload <- "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/functions/:functionId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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/v1/apis/:apiId/functions/:functionId') do |req|
req.body = "{\n \"name\": \"\",\n \"description\": \"\",\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"functionVersion\": \"\",\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/functions/:functionId";
let payload = json!({
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": json!({
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
}),
"maxBatchSize": 0,
"runtime": json!({
"name": "",
"runtimeVersion": ""
}),
"code": ""
});
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}}/v1/apis/:apiId/functions/:functionId \
--header 'content-type: application/json' \
--data '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
echo '{
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/functions/:functionId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "description": "",\n "dataSourceName": "",\n "requestMappingTemplate": "",\n "responseMappingTemplate": "",\n "functionVersion": "",\n "syncConfig": {\n "conflictHandler": "",\n "conflictDetection": "",\n "lambdaConflictHandlerConfig": ""\n },\n "maxBatchSize": 0,\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/functions/:functionId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"description": "",
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"functionVersion": "",
"syncConfig": [
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
],
"maxBatchSize": 0,
"runtime": [
"name": "",
"runtimeVersion": ""
],
"code": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/functions/:functionId")! 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
UpdateGraphqlApi
{{baseUrl}}/v1/apis/:apiId
QUERY PARAMS
apiId
BODY json
{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId");
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 \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId" {:content-type :json
:form-params {:name ""
:logConfig {:fieldLogLevel ""
:cloudWatchLogsRoleArn ""
:excludeVerboseContent ""}
:authenticationType ""
:userPoolConfig {:userPoolId ""
:awsRegion ""
:defaultAction ""
:appIdClientRegex ""}
:openIDConnectConfig {:issuer ""
:clientId ""
:iatTTL ""
:authTTL ""}
:additionalAuthenticationProviders [{:authenticationType ""
:openIDConnectConfig ""
:userPoolConfig ""
:lambdaAuthorizerConfig ""}]
:xrayEnabled false
:lambdaAuthorizerConfig {:authorizerResultTtlInSeconds ""
:authorizerUri ""
:identityValidationExpression ""}}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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}}/v1/apis/:apiId"),
Content = new StringContent("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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}}/v1/apis/:apiId");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId"
payload := strings.NewReader("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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/v1/apis/:apiId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 733
{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId")
.setHeader("content-type", "application/json")
.setBody("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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 \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId")
.header("content-type", "application/json")
.body("{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
name: '',
logConfig: {
fieldLogLevel: '',
cloudWatchLogsRoleArn: '',
excludeVerboseContent: ''
},
authenticationType: '',
userPoolConfig: {
userPoolId: '',
awsRegion: '',
defaultAction: '',
appIdClientRegex: ''
},
openIDConnectConfig: {
issuer: '',
clientId: '',
iatTTL: '',
authTTL: ''
},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId',
headers: {'content-type': 'application/json'},
data: {
name: '',
logConfig: {fieldLogLevel: '', cloudWatchLogsRoleArn: '', excludeVerboseContent: ''},
authenticationType: '',
userPoolConfig: {userPoolId: '', awsRegion: '', defaultAction: '', appIdClientRegex: ''},
openIDConnectConfig: {issuer: '', clientId: '', iatTTL: '', authTTL: ''},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","logConfig":{"fieldLogLevel":"","cloudWatchLogsRoleArn":"","excludeVerboseContent":""},"authenticationType":"","userPoolConfig":{"userPoolId":"","awsRegion":"","defaultAction":"","appIdClientRegex":""},"openIDConnectConfig":{"issuer":"","clientId":"","iatTTL":"","authTTL":""},"additionalAuthenticationProviders":[{"authenticationType":"","openIDConnectConfig":"","userPoolConfig":"","lambdaAuthorizerConfig":""}],"xrayEnabled":false,"lambdaAuthorizerConfig":{"authorizerResultTtlInSeconds":"","authorizerUri":"","identityValidationExpression":""}}'
};
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}}/v1/apis/:apiId',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "name": "",\n "logConfig": {\n "fieldLogLevel": "",\n "cloudWatchLogsRoleArn": "",\n "excludeVerboseContent": ""\n },\n "authenticationType": "",\n "userPoolConfig": {\n "userPoolId": "",\n "awsRegion": "",\n "defaultAction": "",\n "appIdClientRegex": ""\n },\n "openIDConnectConfig": {\n "issuer": "",\n "clientId": "",\n "iatTTL": "",\n "authTTL": ""\n },\n "additionalAuthenticationProviders": [\n {\n "authenticationType": "",\n "openIDConnectConfig": "",\n "userPoolConfig": "",\n "lambdaAuthorizerConfig": ""\n }\n ],\n "xrayEnabled": false,\n "lambdaAuthorizerConfig": {\n "authorizerResultTtlInSeconds": "",\n "authorizerUri": "",\n "identityValidationExpression": ""\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 \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId")
.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/v1/apis/:apiId',
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: '',
logConfig: {fieldLogLevel: '', cloudWatchLogsRoleArn: '', excludeVerboseContent: ''},
authenticationType: '',
userPoolConfig: {userPoolId: '', awsRegion: '', defaultAction: '', appIdClientRegex: ''},
openIDConnectConfig: {issuer: '', clientId: '', iatTTL: '', authTTL: ''},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId',
headers: {'content-type': 'application/json'},
body: {
name: '',
logConfig: {fieldLogLevel: '', cloudWatchLogsRoleArn: '', excludeVerboseContent: ''},
authenticationType: '',
userPoolConfig: {userPoolId: '', awsRegion: '', defaultAction: '', appIdClientRegex: ''},
openIDConnectConfig: {issuer: '', clientId: '', iatTTL: '', authTTL: ''},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
},
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}}/v1/apis/:apiId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
name: '',
logConfig: {
fieldLogLevel: '',
cloudWatchLogsRoleArn: '',
excludeVerboseContent: ''
},
authenticationType: '',
userPoolConfig: {
userPoolId: '',
awsRegion: '',
defaultAction: '',
appIdClientRegex: ''
},
openIDConnectConfig: {
issuer: '',
clientId: '',
iatTTL: '',
authTTL: ''
},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
});
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}}/v1/apis/:apiId',
headers: {'content-type': 'application/json'},
data: {
name: '',
logConfig: {fieldLogLevel: '', cloudWatchLogsRoleArn: '', excludeVerboseContent: ''},
authenticationType: '',
userPoolConfig: {userPoolId: '', awsRegion: '', defaultAction: '', appIdClientRegex: ''},
openIDConnectConfig: {issuer: '', clientId: '', iatTTL: '', authTTL: ''},
additionalAuthenticationProviders: [
{
authenticationType: '',
openIDConnectConfig: '',
userPoolConfig: '',
lambdaAuthorizerConfig: ''
}
],
xrayEnabled: false,
lambdaAuthorizerConfig: {
authorizerResultTtlInSeconds: '',
authorizerUri: '',
identityValidationExpression: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"name":"","logConfig":{"fieldLogLevel":"","cloudWatchLogsRoleArn":"","excludeVerboseContent":""},"authenticationType":"","userPoolConfig":{"userPoolId":"","awsRegion":"","defaultAction":"","appIdClientRegex":""},"openIDConnectConfig":{"issuer":"","clientId":"","iatTTL":"","authTTL":""},"additionalAuthenticationProviders":[{"authenticationType":"","openIDConnectConfig":"","userPoolConfig":"","lambdaAuthorizerConfig":""}],"xrayEnabled":false,"lambdaAuthorizerConfig":{"authorizerResultTtlInSeconds":"","authorizerUri":"","identityValidationExpression":""}}'
};
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": @"",
@"logConfig": @{ @"fieldLogLevel": @"", @"cloudWatchLogsRoleArn": @"", @"excludeVerboseContent": @"" },
@"authenticationType": @"",
@"userPoolConfig": @{ @"userPoolId": @"", @"awsRegion": @"", @"defaultAction": @"", @"appIdClientRegex": @"" },
@"openIDConnectConfig": @{ @"issuer": @"", @"clientId": @"", @"iatTTL": @"", @"authTTL": @"" },
@"additionalAuthenticationProviders": @[ @{ @"authenticationType": @"", @"openIDConnectConfig": @"", @"userPoolConfig": @"", @"lambdaAuthorizerConfig": @"" } ],
@"xrayEnabled": @NO,
@"lambdaAuthorizerConfig": @{ @"authorizerResultTtlInSeconds": @"", @"authorizerUri": @"", @"identityValidationExpression": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId"]
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}}/v1/apis/:apiId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId",
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' => '',
'logConfig' => [
'fieldLogLevel' => '',
'cloudWatchLogsRoleArn' => '',
'excludeVerboseContent' => ''
],
'authenticationType' => '',
'userPoolConfig' => [
'userPoolId' => '',
'awsRegion' => '',
'defaultAction' => '',
'appIdClientRegex' => ''
],
'openIDConnectConfig' => [
'issuer' => '',
'clientId' => '',
'iatTTL' => '',
'authTTL' => ''
],
'additionalAuthenticationProviders' => [
[
'authenticationType' => '',
'openIDConnectConfig' => '',
'userPoolConfig' => '',
'lambdaAuthorizerConfig' => ''
]
],
'xrayEnabled' => null,
'lambdaAuthorizerConfig' => [
'authorizerResultTtlInSeconds' => '',
'authorizerUri' => '',
'identityValidationExpression' => ''
]
]),
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}}/v1/apis/:apiId', [
'body' => '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'name' => '',
'logConfig' => [
'fieldLogLevel' => '',
'cloudWatchLogsRoleArn' => '',
'excludeVerboseContent' => ''
],
'authenticationType' => '',
'userPoolConfig' => [
'userPoolId' => '',
'awsRegion' => '',
'defaultAction' => '',
'appIdClientRegex' => ''
],
'openIDConnectConfig' => [
'issuer' => '',
'clientId' => '',
'iatTTL' => '',
'authTTL' => ''
],
'additionalAuthenticationProviders' => [
[
'authenticationType' => '',
'openIDConnectConfig' => '',
'userPoolConfig' => '',
'lambdaAuthorizerConfig' => ''
]
],
'xrayEnabled' => null,
'lambdaAuthorizerConfig' => [
'authorizerResultTtlInSeconds' => '',
'authorizerUri' => '',
'identityValidationExpression' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'name' => '',
'logConfig' => [
'fieldLogLevel' => '',
'cloudWatchLogsRoleArn' => '',
'excludeVerboseContent' => ''
],
'authenticationType' => '',
'userPoolConfig' => [
'userPoolId' => '',
'awsRegion' => '',
'defaultAction' => '',
'appIdClientRegex' => ''
],
'openIDConnectConfig' => [
'issuer' => '',
'clientId' => '',
'iatTTL' => '',
'authTTL' => ''
],
'additionalAuthenticationProviders' => [
[
'authenticationType' => '',
'openIDConnectConfig' => '',
'userPoolConfig' => '',
'lambdaAuthorizerConfig' => ''
]
],
'xrayEnabled' => null,
'lambdaAuthorizerConfig' => [
'authorizerResultTtlInSeconds' => '',
'authorizerUri' => '',
'identityValidationExpression' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId');
$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}}/v1/apis/:apiId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId"
payload = {
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": False,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId"
payload <- "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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}}/v1/apis/:apiId")
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 \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\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/v1/apis/:apiId') do |req|
req.body = "{\n \"name\": \"\",\n \"logConfig\": {\n \"fieldLogLevel\": \"\",\n \"cloudWatchLogsRoleArn\": \"\",\n \"excludeVerboseContent\": \"\"\n },\n \"authenticationType\": \"\",\n \"userPoolConfig\": {\n \"userPoolId\": \"\",\n \"awsRegion\": \"\",\n \"defaultAction\": \"\",\n \"appIdClientRegex\": \"\"\n },\n \"openIDConnectConfig\": {\n \"issuer\": \"\",\n \"clientId\": \"\",\n \"iatTTL\": \"\",\n \"authTTL\": \"\"\n },\n \"additionalAuthenticationProviders\": [\n {\n \"authenticationType\": \"\",\n \"openIDConnectConfig\": \"\",\n \"userPoolConfig\": \"\",\n \"lambdaAuthorizerConfig\": \"\"\n }\n ],\n \"xrayEnabled\": false,\n \"lambdaAuthorizerConfig\": {\n \"authorizerResultTtlInSeconds\": \"\",\n \"authorizerUri\": \"\",\n \"identityValidationExpression\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId";
let payload = json!({
"name": "",
"logConfig": json!({
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
}),
"authenticationType": "",
"userPoolConfig": json!({
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
}),
"openIDConnectConfig": json!({
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
}),
"additionalAuthenticationProviders": (
json!({
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
})
),
"xrayEnabled": false,
"lambdaAuthorizerConfig": json!({
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
})
});
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}}/v1/apis/:apiId \
--header 'content-type: application/json' \
--data '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}'
echo '{
"name": "",
"logConfig": {
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
},
"authenticationType": "",
"userPoolConfig": {
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
},
"openIDConnectConfig": {
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
},
"additionalAuthenticationProviders": [
{
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
}
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": {
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
}
}' | \
http POST {{baseUrl}}/v1/apis/:apiId \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "name": "",\n "logConfig": {\n "fieldLogLevel": "",\n "cloudWatchLogsRoleArn": "",\n "excludeVerboseContent": ""\n },\n "authenticationType": "",\n "userPoolConfig": {\n "userPoolId": "",\n "awsRegion": "",\n "defaultAction": "",\n "appIdClientRegex": ""\n },\n "openIDConnectConfig": {\n "issuer": "",\n "clientId": "",\n "iatTTL": "",\n "authTTL": ""\n },\n "additionalAuthenticationProviders": [\n {\n "authenticationType": "",\n "openIDConnectConfig": "",\n "userPoolConfig": "",\n "lambdaAuthorizerConfig": ""\n }\n ],\n "xrayEnabled": false,\n "lambdaAuthorizerConfig": {\n "authorizerResultTtlInSeconds": "",\n "authorizerUri": "",\n "identityValidationExpression": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"name": "",
"logConfig": [
"fieldLogLevel": "",
"cloudWatchLogsRoleArn": "",
"excludeVerboseContent": ""
],
"authenticationType": "",
"userPoolConfig": [
"userPoolId": "",
"awsRegion": "",
"defaultAction": "",
"appIdClientRegex": ""
],
"openIDConnectConfig": [
"issuer": "",
"clientId": "",
"iatTTL": "",
"authTTL": ""
],
"additionalAuthenticationProviders": [
[
"authenticationType": "",
"openIDConnectConfig": "",
"userPoolConfig": "",
"lambdaAuthorizerConfig": ""
]
],
"xrayEnabled": false,
"lambdaAuthorizerConfig": [
"authorizerResultTtlInSeconds": "",
"authorizerUri": "",
"identityValidationExpression": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId")! 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
UpdateResolver
{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
QUERY PARAMS
apiId
typeName
fieldName
BODY json
{
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName");
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 \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName" {:content-type :json
:form-params {:dataSourceName ""
:requestMappingTemplate ""
:responseMappingTemplate ""
:kind ""
:pipelineConfig {:functions ""}
:syncConfig {:conflictHandler ""
:conflictDetection ""
:lambdaConflictHandlerConfig ""}
:cachingConfig {:ttl ""
:cachingKeys ""}
:maxBatchSize 0
:runtime {:name ""
:runtimeVersion ""}
:code ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"),
Content = new StringContent("{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
payload := strings.NewReader("{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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/v1/apis/:apiId/types/:typeName/resolvers/:fieldName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 428
{
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.setHeader("content-type", "application/json")
.setBody("{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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 \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.header("content-type", "application/json")
.body("{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
.asString();
const data = JSON.stringify({
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {
functions: ''
},
syncConfig: {
conflictHandler: '',
conflictDetection: '',
lambdaConflictHandlerConfig: ''
},
cachingConfig: {
ttl: '',
cachingKeys: ''
},
maxBatchSize: 0,
runtime: {
name: '',
runtimeVersion: ''
},
code: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
headers: {'content-type': 'application/json'},
data: {
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {functions: ''},
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
cachingConfig: {ttl: '', cachingKeys: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dataSourceName":"","requestMappingTemplate":"","responseMappingTemplate":"","kind":"","pipelineConfig":{"functions":""},"syncConfig":{"conflictHandler":"","conflictDetection":"","lambdaConflictHandlerConfig":""},"cachingConfig":{"ttl":"","cachingKeys":""},"maxBatchSize":0,"runtime":{"name":"","runtimeVersion":""},"code":""}'
};
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "dataSourceName": "",\n "requestMappingTemplate": "",\n "responseMappingTemplate": "",\n "kind": "",\n "pipelineConfig": {\n "functions": ""\n },\n "syncConfig": {\n "conflictHandler": "",\n "conflictDetection": "",\n "lambdaConflictHandlerConfig": ""\n },\n "cachingConfig": {\n "ttl": "",\n "cachingKeys": ""\n },\n "maxBatchSize": 0,\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
.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/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
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({
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {functions: ''},
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
cachingConfig: {ttl: '', cachingKeys: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
headers: {'content-type': 'application/json'},
body: {
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {functions: ''},
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
cachingConfig: {ttl: '', cachingKeys: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
},
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {
functions: ''
},
syncConfig: {
conflictHandler: '',
conflictDetection: '',
lambdaConflictHandlerConfig: ''
},
cachingConfig: {
ttl: '',
cachingKeys: ''
},
maxBatchSize: 0,
runtime: {
name: '',
runtimeVersion: ''
},
code: ''
});
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName',
headers: {'content-type': 'application/json'},
data: {
dataSourceName: '',
requestMappingTemplate: '',
responseMappingTemplate: '',
kind: '',
pipelineConfig: {functions: ''},
syncConfig: {conflictHandler: '', conflictDetection: '', lambdaConflictHandlerConfig: ''},
cachingConfig: {ttl: '', cachingKeys: ''},
maxBatchSize: 0,
runtime: {name: '', runtimeVersion: ''},
code: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"dataSourceName":"","requestMappingTemplate":"","responseMappingTemplate":"","kind":"","pipelineConfig":{"functions":""},"syncConfig":{"conflictHandler":"","conflictDetection":"","lambdaConflictHandlerConfig":""},"cachingConfig":{"ttl":"","cachingKeys":""},"maxBatchSize":0,"runtime":{"name":"","runtimeVersion":""},"code":""}'
};
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 = @{ @"dataSourceName": @"",
@"requestMappingTemplate": @"",
@"responseMappingTemplate": @"",
@"kind": @"",
@"pipelineConfig": @{ @"functions": @"" },
@"syncConfig": @{ @"conflictHandler": @"", @"conflictDetection": @"", @"lambdaConflictHandlerConfig": @"" },
@"cachingConfig": @{ @"ttl": @"", @"cachingKeys": @"" },
@"maxBatchSize": @0,
@"runtime": @{ @"name": @"", @"runtimeVersion": @"" },
@"code": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"]
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName",
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([
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'kind' => '',
'pipelineConfig' => [
'functions' => ''
],
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'cachingConfig' => [
'ttl' => '',
'cachingKeys' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]),
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName', [
'body' => '{
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'kind' => '',
'pipelineConfig' => [
'functions' => ''
],
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'cachingConfig' => [
'ttl' => '',
'cachingKeys' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'dataSourceName' => '',
'requestMappingTemplate' => '',
'responseMappingTemplate' => '',
'kind' => '',
'pipelineConfig' => [
'functions' => ''
],
'syncConfig' => [
'conflictHandler' => '',
'conflictDetection' => '',
'lambdaConflictHandlerConfig' => ''
],
'cachingConfig' => [
'ttl' => '',
'cachingKeys' => ''
],
'maxBatchSize' => 0,
'runtime' => [
'name' => '',
'runtimeVersion' => ''
],
'code' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName');
$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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/types/:typeName/resolvers/:fieldName", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
payload = {
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": { "functions": "" },
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName"
payload <- "{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")
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 \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\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/v1/apis/:apiId/types/:typeName/resolvers/:fieldName') do |req|
req.body = "{\n \"dataSourceName\": \"\",\n \"requestMappingTemplate\": \"\",\n \"responseMappingTemplate\": \"\",\n \"kind\": \"\",\n \"pipelineConfig\": {\n \"functions\": \"\"\n },\n \"syncConfig\": {\n \"conflictHandler\": \"\",\n \"conflictDetection\": \"\",\n \"lambdaConflictHandlerConfig\": \"\"\n },\n \"cachingConfig\": {\n \"ttl\": \"\",\n \"cachingKeys\": \"\"\n },\n \"maxBatchSize\": 0,\n \"runtime\": {\n \"name\": \"\",\n \"runtimeVersion\": \"\"\n },\n \"code\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName";
let payload = json!({
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": json!({"functions": ""}),
"syncConfig": json!({
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
}),
"cachingConfig": json!({
"ttl": "",
"cachingKeys": ""
}),
"maxBatchSize": 0,
"runtime": json!({
"name": "",
"runtimeVersion": ""
}),
"code": ""
});
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}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName \
--header 'content-type: application/json' \
--data '{
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}'
echo '{
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": {
"functions": ""
},
"syncConfig": {
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
},
"cachingConfig": {
"ttl": "",
"cachingKeys": ""
},
"maxBatchSize": 0,
"runtime": {
"name": "",
"runtimeVersion": ""
},
"code": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "dataSourceName": "",\n "requestMappingTemplate": "",\n "responseMappingTemplate": "",\n "kind": "",\n "pipelineConfig": {\n "functions": ""\n },\n "syncConfig": {\n "conflictHandler": "",\n "conflictDetection": "",\n "lambdaConflictHandlerConfig": ""\n },\n "cachingConfig": {\n "ttl": "",\n "cachingKeys": ""\n },\n "maxBatchSize": 0,\n "runtime": {\n "name": "",\n "runtimeVersion": ""\n },\n "code": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"dataSourceName": "",
"requestMappingTemplate": "",
"responseMappingTemplate": "",
"kind": "",
"pipelineConfig": ["functions": ""],
"syncConfig": [
"conflictHandler": "",
"conflictDetection": "",
"lambdaConflictHandlerConfig": ""
],
"cachingConfig": [
"ttl": "",
"cachingKeys": ""
],
"maxBatchSize": 0,
"runtime": [
"name": "",
"runtimeVersion": ""
],
"code": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types/:typeName/resolvers/:fieldName")! 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
UpdateType
{{baseUrl}}/v1/apis/:apiId/types/:typeName
QUERY PARAMS
apiId
typeName
BODY json
{
"definition": "",
"format": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/apis/:apiId/types/:typeName");
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 \"definition\": \"\",\n \"format\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/apis/:apiId/types/:typeName" {:content-type :json
:form-params {:definition ""
:format ""}})
require "http/client"
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"definition\": \"\",\n \"format\": \"\"\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}}/v1/apis/:apiId/types/:typeName"),
Content = new StringContent("{\n \"definition\": \"\",\n \"format\": \"\"\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}}/v1/apis/:apiId/types/:typeName");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"definition\": \"\",\n \"format\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/apis/:apiId/types/:typeName"
payload := strings.NewReader("{\n \"definition\": \"\",\n \"format\": \"\"\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/v1/apis/:apiId/types/:typeName HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 38
{
"definition": "",
"format": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/apis/:apiId/types/:typeName")
.setHeader("content-type", "application/json")
.setBody("{\n \"definition\": \"\",\n \"format\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/apis/:apiId/types/:typeName"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"definition\": \"\",\n \"format\": \"\"\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 \"definition\": \"\",\n \"format\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/apis/:apiId/types/:typeName")
.header("content-type", "application/json")
.body("{\n \"definition\": \"\",\n \"format\": \"\"\n}")
.asString();
const data = JSON.stringify({
definition: '',
format: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/apis/:apiId/types/:typeName');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName',
headers: {'content-type': 'application/json'},
data: {definition: '', format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"definition":"","format":""}'
};
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}}/v1/apis/:apiId/types/:typeName',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "definition": "",\n "format": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"definition\": \"\",\n \"format\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/apis/:apiId/types/:typeName")
.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/v1/apis/:apiId/types/:typeName',
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({definition: '', format: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/apis/:apiId/types/:typeName',
headers: {'content-type': 'application/json'},
body: {definition: '', format: ''},
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}}/v1/apis/:apiId/types/:typeName');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
definition: '',
format: ''
});
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}}/v1/apis/:apiId/types/:typeName',
headers: {'content-type': 'application/json'},
data: {definition: '', format: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/apis/:apiId/types/:typeName';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"definition":"","format":""}'
};
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 = @{ @"definition": @"",
@"format": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/apis/:apiId/types/:typeName"]
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}}/v1/apis/:apiId/types/:typeName" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"definition\": \"\",\n \"format\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/apis/:apiId/types/:typeName",
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([
'definition' => '',
'format' => ''
]),
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}}/v1/apis/:apiId/types/:typeName', [
'body' => '{
"definition": "",
"format": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'definition' => '',
'format' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'definition' => '',
'format' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/apis/:apiId/types/:typeName');
$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}}/v1/apis/:apiId/types/:typeName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"definition": "",
"format": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/apis/:apiId/types/:typeName' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"definition": "",
"format": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"definition\": \"\",\n \"format\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/apis/:apiId/types/:typeName", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName"
payload = {
"definition": "",
"format": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/apis/:apiId/types/:typeName"
payload <- "{\n \"definition\": \"\",\n \"format\": \"\"\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}}/v1/apis/:apiId/types/:typeName")
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 \"definition\": \"\",\n \"format\": \"\"\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/v1/apis/:apiId/types/:typeName') do |req|
req.body = "{\n \"definition\": \"\",\n \"format\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/apis/:apiId/types/:typeName";
let payload = json!({
"definition": "",
"format": ""
});
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}}/v1/apis/:apiId/types/:typeName \
--header 'content-type: application/json' \
--data '{
"definition": "",
"format": ""
}'
echo '{
"definition": "",
"format": ""
}' | \
http POST {{baseUrl}}/v1/apis/:apiId/types/:typeName \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "definition": "",\n "format": ""\n}' \
--output-document \
- {{baseUrl}}/v1/apis/:apiId/types/:typeName
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"definition": "",
"format": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/apis/:apiId/types/:typeName")! 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()