AWSServerlessApplicationRepository
POST
CreateApplication
{{baseUrl}}/applications
BODY json
{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications");
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 \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/applications" {:content-type :json
:form-params {:author ""
:description ""
:homePageUrl ""
:labels []
:licenseBody ""
:licenseUrl ""
:name ""
:readmeBody ""
:readmeUrl ""
:semanticVersion ""
:sourceCodeArchiveUrl ""
:sourceCodeUrl ""
:spdxLicenseId ""
:templateBody ""
:templateUrl ""}})
require "http/client"
url = "{{baseUrl}}/applications"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\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}}/applications"),
Content = new StringContent("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\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}}/applications");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications"
payload := strings.NewReader("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\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/applications HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 314
{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/applications")
.setHeader("content-type", "application/json")
.setBody("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\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 \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/applications")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/applications")
.header("content-type", "application/json")
.body("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
author: '',
description: '',
homePageUrl: '',
labels: [],
licenseBody: '',
licenseUrl: '',
name: '',
readmeBody: '',
readmeUrl: '',
semanticVersion: '',
sourceCodeArchiveUrl: '',
sourceCodeUrl: '',
spdxLicenseId: '',
templateBody: '',
templateUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/applications');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/applications',
headers: {'content-type': 'application/json'},
data: {
author: '',
description: '',
homePageUrl: '',
labels: [],
licenseBody: '',
licenseUrl: '',
name: '',
readmeBody: '',
readmeUrl: '',
semanticVersion: '',
sourceCodeArchiveUrl: '',
sourceCodeUrl: '',
spdxLicenseId: '',
templateBody: '',
templateUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"author":"","description":"","homePageUrl":"","labels":[],"licenseBody":"","licenseUrl":"","name":"","readmeBody":"","readmeUrl":"","semanticVersion":"","sourceCodeArchiveUrl":"","sourceCodeUrl":"","spdxLicenseId":"","templateBody":"","templateUrl":""}'
};
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}}/applications',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "author": "",\n "description": "",\n "homePageUrl": "",\n "labels": [],\n "licenseBody": "",\n "licenseUrl": "",\n "name": "",\n "readmeBody": "",\n "readmeUrl": "",\n "semanticVersion": "",\n "sourceCodeArchiveUrl": "",\n "sourceCodeUrl": "",\n "spdxLicenseId": "",\n "templateBody": "",\n "templateUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/applications")
.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/applications',
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({
author: '',
description: '',
homePageUrl: '',
labels: [],
licenseBody: '',
licenseUrl: '',
name: '',
readmeBody: '',
readmeUrl: '',
semanticVersion: '',
sourceCodeArchiveUrl: '',
sourceCodeUrl: '',
spdxLicenseId: '',
templateBody: '',
templateUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/applications',
headers: {'content-type': 'application/json'},
body: {
author: '',
description: '',
homePageUrl: '',
labels: [],
licenseBody: '',
licenseUrl: '',
name: '',
readmeBody: '',
readmeUrl: '',
semanticVersion: '',
sourceCodeArchiveUrl: '',
sourceCodeUrl: '',
spdxLicenseId: '',
templateBody: '',
templateUrl: ''
},
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}}/applications');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
author: '',
description: '',
homePageUrl: '',
labels: [],
licenseBody: '',
licenseUrl: '',
name: '',
readmeBody: '',
readmeUrl: '',
semanticVersion: '',
sourceCodeArchiveUrl: '',
sourceCodeUrl: '',
spdxLicenseId: '',
templateBody: '',
templateUrl: ''
});
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}}/applications',
headers: {'content-type': 'application/json'},
data: {
author: '',
description: '',
homePageUrl: '',
labels: [],
licenseBody: '',
licenseUrl: '',
name: '',
readmeBody: '',
readmeUrl: '',
semanticVersion: '',
sourceCodeArchiveUrl: '',
sourceCodeUrl: '',
spdxLicenseId: '',
templateBody: '',
templateUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"author":"","description":"","homePageUrl":"","labels":[],"licenseBody":"","licenseUrl":"","name":"","readmeBody":"","readmeUrl":"","semanticVersion":"","sourceCodeArchiveUrl":"","sourceCodeUrl":"","spdxLicenseId":"","templateBody":"","templateUrl":""}'
};
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 = @{ @"author": @"",
@"description": @"",
@"homePageUrl": @"",
@"labels": @[ ],
@"licenseBody": @"",
@"licenseUrl": @"",
@"name": @"",
@"readmeBody": @"",
@"readmeUrl": @"",
@"semanticVersion": @"",
@"sourceCodeArchiveUrl": @"",
@"sourceCodeUrl": @"",
@"spdxLicenseId": @"",
@"templateBody": @"",
@"templateUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/applications"]
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}}/applications" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications",
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([
'author' => '',
'description' => '',
'homePageUrl' => '',
'labels' => [
],
'licenseBody' => '',
'licenseUrl' => '',
'name' => '',
'readmeBody' => '',
'readmeUrl' => '',
'semanticVersion' => '',
'sourceCodeArchiveUrl' => '',
'sourceCodeUrl' => '',
'spdxLicenseId' => '',
'templateBody' => '',
'templateUrl' => ''
]),
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}}/applications', [
'body' => '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/applications');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'author' => '',
'description' => '',
'homePageUrl' => '',
'labels' => [
],
'licenseBody' => '',
'licenseUrl' => '',
'name' => '',
'readmeBody' => '',
'readmeUrl' => '',
'semanticVersion' => '',
'sourceCodeArchiveUrl' => '',
'sourceCodeUrl' => '',
'spdxLicenseId' => '',
'templateBody' => '',
'templateUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'author' => '',
'description' => '',
'homePageUrl' => '',
'labels' => [
],
'licenseBody' => '',
'licenseUrl' => '',
'name' => '',
'readmeBody' => '',
'readmeUrl' => '',
'semanticVersion' => '',
'sourceCodeArchiveUrl' => '',
'sourceCodeUrl' => '',
'spdxLicenseId' => '',
'templateBody' => '',
'templateUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/applications');
$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}}/applications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/applications", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications"
payload = {
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications"
payload <- "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\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}}/applications")
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 \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\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/applications') do |req|
req.body = "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"licenseBody\": \"\",\n \"licenseUrl\": \"\",\n \"name\": \"\",\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\",\n \"semanticVersion\": \"\",\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"spdxLicenseId\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications";
let payload = json!({
"author": "",
"description": "",
"homePageUrl": "",
"labels": (),
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
});
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}}/applications \
--header 'content-type: application/json' \
--data '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
}'
echo '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
}' | \
http POST {{baseUrl}}/applications \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "author": "",\n "description": "",\n "homePageUrl": "",\n "labels": [],\n "licenseBody": "",\n "licenseUrl": "",\n "name": "",\n "readmeBody": "",\n "readmeUrl": "",\n "semanticVersion": "",\n "sourceCodeArchiveUrl": "",\n "sourceCodeUrl": "",\n "spdxLicenseId": "",\n "templateBody": "",\n "templateUrl": ""\n}' \
--output-document \
- {{baseUrl}}/applications
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"licenseBody": "",
"licenseUrl": "",
"name": "",
"readmeBody": "",
"readmeUrl": "",
"semanticVersion": "",
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"spdxLicenseId": "",
"templateBody": "",
"templateUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
CreateApplicationVersion
{{baseUrl}}/applications/:applicationId/versions/:semanticVersion
QUERY PARAMS
applicationId
semanticVersion
BODY json
{
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion");
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 \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion" {:content-type :json
:form-params {:sourceCodeArchiveUrl ""
:sourceCodeUrl ""
:templateBody ""
:templateUrl ""}})
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/applications/:applicationId/versions/:semanticVersion"),
Content = new StringContent("{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\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}}/applications/:applicationId/versions/:semanticVersion");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion"
payload := strings.NewReader("{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/applications/:applicationId/versions/:semanticVersion HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 98
{
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion")
.setHeader("content-type", "application/json")
.setBody("{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/versions/:semanticVersion"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\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 \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/versions/:semanticVersion")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/applications/:applicationId/versions/:semanticVersion")
.header("content-type", "application/json")
.body("{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
sourceCodeArchiveUrl: '',
sourceCodeUrl: '',
templateBody: '',
templateUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion',
headers: {'content-type': 'application/json'},
data: {sourceCodeArchiveUrl: '', sourceCodeUrl: '', templateBody: '', templateUrl: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"sourceCodeArchiveUrl":"","sourceCodeUrl":"","templateBody":"","templateUrl":""}'
};
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}}/applications/:applicationId/versions/:semanticVersion',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sourceCodeArchiveUrl": "",\n "sourceCodeUrl": "",\n "templateBody": "",\n "templateUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/versions/:semanticVersion")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId/versions/:semanticVersion',
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({sourceCodeArchiveUrl: '', sourceCodeUrl: '', templateBody: '', templateUrl: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion',
headers: {'content-type': 'application/json'},
body: {sourceCodeArchiveUrl: '', sourceCodeUrl: '', templateBody: '', templateUrl: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sourceCodeArchiveUrl: '',
sourceCodeUrl: '',
templateBody: '',
templateUrl: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion',
headers: {'content-type': 'application/json'},
data: {sourceCodeArchiveUrl: '', sourceCodeUrl: '', templateBody: '', templateUrl: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"sourceCodeArchiveUrl":"","sourceCodeUrl":"","templateBody":"","templateUrl":""}'
};
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 = @{ @"sourceCodeArchiveUrl": @"",
@"sourceCodeUrl": @"",
@"templateBody": @"",
@"templateUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/applications/:applicationId/versions/:semanticVersion"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/versions/:semanticVersion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'sourceCodeArchiveUrl' => '',
'sourceCodeUrl' => '',
'templateBody' => '',
'templateUrl' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion', [
'body' => '{
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/versions/:semanticVersion');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sourceCodeArchiveUrl' => '',
'sourceCodeUrl' => '',
'templateBody' => '',
'templateUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sourceCodeArchiveUrl' => '',
'sourceCodeUrl' => '',
'templateBody' => '',
'templateUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/applications/:applicationId/versions/:semanticVersion');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/versions/:semanticVersion' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/applications/:applicationId/versions/:semanticVersion", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion"
payload = {
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion"
payload <- "{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId/versions/:semanticVersion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/applications/:applicationId/versions/:semanticVersion') do |req|
req.body = "{\n \"sourceCodeArchiveUrl\": \"\",\n \"sourceCodeUrl\": \"\",\n \"templateBody\": \"\",\n \"templateUrl\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion";
let payload = json!({
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/applications/:applicationId/versions/:semanticVersion \
--header 'content-type: application/json' \
--data '{
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
}'
echo '{
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
}' | \
http PUT {{baseUrl}}/applications/:applicationId/versions/:semanticVersion \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "sourceCodeArchiveUrl": "",\n "sourceCodeUrl": "",\n "templateBody": "",\n "templateUrl": ""\n}' \
--output-document \
- {{baseUrl}}/applications/:applicationId/versions/:semanticVersion
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"sourceCodeArchiveUrl": "",
"sourceCodeUrl": "",
"templateBody": "",
"templateUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/versions/:semanticVersion")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateCloudFormationChangeSet
{{baseUrl}}/applications/:applicationId/changesets
QUERY PARAMS
applicationId
BODY json
{
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
{
"Name": "",
"Value": ""
}
],
"resourceTypes": [],
"rollbackConfiguration": {
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
},
"semanticVersion": "",
"stackName": "",
"tags": [
{
"Key": "",
"Value": ""
}
],
"templateId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/changesets");
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 \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/applications/:applicationId/changesets" {:content-type :json
:form-params {:capabilities []
:changeSetName ""
:clientToken ""
:description ""
:notificationArns []
:parameterOverrides [{:Name ""
:Value ""}]
:resourceTypes []
:rollbackConfiguration {:MonitoringTimeInMinutes ""
:RollbackTriggers ""}
:semanticVersion ""
:stackName ""
:tags [{:Key ""
:Value ""}]
:templateId ""}})
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/changesets"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\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}}/applications/:applicationId/changesets"),
Content = new StringContent("{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\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}}/applications/:applicationId/changesets");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/changesets"
payload := strings.NewReader("{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\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/applications/:applicationId/changesets HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 441
{
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
{
"Name": "",
"Value": ""
}
],
"resourceTypes": [],
"rollbackConfiguration": {
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
},
"semanticVersion": "",
"stackName": "",
"tags": [
{
"Key": "",
"Value": ""
}
],
"templateId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/applications/:applicationId/changesets")
.setHeader("content-type", "application/json")
.setBody("{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/changesets"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\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 \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/changesets")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/applications/:applicationId/changesets")
.header("content-type", "application/json")
.body("{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}")
.asString();
const data = JSON.stringify({
capabilities: [],
changeSetName: '',
clientToken: '',
description: '',
notificationArns: [],
parameterOverrides: [
{
Name: '',
Value: ''
}
],
resourceTypes: [],
rollbackConfiguration: {
MonitoringTimeInMinutes: '',
RollbackTriggers: ''
},
semanticVersion: '',
stackName: '',
tags: [
{
Key: '',
Value: ''
}
],
templateId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/applications/:applicationId/changesets');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/applications/:applicationId/changesets',
headers: {'content-type': 'application/json'},
data: {
capabilities: [],
changeSetName: '',
clientToken: '',
description: '',
notificationArns: [],
parameterOverrides: [{Name: '', Value: ''}],
resourceTypes: [],
rollbackConfiguration: {MonitoringTimeInMinutes: '', RollbackTriggers: ''},
semanticVersion: '',
stackName: '',
tags: [{Key: '', Value: ''}],
templateId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/changesets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"capabilities":[],"changeSetName":"","clientToken":"","description":"","notificationArns":[],"parameterOverrides":[{"Name":"","Value":""}],"resourceTypes":[],"rollbackConfiguration":{"MonitoringTimeInMinutes":"","RollbackTriggers":""},"semanticVersion":"","stackName":"","tags":[{"Key":"","Value":""}],"templateId":""}'
};
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}}/applications/:applicationId/changesets',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "capabilities": [],\n "changeSetName": "",\n "clientToken": "",\n "description": "",\n "notificationArns": [],\n "parameterOverrides": [\n {\n "Name": "",\n "Value": ""\n }\n ],\n "resourceTypes": [],\n "rollbackConfiguration": {\n "MonitoringTimeInMinutes": "",\n "RollbackTriggers": ""\n },\n "semanticVersion": "",\n "stackName": "",\n "tags": [\n {\n "Key": "",\n "Value": ""\n }\n ],\n "templateId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/changesets")
.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/applications/:applicationId/changesets',
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({
capabilities: [],
changeSetName: '',
clientToken: '',
description: '',
notificationArns: [],
parameterOverrides: [{Name: '', Value: ''}],
resourceTypes: [],
rollbackConfiguration: {MonitoringTimeInMinutes: '', RollbackTriggers: ''},
semanticVersion: '',
stackName: '',
tags: [{Key: '', Value: ''}],
templateId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/applications/:applicationId/changesets',
headers: {'content-type': 'application/json'},
body: {
capabilities: [],
changeSetName: '',
clientToken: '',
description: '',
notificationArns: [],
parameterOverrides: [{Name: '', Value: ''}],
resourceTypes: [],
rollbackConfiguration: {MonitoringTimeInMinutes: '', RollbackTriggers: ''},
semanticVersion: '',
stackName: '',
tags: [{Key: '', Value: ''}],
templateId: ''
},
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}}/applications/:applicationId/changesets');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
capabilities: [],
changeSetName: '',
clientToken: '',
description: '',
notificationArns: [],
parameterOverrides: [
{
Name: '',
Value: ''
}
],
resourceTypes: [],
rollbackConfiguration: {
MonitoringTimeInMinutes: '',
RollbackTriggers: ''
},
semanticVersion: '',
stackName: '',
tags: [
{
Key: '',
Value: ''
}
],
templateId: ''
});
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}}/applications/:applicationId/changesets',
headers: {'content-type': 'application/json'},
data: {
capabilities: [],
changeSetName: '',
clientToken: '',
description: '',
notificationArns: [],
parameterOverrides: [{Name: '', Value: ''}],
resourceTypes: [],
rollbackConfiguration: {MonitoringTimeInMinutes: '', RollbackTriggers: ''},
semanticVersion: '',
stackName: '',
tags: [{Key: '', Value: ''}],
templateId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/changesets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"capabilities":[],"changeSetName":"","clientToken":"","description":"","notificationArns":[],"parameterOverrides":[{"Name":"","Value":""}],"resourceTypes":[],"rollbackConfiguration":{"MonitoringTimeInMinutes":"","RollbackTriggers":""},"semanticVersion":"","stackName":"","tags":[{"Key":"","Value":""}],"templateId":""}'
};
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 = @{ @"capabilities": @[ ],
@"changeSetName": @"",
@"clientToken": @"",
@"description": @"",
@"notificationArns": @[ ],
@"parameterOverrides": @[ @{ @"Name": @"", @"Value": @"" } ],
@"resourceTypes": @[ ],
@"rollbackConfiguration": @{ @"MonitoringTimeInMinutes": @"", @"RollbackTriggers": @"" },
@"semanticVersion": @"",
@"stackName": @"",
@"tags": @[ @{ @"Key": @"", @"Value": @"" } ],
@"templateId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/applications/:applicationId/changesets"]
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}}/applications/:applicationId/changesets" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/changesets",
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([
'capabilities' => [
],
'changeSetName' => '',
'clientToken' => '',
'description' => '',
'notificationArns' => [
],
'parameterOverrides' => [
[
'Name' => '',
'Value' => ''
]
],
'resourceTypes' => [
],
'rollbackConfiguration' => [
'MonitoringTimeInMinutes' => '',
'RollbackTriggers' => ''
],
'semanticVersion' => '',
'stackName' => '',
'tags' => [
[
'Key' => '',
'Value' => ''
]
],
'templateId' => ''
]),
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}}/applications/:applicationId/changesets', [
'body' => '{
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
{
"Name": "",
"Value": ""
}
],
"resourceTypes": [],
"rollbackConfiguration": {
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
},
"semanticVersion": "",
"stackName": "",
"tags": [
{
"Key": "",
"Value": ""
}
],
"templateId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/changesets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'capabilities' => [
],
'changeSetName' => '',
'clientToken' => '',
'description' => '',
'notificationArns' => [
],
'parameterOverrides' => [
[
'Name' => '',
'Value' => ''
]
],
'resourceTypes' => [
],
'rollbackConfiguration' => [
'MonitoringTimeInMinutes' => '',
'RollbackTriggers' => ''
],
'semanticVersion' => '',
'stackName' => '',
'tags' => [
[
'Key' => '',
'Value' => ''
]
],
'templateId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'capabilities' => [
],
'changeSetName' => '',
'clientToken' => '',
'description' => '',
'notificationArns' => [
],
'parameterOverrides' => [
[
'Name' => '',
'Value' => ''
]
],
'resourceTypes' => [
],
'rollbackConfiguration' => [
'MonitoringTimeInMinutes' => '',
'RollbackTriggers' => ''
],
'semanticVersion' => '',
'stackName' => '',
'tags' => [
[
'Key' => '',
'Value' => ''
]
],
'templateId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/applications/:applicationId/changesets');
$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}}/applications/:applicationId/changesets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
{
"Name": "",
"Value": ""
}
],
"resourceTypes": [],
"rollbackConfiguration": {
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
},
"semanticVersion": "",
"stackName": "",
"tags": [
{
"Key": "",
"Value": ""
}
],
"templateId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/changesets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
{
"Name": "",
"Value": ""
}
],
"resourceTypes": [],
"rollbackConfiguration": {
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
},
"semanticVersion": "",
"stackName": "",
"tags": [
{
"Key": "",
"Value": ""
}
],
"templateId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/applications/:applicationId/changesets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/changesets"
payload = {
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
{
"Name": "",
"Value": ""
}
],
"resourceTypes": [],
"rollbackConfiguration": {
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
},
"semanticVersion": "",
"stackName": "",
"tags": [
{
"Key": "",
"Value": ""
}
],
"templateId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/changesets"
payload <- "{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\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}}/applications/:applicationId/changesets")
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 \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\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/applications/:applicationId/changesets') do |req|
req.body = "{\n \"capabilities\": [],\n \"changeSetName\": \"\",\n \"clientToken\": \"\",\n \"description\": \"\",\n \"notificationArns\": [],\n \"parameterOverrides\": [\n {\n \"Name\": \"\",\n \"Value\": \"\"\n }\n ],\n \"resourceTypes\": [],\n \"rollbackConfiguration\": {\n \"MonitoringTimeInMinutes\": \"\",\n \"RollbackTriggers\": \"\"\n },\n \"semanticVersion\": \"\",\n \"stackName\": \"\",\n \"tags\": [\n {\n \"Key\": \"\",\n \"Value\": \"\"\n }\n ],\n \"templateId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/changesets";
let payload = json!({
"capabilities": (),
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": (),
"parameterOverrides": (
json!({
"Name": "",
"Value": ""
})
),
"resourceTypes": (),
"rollbackConfiguration": json!({
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
}),
"semanticVersion": "",
"stackName": "",
"tags": (
json!({
"Key": "",
"Value": ""
})
),
"templateId": ""
});
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}}/applications/:applicationId/changesets \
--header 'content-type: application/json' \
--data '{
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
{
"Name": "",
"Value": ""
}
],
"resourceTypes": [],
"rollbackConfiguration": {
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
},
"semanticVersion": "",
"stackName": "",
"tags": [
{
"Key": "",
"Value": ""
}
],
"templateId": ""
}'
echo '{
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
{
"Name": "",
"Value": ""
}
],
"resourceTypes": [],
"rollbackConfiguration": {
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
},
"semanticVersion": "",
"stackName": "",
"tags": [
{
"Key": "",
"Value": ""
}
],
"templateId": ""
}' | \
http POST {{baseUrl}}/applications/:applicationId/changesets \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "capabilities": [],\n "changeSetName": "",\n "clientToken": "",\n "description": "",\n "notificationArns": [],\n "parameterOverrides": [\n {\n "Name": "",\n "Value": ""\n }\n ],\n "resourceTypes": [],\n "rollbackConfiguration": {\n "MonitoringTimeInMinutes": "",\n "RollbackTriggers": ""\n },\n "semanticVersion": "",\n "stackName": "",\n "tags": [\n {\n "Key": "",\n "Value": ""\n }\n ],\n "templateId": ""\n}' \
--output-document \
- {{baseUrl}}/applications/:applicationId/changesets
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"capabilities": [],
"changeSetName": "",
"clientToken": "",
"description": "",
"notificationArns": [],
"parameterOverrides": [
[
"Name": "",
"Value": ""
]
],
"resourceTypes": [],
"rollbackConfiguration": [
"MonitoringTimeInMinutes": "",
"RollbackTriggers": ""
],
"semanticVersion": "",
"stackName": "",
"tags": [
[
"Key": "",
"Value": ""
]
],
"templateId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/changesets")! 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
CreateCloudFormationTemplate
{{baseUrl}}/applications/:applicationId/templates
QUERY PARAMS
applicationId
BODY json
{
"semanticVersion": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/templates");
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 \"semanticVersion\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/applications/:applicationId/templates" {:content-type :json
:form-params {:semanticVersion ""}})
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/templates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"semanticVersion\": \"\"\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}}/applications/:applicationId/templates"),
Content = new StringContent("{\n \"semanticVersion\": \"\"\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}}/applications/:applicationId/templates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"semanticVersion\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/templates"
payload := strings.NewReader("{\n \"semanticVersion\": \"\"\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/applications/:applicationId/templates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 27
{
"semanticVersion": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/applications/:applicationId/templates")
.setHeader("content-type", "application/json")
.setBody("{\n \"semanticVersion\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/templates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"semanticVersion\": \"\"\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 \"semanticVersion\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/templates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/applications/:applicationId/templates")
.header("content-type", "application/json")
.body("{\n \"semanticVersion\": \"\"\n}")
.asString();
const data = JSON.stringify({
semanticVersion: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/applications/:applicationId/templates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/applications/:applicationId/templates',
headers: {'content-type': 'application/json'},
data: {semanticVersion: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/templates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"semanticVersion":""}'
};
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}}/applications/:applicationId/templates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "semanticVersion": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"semanticVersion\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/templates")
.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/applications/:applicationId/templates',
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({semanticVersion: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/applications/:applicationId/templates',
headers: {'content-type': 'application/json'},
body: {semanticVersion: ''},
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}}/applications/:applicationId/templates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
semanticVersion: ''
});
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}}/applications/:applicationId/templates',
headers: {'content-type': 'application/json'},
data: {semanticVersion: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/templates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"semanticVersion":""}'
};
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 = @{ @"semanticVersion": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/applications/:applicationId/templates"]
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}}/applications/:applicationId/templates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"semanticVersion\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/templates",
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([
'semanticVersion' => ''
]),
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}}/applications/:applicationId/templates', [
'body' => '{
"semanticVersion": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/templates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'semanticVersion' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'semanticVersion' => ''
]));
$request->setRequestUrl('{{baseUrl}}/applications/:applicationId/templates');
$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}}/applications/:applicationId/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"semanticVersion": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"semanticVersion": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"semanticVersion\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/applications/:applicationId/templates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/templates"
payload = { "semanticVersion": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/templates"
payload <- "{\n \"semanticVersion\": \"\"\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}}/applications/:applicationId/templates")
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 \"semanticVersion\": \"\"\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/applications/:applicationId/templates') do |req|
req.body = "{\n \"semanticVersion\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/templates";
let payload = json!({"semanticVersion": ""});
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}}/applications/:applicationId/templates \
--header 'content-type: application/json' \
--data '{
"semanticVersion": ""
}'
echo '{
"semanticVersion": ""
}' | \
http POST {{baseUrl}}/applications/:applicationId/templates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "semanticVersion": ""\n}' \
--output-document \
- {{baseUrl}}/applications/:applicationId/templates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["semanticVersion": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/templates")! 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
DeleteApplication
{{baseUrl}}/applications/:applicationId
QUERY PARAMS
applicationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/applications/:applicationId")
require "http/client"
url = "{{baseUrl}}/applications/:applicationId"
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}}/applications/:applicationId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applications/:applicationId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId"
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/applications/:applicationId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/applications/:applicationId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId"))
.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}}/applications/:applicationId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/applications/:applicationId")
.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}}/applications/:applicationId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/applications/:applicationId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId';
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}}/applications/:applicationId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId',
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}}/applications/:applicationId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/applications/:applicationId');
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}}/applications/:applicationId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId';
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}}/applications/:applicationId"]
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}}/applications/:applicationId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId",
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}}/applications/:applicationId');
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/applications/:applicationId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/applications/:applicationId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId")
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/applications/:applicationId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId";
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}}/applications/:applicationId
http DELETE {{baseUrl}}/applications/:applicationId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/applications/:applicationId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId")! 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
GetApplication
{{baseUrl}}/applications/:applicationId
QUERY PARAMS
applicationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/applications/:applicationId")
require "http/client"
url = "{{baseUrl}}/applications/:applicationId"
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}}/applications/:applicationId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applications/:applicationId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId"
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/applications/:applicationId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/applications/:applicationId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId"))
.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}}/applications/:applicationId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/applications/:applicationId")
.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}}/applications/:applicationId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/applications/:applicationId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId';
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}}/applications/:applicationId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId',
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}}/applications/:applicationId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/applications/:applicationId');
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}}/applications/:applicationId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId';
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}}/applications/:applicationId"]
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}}/applications/:applicationId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId",
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}}/applications/:applicationId');
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/applications/:applicationId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/applications/:applicationId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId")
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/applications/:applicationId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId";
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}}/applications/:applicationId
http GET {{baseUrl}}/applications/:applicationId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/applications/:applicationId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId")! 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
GetApplicationPolicy
{{baseUrl}}/applications/:applicationId/policy
QUERY PARAMS
applicationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/policy");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/applications/:applicationId/policy")
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/policy"
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}}/applications/:applicationId/policy"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applications/:applicationId/policy");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/policy"
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/applications/:applicationId/policy HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/applications/:applicationId/policy")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/policy"))
.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}}/applications/:applicationId/policy")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/applications/:applicationId/policy")
.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}}/applications/:applicationId/policy');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/applications/:applicationId/policy'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/policy';
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}}/applications/:applicationId/policy',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/policy")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId/policy',
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}}/applications/:applicationId/policy'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/applications/:applicationId/policy');
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}}/applications/:applicationId/policy'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/policy';
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}}/applications/:applicationId/policy"]
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}}/applications/:applicationId/policy" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/policy",
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}}/applications/:applicationId/policy');
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/policy');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/applications/:applicationId/policy');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId/policy' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/policy' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/applications/:applicationId/policy")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/policy"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/policy"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId/policy")
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/applications/:applicationId/policy') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/policy";
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}}/applications/:applicationId/policy
http GET {{baseUrl}}/applications/:applicationId/policy
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/applications/:applicationId/policy
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/policy")! 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
GetCloudFormationTemplate
{{baseUrl}}/applications/:applicationId/templates/:templateId
QUERY PARAMS
applicationId
templateId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/templates/:templateId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/applications/:applicationId/templates/:templateId")
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/templates/:templateId"
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}}/applications/:applicationId/templates/:templateId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applications/:applicationId/templates/:templateId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/templates/:templateId"
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/applications/:applicationId/templates/:templateId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/applications/:applicationId/templates/:templateId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/templates/:templateId"))
.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}}/applications/:applicationId/templates/:templateId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/applications/:applicationId/templates/:templateId")
.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}}/applications/:applicationId/templates/:templateId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/applications/:applicationId/templates/:templateId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/templates/:templateId';
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}}/applications/:applicationId/templates/:templateId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/templates/:templateId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId/templates/:templateId',
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}}/applications/:applicationId/templates/:templateId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/applications/:applicationId/templates/:templateId');
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}}/applications/:applicationId/templates/:templateId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/templates/:templateId';
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}}/applications/:applicationId/templates/:templateId"]
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}}/applications/:applicationId/templates/:templateId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/templates/:templateId",
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}}/applications/:applicationId/templates/:templateId');
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/templates/:templateId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/applications/:applicationId/templates/:templateId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId/templates/:templateId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/templates/:templateId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/applications/:applicationId/templates/:templateId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/templates/:templateId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/templates/:templateId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId/templates/:templateId")
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/applications/:applicationId/templates/:templateId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/templates/:templateId";
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}}/applications/:applicationId/templates/:templateId
http GET {{baseUrl}}/applications/:applicationId/templates/:templateId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/applications/:applicationId/templates/:templateId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/templates/:templateId")! 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
ListApplicationDependencies
{{baseUrl}}/applications/:applicationId/dependencies
QUERY PARAMS
applicationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/dependencies");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/applications/:applicationId/dependencies")
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/dependencies"
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}}/applications/:applicationId/dependencies"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applications/:applicationId/dependencies");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/dependencies"
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/applications/:applicationId/dependencies HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/applications/:applicationId/dependencies")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/dependencies"))
.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}}/applications/:applicationId/dependencies")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/applications/:applicationId/dependencies")
.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}}/applications/:applicationId/dependencies');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/applications/:applicationId/dependencies'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/dependencies';
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}}/applications/:applicationId/dependencies',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/dependencies")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId/dependencies',
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}}/applications/:applicationId/dependencies'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/applications/:applicationId/dependencies');
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}}/applications/:applicationId/dependencies'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/dependencies';
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}}/applications/:applicationId/dependencies"]
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}}/applications/:applicationId/dependencies" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/dependencies",
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}}/applications/:applicationId/dependencies');
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/dependencies');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/applications/:applicationId/dependencies');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId/dependencies' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/dependencies' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/applications/:applicationId/dependencies")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/dependencies"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/dependencies"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId/dependencies")
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/applications/:applicationId/dependencies') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/dependencies";
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}}/applications/:applicationId/dependencies
http GET {{baseUrl}}/applications/:applicationId/dependencies
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/applications/:applicationId/dependencies
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/dependencies")! 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
ListApplicationVersions
{{baseUrl}}/applications/:applicationId/versions
QUERY PARAMS
applicationId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/versions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/applications/:applicationId/versions")
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/versions"
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}}/applications/:applicationId/versions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applications/:applicationId/versions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/versions"
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/applications/:applicationId/versions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/applications/:applicationId/versions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/versions"))
.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}}/applications/:applicationId/versions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/applications/:applicationId/versions")
.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}}/applications/:applicationId/versions');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/applications/:applicationId/versions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/versions';
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}}/applications/:applicationId/versions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/versions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId/versions',
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}}/applications/:applicationId/versions'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/applications/:applicationId/versions');
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}}/applications/:applicationId/versions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/versions';
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}}/applications/:applicationId/versions"]
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}}/applications/:applicationId/versions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/versions",
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}}/applications/:applicationId/versions');
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/versions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/applications/:applicationId/versions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId/versions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/versions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/applications/:applicationId/versions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/versions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/versions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId/versions")
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/applications/:applicationId/versions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/versions";
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}}/applications/:applicationId/versions
http GET {{baseUrl}}/applications/:applicationId/versions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/applications/:applicationId/versions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/versions")! 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
ListApplications
{{baseUrl}}/applications
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/applications")
require "http/client"
url = "{{baseUrl}}/applications"
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}}/applications"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applications");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications"
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/applications HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/applications")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications"))
.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}}/applications")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/applications")
.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}}/applications');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/applications'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications';
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}}/applications',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/applications")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications',
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}}/applications'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/applications');
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}}/applications'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications';
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}}/applications"]
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}}/applications" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications",
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}}/applications');
echo $response->getBody();
setUrl('{{baseUrl}}/applications');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/applications');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/applications")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications")
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/applications') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications";
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}}/applications
http GET {{baseUrl}}/applications
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/applications
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications")! 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()
PUT
PutApplicationPolicy
{{baseUrl}}/applications/:applicationId/policy
QUERY PARAMS
applicationId
BODY json
{
"statements": [
{
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/policy");
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 \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/applications/:applicationId/policy" {:content-type :json
:form-params {:statements [{:Actions ""
:PrincipalOrgIDs ""
:Principals ""
:StatementId ""}]}})
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/policy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/applications/:applicationId/policy"),
Content = new StringContent("{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applications/:applicationId/policy");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/policy"
payload := strings.NewReader("{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/applications/:applicationId/policy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 135
{
"statements": [
{
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/applications/:applicationId/policy")
.setHeader("content-type", "application/json")
.setBody("{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/policy"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/policy")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/applications/:applicationId/policy")
.header("content-type", "application/json")
.body("{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
statements: [
{
Actions: '',
PrincipalOrgIDs: '',
Principals: '',
StatementId: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/applications/:applicationId/policy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/applications/:applicationId/policy',
headers: {'content-type': 'application/json'},
data: {
statements: [{Actions: '', PrincipalOrgIDs: '', Principals: '', StatementId: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/policy';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"statements":[{"Actions":"","PrincipalOrgIDs":"","Principals":"","StatementId":""}]}'
};
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}}/applications/:applicationId/policy',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "statements": [\n {\n "Actions": "",\n "PrincipalOrgIDs": "",\n "Principals": "",\n "StatementId": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/policy")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId/policy',
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({
statements: [{Actions: '', PrincipalOrgIDs: '', Principals: '', StatementId: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/applications/:applicationId/policy',
headers: {'content-type': 'application/json'},
body: {
statements: [{Actions: '', PrincipalOrgIDs: '', Principals: '', StatementId: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/applications/:applicationId/policy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
statements: [
{
Actions: '',
PrincipalOrgIDs: '',
Principals: '',
StatementId: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/applications/:applicationId/policy',
headers: {'content-type': 'application/json'},
data: {
statements: [{Actions: '', PrincipalOrgIDs: '', Principals: '', StatementId: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/policy';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"statements":[{"Actions":"","PrincipalOrgIDs":"","Principals":"","StatementId":""}]}'
};
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 = @{ @"statements": @[ @{ @"Actions": @"", @"PrincipalOrgIDs": @"", @"Principals": @"", @"StatementId": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/applications/:applicationId/policy"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/applications/:applicationId/policy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'statements' => [
[
'Actions' => '',
'PrincipalOrgIDs' => '',
'Principals' => '',
'StatementId' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/applications/:applicationId/policy', [
'body' => '{
"statements": [
{
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/policy');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'statements' => [
[
'Actions' => '',
'PrincipalOrgIDs' => '',
'Principals' => '',
'StatementId' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'statements' => [
[
'Actions' => '',
'PrincipalOrgIDs' => '',
'Principals' => '',
'StatementId' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/applications/:applicationId/policy');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId/policy' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"statements": [
{
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/policy' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"statements": [
{
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/applications/:applicationId/policy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/policy"
payload = { "statements": [
{
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
}
] }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/policy"
payload <- "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId/policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/applications/:applicationId/policy') do |req|
req.body = "{\n \"statements\": [\n {\n \"Actions\": \"\",\n \"PrincipalOrgIDs\": \"\",\n \"Principals\": \"\",\n \"StatementId\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/policy";
let payload = json!({"statements": (
json!({
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/applications/:applicationId/policy \
--header 'content-type: application/json' \
--data '{
"statements": [
{
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
}
]
}'
echo '{
"statements": [
{
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
}
]
}' | \
http PUT {{baseUrl}}/applications/:applicationId/policy \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "statements": [\n {\n "Actions": "",\n "PrincipalOrgIDs": "",\n "Principals": "",\n "StatementId": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/applications/:applicationId/policy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["statements": [
[
"Actions": "",
"PrincipalOrgIDs": "",
"Principals": "",
"StatementId": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/policy")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId/unshare");
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 \"organizationId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/applications/:applicationId/unshare" {:content-type :json
:form-params {:organizationId ""}})
require "http/client"
url = "{{baseUrl}}/applications/:applicationId/unshare"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"organizationId\": \"\"\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}}/applications/:applicationId/unshare"),
Content = new StringContent("{\n \"organizationId\": \"\"\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}}/applications/:applicationId/unshare");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"organizationId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId/unshare"
payload := strings.NewReader("{\n \"organizationId\": \"\"\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/applications/:applicationId/unshare HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 26
{
"organizationId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/applications/:applicationId/unshare")
.setHeader("content-type", "application/json")
.setBody("{\n \"organizationId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId/unshare"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"organizationId\": \"\"\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 \"organizationId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/unshare")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/applications/:applicationId/unshare")
.header("content-type", "application/json")
.body("{\n \"organizationId\": \"\"\n}")
.asString();
const data = JSON.stringify({
organizationId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/applications/:applicationId/unshare');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/applications/:applicationId/unshare',
headers: {'content-type': 'application/json'},
data: {organizationId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId/unshare';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"organizationId":""}'
};
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}}/applications/:applicationId/unshare',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "organizationId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"organizationId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId/unshare")
.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/applications/:applicationId/unshare',
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({organizationId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/applications/:applicationId/unshare',
headers: {'content-type': 'application/json'},
body: {organizationId: ''},
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}}/applications/:applicationId/unshare');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
organizationId: ''
});
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}}/applications/:applicationId/unshare',
headers: {'content-type': 'application/json'},
data: {organizationId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId/unshare';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"organizationId":""}'
};
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 = @{ @"organizationId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/applications/:applicationId/unshare"]
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}}/applications/:applicationId/unshare" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"organizationId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId/unshare",
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([
'organizationId' => ''
]),
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}}/applications/:applicationId/unshare', [
'body' => '{
"organizationId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId/unshare');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'organizationId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'organizationId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/applications/:applicationId/unshare');
$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}}/applications/:applicationId/unshare' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"organizationId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId/unshare' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"organizationId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"organizationId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/applications/:applicationId/unshare", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId/unshare"
payload = { "organizationId": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId/unshare"
payload <- "{\n \"organizationId\": \"\"\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}}/applications/:applicationId/unshare")
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 \"organizationId\": \"\"\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/applications/:applicationId/unshare') do |req|
req.body = "{\n \"organizationId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId/unshare";
let payload = json!({"organizationId": ""});
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}}/applications/:applicationId/unshare \
--header 'content-type: application/json' \
--data '{
"organizationId": ""
}'
echo '{
"organizationId": ""
}' | \
http POST {{baseUrl}}/applications/:applicationId/unshare \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "organizationId": ""\n}' \
--output-document \
- {{baseUrl}}/applications/:applicationId/unshare
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["organizationId": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId/unshare")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
UpdateApplication
{{baseUrl}}/applications/:applicationId
QUERY PARAMS
applicationId
BODY json
{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applications/:applicationId");
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 \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/applications/:applicationId" {:content-type :json
:form-params {:author ""
:description ""
:homePageUrl ""
:labels []
:readmeBody ""
:readmeUrl ""}})
require "http/client"
url = "{{baseUrl}}/applications/:applicationId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/applications/:applicationId"),
Content = new StringContent("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\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}}/applications/:applicationId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applications/:applicationId"
payload := strings.NewReader("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/applications/:applicationId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 115
{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/applications/:applicationId")
.setHeader("content-type", "application/json")
.setBody("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applications/:applicationId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\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 \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/applications/:applicationId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/applications/:applicationId")
.header("content-type", "application/json")
.body("{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}")
.asString();
const data = JSON.stringify({
author: '',
description: '',
homePageUrl: '',
labels: [],
readmeBody: '',
readmeUrl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/applications/:applicationId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/applications/:applicationId',
headers: {'content-type': 'application/json'},
data: {
author: '',
description: '',
homePageUrl: '',
labels: [],
readmeBody: '',
readmeUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applications/:applicationId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"author":"","description":"","homePageUrl":"","labels":[],"readmeBody":"","readmeUrl":""}'
};
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}}/applications/:applicationId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "author": "",\n "description": "",\n "homePageUrl": "",\n "labels": [],\n "readmeBody": "",\n "readmeUrl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/applications/:applicationId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/applications/:applicationId',
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({
author: '',
description: '',
homePageUrl: '',
labels: [],
readmeBody: '',
readmeUrl: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/applications/:applicationId',
headers: {'content-type': 'application/json'},
body: {
author: '',
description: '',
homePageUrl: '',
labels: [],
readmeBody: '',
readmeUrl: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/applications/:applicationId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
author: '',
description: '',
homePageUrl: '',
labels: [],
readmeBody: '',
readmeUrl: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/applications/:applicationId',
headers: {'content-type': 'application/json'},
data: {
author: '',
description: '',
homePageUrl: '',
labels: [],
readmeBody: '',
readmeUrl: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applications/:applicationId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"author":"","description":"","homePageUrl":"","labels":[],"readmeBody":"","readmeUrl":""}'
};
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 = @{ @"author": @"",
@"description": @"",
@"homePageUrl": @"",
@"labels": @[ ],
@"readmeBody": @"",
@"readmeUrl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/applications/:applicationId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/applications/:applicationId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applications/:applicationId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'author' => '',
'description' => '',
'homePageUrl' => '',
'labels' => [
],
'readmeBody' => '',
'readmeUrl' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/applications/:applicationId', [
'body' => '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/applications/:applicationId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'author' => '',
'description' => '',
'homePageUrl' => '',
'labels' => [
],
'readmeBody' => '',
'readmeUrl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'author' => '',
'description' => '',
'homePageUrl' => '',
'labels' => [
],
'readmeBody' => '',
'readmeUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/applications/:applicationId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applications/:applicationId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applications/:applicationId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/applications/:applicationId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applications/:applicationId"
payload = {
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applications/:applicationId"
payload <- "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applications/:applicationId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/applications/:applicationId') do |req|
req.body = "{\n \"author\": \"\",\n \"description\": \"\",\n \"homePageUrl\": \"\",\n \"labels\": [],\n \"readmeBody\": \"\",\n \"readmeUrl\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applications/:applicationId";
let payload = json!({
"author": "",
"description": "",
"homePageUrl": "",
"labels": (),
"readmeBody": "",
"readmeUrl": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/applications/:applicationId \
--header 'content-type: application/json' \
--data '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
}'
echo '{
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
}' | \
http PATCH {{baseUrl}}/applications/:applicationId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "author": "",\n "description": "",\n "homePageUrl": "",\n "labels": [],\n "readmeBody": "",\n "readmeUrl": ""\n}' \
--output-document \
- {{baseUrl}}/applications/:applicationId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"author": "",
"description": "",
"homePageUrl": "",
"labels": [],
"readmeBody": "",
"readmeUrl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applications/:applicationId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()