Amazon Elastic Transcoder
DELETE
CancelJob
{{baseUrl}}/2012-09-25/jobs/:Id
QUERY PARAMS
Id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/jobs/:Id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/2012-09-25/jobs/:Id")
require "http/client"
url = "{{baseUrl}}/2012-09-25/jobs/:Id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/jobs/:Id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/jobs/:Id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/jobs/:Id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/2012-09-25/jobs/:Id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/2012-09-25/jobs/:Id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/jobs/:Id"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/jobs/:Id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/2012-09-25/jobs/:Id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/2012-09-25/jobs/:Id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/jobs/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/jobs/:Id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/2012-09-25/jobs/:Id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/jobs/:Id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/jobs/:Id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/jobs/:Id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/2012-09-25/jobs/:Id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/jobs/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/jobs/:Id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/jobs/:Id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/2012-09-25/jobs/:Id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/jobs/:Id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/2012-09-25/jobs/:Id');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/jobs/:Id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/jobs/:Id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/jobs/:Id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/jobs/:Id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/2012-09-25/jobs/:Id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/jobs/:Id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/jobs/:Id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/jobs/:Id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/2012-09-25/jobs/:Id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/jobs/:Id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/2012-09-25/jobs/:Id
http DELETE {{baseUrl}}/2012-09-25/jobs/:Id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/2012-09-25/jobs/:Id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/jobs/:Id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
CreateJob
{{baseUrl}}/2012-09-25/jobs
BODY json
{
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
}
],
"UserMetadata": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/jobs");
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 \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/2012-09-25/jobs" {:content-type :json
:form-params {:PipelineId ""
:Input {:Key ""
:FrameRate ""
:Resolution ""
:AspectRatio ""
:Interlaced ""
:Container ""
:Encryption ""
:TimeSpan ""
:InputCaptions ""
:DetectedProperties ""}
:Inputs [{:Key ""
:FrameRate ""
:Resolution ""
:AspectRatio ""
:Interlaced ""
:Container ""
:Encryption ""
:TimeSpan ""
:InputCaptions ""
:DetectedProperties ""}]
:Output {:Key ""
:ThumbnailPattern ""
:ThumbnailEncryption ""
:Rotate ""
:PresetId ""
:SegmentDuration ""
:Watermarks ""
:AlbumArt ""
:Composition ""
:Captions ""
:Encryption ""}
:Outputs [{:Key ""
:ThumbnailPattern ""
:ThumbnailEncryption ""
:Rotate ""
:PresetId ""
:SegmentDuration ""
:Watermarks ""
:AlbumArt ""
:Composition ""
:Captions ""
:Encryption ""}]
:OutputKeyPrefix ""
:Playlists [{:Name ""
:Format ""
:OutputKeys ""
:HlsContentProtection ""
:PlayReadyDrm ""}]
:UserMetadata {}}})
require "http/client"
url = "{{baseUrl}}/2012-09-25/jobs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\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}}/2012-09-25/jobs"),
Content = new StringContent("{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\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}}/2012-09-25/jobs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/jobs"
payload := strings.NewReader("{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\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/2012-09-25/jobs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1296
{
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
}
],
"UserMetadata": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/2012-09-25/jobs")
.setHeader("content-type", "application/json")
.setBody("{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/jobs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\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 \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/jobs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/2012-09-25/jobs")
.header("content-type", "application/json")
.body("{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}")
.asString();
const data = JSON.stringify({
PipelineId: '',
Input: {
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
},
Inputs: [
{
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
}
],
Output: {
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
},
Outputs: [
{
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
}
],
OutputKeyPrefix: '',
Playlists: [
{
Name: '',
Format: '',
OutputKeys: '',
HlsContentProtection: '',
PlayReadyDrm: ''
}
],
UserMetadata: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/2012-09-25/jobs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/jobs',
headers: {'content-type': 'application/json'},
data: {
PipelineId: '',
Input: {
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
},
Inputs: [
{
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
}
],
Output: {
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
},
Outputs: [
{
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
}
],
OutputKeyPrefix: '',
Playlists: [
{
Name: '',
Format: '',
OutputKeys: '',
HlsContentProtection: '',
PlayReadyDrm: ''
}
],
UserMetadata: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"PipelineId":"","Input":{"Key":"","FrameRate":"","Resolution":"","AspectRatio":"","Interlaced":"","Container":"","Encryption":"","TimeSpan":"","InputCaptions":"","DetectedProperties":""},"Inputs":[{"Key":"","FrameRate":"","Resolution":"","AspectRatio":"","Interlaced":"","Container":"","Encryption":"","TimeSpan":"","InputCaptions":"","DetectedProperties":""}],"Output":{"Key":"","ThumbnailPattern":"","ThumbnailEncryption":"","Rotate":"","PresetId":"","SegmentDuration":"","Watermarks":"","AlbumArt":"","Composition":"","Captions":"","Encryption":""},"Outputs":[{"Key":"","ThumbnailPattern":"","ThumbnailEncryption":"","Rotate":"","PresetId":"","SegmentDuration":"","Watermarks":"","AlbumArt":"","Composition":"","Captions":"","Encryption":""}],"OutputKeyPrefix":"","Playlists":[{"Name":"","Format":"","OutputKeys":"","HlsContentProtection":"","PlayReadyDrm":""}],"UserMetadata":{}}'
};
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}}/2012-09-25/jobs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "PipelineId": "",\n "Input": {\n "Key": "",\n "FrameRate": "",\n "Resolution": "",\n "AspectRatio": "",\n "Interlaced": "",\n "Container": "",\n "Encryption": "",\n "TimeSpan": "",\n "InputCaptions": "",\n "DetectedProperties": ""\n },\n "Inputs": [\n {\n "Key": "",\n "FrameRate": "",\n "Resolution": "",\n "AspectRatio": "",\n "Interlaced": "",\n "Container": "",\n "Encryption": "",\n "TimeSpan": "",\n "InputCaptions": "",\n "DetectedProperties": ""\n }\n ],\n "Output": {\n "Key": "",\n "ThumbnailPattern": "",\n "ThumbnailEncryption": "",\n "Rotate": "",\n "PresetId": "",\n "SegmentDuration": "",\n "Watermarks": "",\n "AlbumArt": "",\n "Composition": "",\n "Captions": "",\n "Encryption": ""\n },\n "Outputs": [\n {\n "Key": "",\n "ThumbnailPattern": "",\n "ThumbnailEncryption": "",\n "Rotate": "",\n "PresetId": "",\n "SegmentDuration": "",\n "Watermarks": "",\n "AlbumArt": "",\n "Composition": "",\n "Captions": "",\n "Encryption": ""\n }\n ],\n "OutputKeyPrefix": "",\n "Playlists": [\n {\n "Name": "",\n "Format": "",\n "OutputKeys": "",\n "HlsContentProtection": "",\n "PlayReadyDrm": ""\n }\n ],\n "UserMetadata": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/jobs")
.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/2012-09-25/jobs',
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({
PipelineId: '',
Input: {
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
},
Inputs: [
{
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
}
],
Output: {
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
},
Outputs: [
{
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
}
],
OutputKeyPrefix: '',
Playlists: [
{
Name: '',
Format: '',
OutputKeys: '',
HlsContentProtection: '',
PlayReadyDrm: ''
}
],
UserMetadata: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/jobs',
headers: {'content-type': 'application/json'},
body: {
PipelineId: '',
Input: {
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
},
Inputs: [
{
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
}
],
Output: {
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
},
Outputs: [
{
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
}
],
OutputKeyPrefix: '',
Playlists: [
{
Name: '',
Format: '',
OutputKeys: '',
HlsContentProtection: '',
PlayReadyDrm: ''
}
],
UserMetadata: {}
},
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}}/2012-09-25/jobs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
PipelineId: '',
Input: {
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
},
Inputs: [
{
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
}
],
Output: {
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
},
Outputs: [
{
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
}
],
OutputKeyPrefix: '',
Playlists: [
{
Name: '',
Format: '',
OutputKeys: '',
HlsContentProtection: '',
PlayReadyDrm: ''
}
],
UserMetadata: {}
});
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}}/2012-09-25/jobs',
headers: {'content-type': 'application/json'},
data: {
PipelineId: '',
Input: {
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
},
Inputs: [
{
Key: '',
FrameRate: '',
Resolution: '',
AspectRatio: '',
Interlaced: '',
Container: '',
Encryption: '',
TimeSpan: '',
InputCaptions: '',
DetectedProperties: ''
}
],
Output: {
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
},
Outputs: [
{
Key: '',
ThumbnailPattern: '',
ThumbnailEncryption: '',
Rotate: '',
PresetId: '',
SegmentDuration: '',
Watermarks: '',
AlbumArt: '',
Composition: '',
Captions: '',
Encryption: ''
}
],
OutputKeyPrefix: '',
Playlists: [
{
Name: '',
Format: '',
OutputKeys: '',
HlsContentProtection: '',
PlayReadyDrm: ''
}
],
UserMetadata: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"PipelineId":"","Input":{"Key":"","FrameRate":"","Resolution":"","AspectRatio":"","Interlaced":"","Container":"","Encryption":"","TimeSpan":"","InputCaptions":"","DetectedProperties":""},"Inputs":[{"Key":"","FrameRate":"","Resolution":"","AspectRatio":"","Interlaced":"","Container":"","Encryption":"","TimeSpan":"","InputCaptions":"","DetectedProperties":""}],"Output":{"Key":"","ThumbnailPattern":"","ThumbnailEncryption":"","Rotate":"","PresetId":"","SegmentDuration":"","Watermarks":"","AlbumArt":"","Composition":"","Captions":"","Encryption":""},"Outputs":[{"Key":"","ThumbnailPattern":"","ThumbnailEncryption":"","Rotate":"","PresetId":"","SegmentDuration":"","Watermarks":"","AlbumArt":"","Composition":"","Captions":"","Encryption":""}],"OutputKeyPrefix":"","Playlists":[{"Name":"","Format":"","OutputKeys":"","HlsContentProtection":"","PlayReadyDrm":""}],"UserMetadata":{}}'
};
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 = @{ @"PipelineId": @"",
@"Input": @{ @"Key": @"", @"FrameRate": @"", @"Resolution": @"", @"AspectRatio": @"", @"Interlaced": @"", @"Container": @"", @"Encryption": @"", @"TimeSpan": @"", @"InputCaptions": @"", @"DetectedProperties": @"" },
@"Inputs": @[ @{ @"Key": @"", @"FrameRate": @"", @"Resolution": @"", @"AspectRatio": @"", @"Interlaced": @"", @"Container": @"", @"Encryption": @"", @"TimeSpan": @"", @"InputCaptions": @"", @"DetectedProperties": @"" } ],
@"Output": @{ @"Key": @"", @"ThumbnailPattern": @"", @"ThumbnailEncryption": @"", @"Rotate": @"", @"PresetId": @"", @"SegmentDuration": @"", @"Watermarks": @"", @"AlbumArt": @"", @"Composition": @"", @"Captions": @"", @"Encryption": @"" },
@"Outputs": @[ @{ @"Key": @"", @"ThumbnailPattern": @"", @"ThumbnailEncryption": @"", @"Rotate": @"", @"PresetId": @"", @"SegmentDuration": @"", @"Watermarks": @"", @"AlbumArt": @"", @"Composition": @"", @"Captions": @"", @"Encryption": @"" } ],
@"OutputKeyPrefix": @"",
@"Playlists": @[ @{ @"Name": @"", @"Format": @"", @"OutputKeys": @"", @"HlsContentProtection": @"", @"PlayReadyDrm": @"" } ],
@"UserMetadata": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/jobs"]
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}}/2012-09-25/jobs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/jobs",
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([
'PipelineId' => '',
'Input' => [
'Key' => '',
'FrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'Interlaced' => '',
'Container' => '',
'Encryption' => '',
'TimeSpan' => '',
'InputCaptions' => '',
'DetectedProperties' => ''
],
'Inputs' => [
[
'Key' => '',
'FrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'Interlaced' => '',
'Container' => '',
'Encryption' => '',
'TimeSpan' => '',
'InputCaptions' => '',
'DetectedProperties' => ''
]
],
'Output' => [
'Key' => '',
'ThumbnailPattern' => '',
'ThumbnailEncryption' => '',
'Rotate' => '',
'PresetId' => '',
'SegmentDuration' => '',
'Watermarks' => '',
'AlbumArt' => '',
'Composition' => '',
'Captions' => '',
'Encryption' => ''
],
'Outputs' => [
[
'Key' => '',
'ThumbnailPattern' => '',
'ThumbnailEncryption' => '',
'Rotate' => '',
'PresetId' => '',
'SegmentDuration' => '',
'Watermarks' => '',
'AlbumArt' => '',
'Composition' => '',
'Captions' => '',
'Encryption' => ''
]
],
'OutputKeyPrefix' => '',
'Playlists' => [
[
'Name' => '',
'Format' => '',
'OutputKeys' => '',
'HlsContentProtection' => '',
'PlayReadyDrm' => ''
]
],
'UserMetadata' => [
]
]),
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}}/2012-09-25/jobs', [
'body' => '{
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
}
],
"UserMetadata": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/jobs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'PipelineId' => '',
'Input' => [
'Key' => '',
'FrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'Interlaced' => '',
'Container' => '',
'Encryption' => '',
'TimeSpan' => '',
'InputCaptions' => '',
'DetectedProperties' => ''
],
'Inputs' => [
[
'Key' => '',
'FrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'Interlaced' => '',
'Container' => '',
'Encryption' => '',
'TimeSpan' => '',
'InputCaptions' => '',
'DetectedProperties' => ''
]
],
'Output' => [
'Key' => '',
'ThumbnailPattern' => '',
'ThumbnailEncryption' => '',
'Rotate' => '',
'PresetId' => '',
'SegmentDuration' => '',
'Watermarks' => '',
'AlbumArt' => '',
'Composition' => '',
'Captions' => '',
'Encryption' => ''
],
'Outputs' => [
[
'Key' => '',
'ThumbnailPattern' => '',
'ThumbnailEncryption' => '',
'Rotate' => '',
'PresetId' => '',
'SegmentDuration' => '',
'Watermarks' => '',
'AlbumArt' => '',
'Composition' => '',
'Captions' => '',
'Encryption' => ''
]
],
'OutputKeyPrefix' => '',
'Playlists' => [
[
'Name' => '',
'Format' => '',
'OutputKeys' => '',
'HlsContentProtection' => '',
'PlayReadyDrm' => ''
]
],
'UserMetadata' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'PipelineId' => '',
'Input' => [
'Key' => '',
'FrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'Interlaced' => '',
'Container' => '',
'Encryption' => '',
'TimeSpan' => '',
'InputCaptions' => '',
'DetectedProperties' => ''
],
'Inputs' => [
[
'Key' => '',
'FrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'Interlaced' => '',
'Container' => '',
'Encryption' => '',
'TimeSpan' => '',
'InputCaptions' => '',
'DetectedProperties' => ''
]
],
'Output' => [
'Key' => '',
'ThumbnailPattern' => '',
'ThumbnailEncryption' => '',
'Rotate' => '',
'PresetId' => '',
'SegmentDuration' => '',
'Watermarks' => '',
'AlbumArt' => '',
'Composition' => '',
'Captions' => '',
'Encryption' => ''
],
'Outputs' => [
[
'Key' => '',
'ThumbnailPattern' => '',
'ThumbnailEncryption' => '',
'Rotate' => '',
'PresetId' => '',
'SegmentDuration' => '',
'Watermarks' => '',
'AlbumArt' => '',
'Composition' => '',
'Captions' => '',
'Encryption' => ''
]
],
'OutputKeyPrefix' => '',
'Playlists' => [
[
'Name' => '',
'Format' => '',
'OutputKeys' => '',
'HlsContentProtection' => '',
'PlayReadyDrm' => ''
]
],
'UserMetadata' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/2012-09-25/jobs');
$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}}/2012-09-25/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
}
],
"UserMetadata": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
}
],
"UserMetadata": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/2012-09-25/jobs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/jobs"
payload = {
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
}
],
"UserMetadata": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/jobs"
payload <- "{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\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}}/2012-09-25/jobs")
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 \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\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/2012-09-25/jobs') do |req|
req.body = "{\n \"PipelineId\": \"\",\n \"Input\": {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n },\n \"Inputs\": [\n {\n \"Key\": \"\",\n \"FrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"Interlaced\": \"\",\n \"Container\": \"\",\n \"Encryption\": \"\",\n \"TimeSpan\": \"\",\n \"InputCaptions\": \"\",\n \"DetectedProperties\": \"\"\n }\n ],\n \"Output\": {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n },\n \"Outputs\": [\n {\n \"Key\": \"\",\n \"ThumbnailPattern\": \"\",\n \"ThumbnailEncryption\": \"\",\n \"Rotate\": \"\",\n \"PresetId\": \"\",\n \"SegmentDuration\": \"\",\n \"Watermarks\": \"\",\n \"AlbumArt\": \"\",\n \"Composition\": \"\",\n \"Captions\": \"\",\n \"Encryption\": \"\"\n }\n ],\n \"OutputKeyPrefix\": \"\",\n \"Playlists\": [\n {\n \"Name\": \"\",\n \"Format\": \"\",\n \"OutputKeys\": \"\",\n \"HlsContentProtection\": \"\",\n \"PlayReadyDrm\": \"\"\n }\n ],\n \"UserMetadata\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/jobs";
let payload = json!({
"PipelineId": "",
"Input": json!({
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}),
"Inputs": (
json!({
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
})
),
"Output": json!({
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}),
"Outputs": (
json!({
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
})
),
"OutputKeyPrefix": "",
"Playlists": (
json!({
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
})
),
"UserMetadata": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/2012-09-25/jobs \
--header 'content-type: application/json' \
--data '{
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
}
],
"UserMetadata": {}
}'
echo '{
"PipelineId": "",
"Input": {
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
},
"Inputs": [
{
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
}
],
"Output": {
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
},
"Outputs": [
{
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
}
],
"OutputKeyPrefix": "",
"Playlists": [
{
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
}
],
"UserMetadata": {}
}' | \
http POST {{baseUrl}}/2012-09-25/jobs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "PipelineId": "",\n "Input": {\n "Key": "",\n "FrameRate": "",\n "Resolution": "",\n "AspectRatio": "",\n "Interlaced": "",\n "Container": "",\n "Encryption": "",\n "TimeSpan": "",\n "InputCaptions": "",\n "DetectedProperties": ""\n },\n "Inputs": [\n {\n "Key": "",\n "FrameRate": "",\n "Resolution": "",\n "AspectRatio": "",\n "Interlaced": "",\n "Container": "",\n "Encryption": "",\n "TimeSpan": "",\n "InputCaptions": "",\n "DetectedProperties": ""\n }\n ],\n "Output": {\n "Key": "",\n "ThumbnailPattern": "",\n "ThumbnailEncryption": "",\n "Rotate": "",\n "PresetId": "",\n "SegmentDuration": "",\n "Watermarks": "",\n "AlbumArt": "",\n "Composition": "",\n "Captions": "",\n "Encryption": ""\n },\n "Outputs": [\n {\n "Key": "",\n "ThumbnailPattern": "",\n "ThumbnailEncryption": "",\n "Rotate": "",\n "PresetId": "",\n "SegmentDuration": "",\n "Watermarks": "",\n "AlbumArt": "",\n "Composition": "",\n "Captions": "",\n "Encryption": ""\n }\n ],\n "OutputKeyPrefix": "",\n "Playlists": [\n {\n "Name": "",\n "Format": "",\n "OutputKeys": "",\n "HlsContentProtection": "",\n "PlayReadyDrm": ""\n }\n ],\n "UserMetadata": {}\n}' \
--output-document \
- {{baseUrl}}/2012-09-25/jobs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"PipelineId": "",
"Input": [
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
],
"Inputs": [
[
"Key": "",
"FrameRate": "",
"Resolution": "",
"AspectRatio": "",
"Interlaced": "",
"Container": "",
"Encryption": "",
"TimeSpan": "",
"InputCaptions": "",
"DetectedProperties": ""
]
],
"Output": [
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
],
"Outputs": [
[
"Key": "",
"ThumbnailPattern": "",
"ThumbnailEncryption": "",
"Rotate": "",
"PresetId": "",
"SegmentDuration": "",
"Watermarks": "",
"AlbumArt": "",
"Composition": "",
"Captions": "",
"Encryption": ""
]
],
"OutputKeyPrefix": "",
"Playlists": [
[
"Name": "",
"Format": "",
"OutputKeys": "",
"HlsContentProtection": "",
"PlayReadyDrm": ""
]
],
"UserMetadata": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/jobs")! 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
CreatePipeline
{{baseUrl}}/2012-09-25/pipelines
BODY json
{
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/pipelines");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/2012-09-25/pipelines" {:content-type :json
:form-params {:Name ""
:InputBucket ""
:OutputBucket ""
:Role ""
:AwsKmsKeyArn ""
:Notifications {:Progressing ""
:Completed ""
:Warning ""
:Error ""}
:ContentConfig {:Bucket ""
:StorageClass ""
:Permissions ""}
:ThumbnailConfig {:Bucket ""
:StorageClass ""
:Permissions ""}}})
require "http/client"
url = "{{baseUrl}}/2012-09-25/pipelines"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/pipelines"),
Content = new StringContent("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\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}}/2012-09-25/pipelines");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/pipelines"
payload := strings.NewReader("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/2012-09-25/pipelines HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 382
{
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/2012-09-25/pipelines")
.setHeader("content-type", "application/json")
.setBody("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/pipelines"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/2012-09-25/pipelines")
.header("content-type", "application/json")
.body("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
Name: '',
InputBucket: '',
OutputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {
Progressing: '',
Completed: '',
Warning: '',
Error: ''
},
ContentConfig: {
Bucket: '',
StorageClass: '',
Permissions: ''
},
ThumbnailConfig: {
Bucket: '',
StorageClass: '',
Permissions: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/2012-09-25/pipelines');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/pipelines',
headers: {'content-type': 'application/json'},
data: {
Name: '',
InputBucket: '',
OutputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''},
ContentConfig: {Bucket: '', StorageClass: '', Permissions: ''},
ThumbnailConfig: {Bucket: '', StorageClass: '', Permissions: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/pipelines';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Name":"","InputBucket":"","OutputBucket":"","Role":"","AwsKmsKeyArn":"","Notifications":{"Progressing":"","Completed":"","Warning":"","Error":""},"ContentConfig":{"Bucket":"","StorageClass":"","Permissions":""},"ThumbnailConfig":{"Bucket":"","StorageClass":"","Permissions":""}}'
};
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}}/2012-09-25/pipelines',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Name": "",\n "InputBucket": "",\n "OutputBucket": "",\n "Role": "",\n "AwsKmsKeyArn": "",\n "Notifications": {\n "Progressing": "",\n "Completed": "",\n "Warning": "",\n "Error": ""\n },\n "ContentConfig": {\n "Bucket": "",\n "StorageClass": "",\n "Permissions": ""\n },\n "ThumbnailConfig": {\n "Bucket": "",\n "StorageClass": "",\n "Permissions": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines")
.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/2012-09-25/pipelines',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
Name: '',
InputBucket: '',
OutputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''},
ContentConfig: {Bucket: '', StorageClass: '', Permissions: ''},
ThumbnailConfig: {Bucket: '', StorageClass: '', Permissions: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/pipelines',
headers: {'content-type': 'application/json'},
body: {
Name: '',
InputBucket: '',
OutputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''},
ContentConfig: {Bucket: '', StorageClass: '', Permissions: ''},
ThumbnailConfig: {Bucket: '', StorageClass: '', Permissions: ''}
},
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}}/2012-09-25/pipelines');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Name: '',
InputBucket: '',
OutputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {
Progressing: '',
Completed: '',
Warning: '',
Error: ''
},
ContentConfig: {
Bucket: '',
StorageClass: '',
Permissions: ''
},
ThumbnailConfig: {
Bucket: '',
StorageClass: '',
Permissions: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/pipelines',
headers: {'content-type': 'application/json'},
data: {
Name: '',
InputBucket: '',
OutputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''},
ContentConfig: {Bucket: '', StorageClass: '', Permissions: ''},
ThumbnailConfig: {Bucket: '', StorageClass: '', Permissions: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/pipelines';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Name":"","InputBucket":"","OutputBucket":"","Role":"","AwsKmsKeyArn":"","Notifications":{"Progressing":"","Completed":"","Warning":"","Error":""},"ContentConfig":{"Bucket":"","StorageClass":"","Permissions":""},"ThumbnailConfig":{"Bucket":"","StorageClass":"","Permissions":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Name": @"",
@"InputBucket": @"",
@"OutputBucket": @"",
@"Role": @"",
@"AwsKmsKeyArn": @"",
@"Notifications": @{ @"Progressing": @"", @"Completed": @"", @"Warning": @"", @"Error": @"" },
@"ContentConfig": @{ @"Bucket": @"", @"StorageClass": @"", @"Permissions": @"" },
@"ThumbnailConfig": @{ @"Bucket": @"", @"StorageClass": @"", @"Permissions": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/pipelines"]
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}}/2012-09-25/pipelines" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/pipelines",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Name' => '',
'InputBucket' => '',
'OutputBucket' => '',
'Role' => '',
'AwsKmsKeyArn' => '',
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
],
'ContentConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
],
'ThumbnailConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
]
]),
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}}/2012-09-25/pipelines', [
'body' => '{
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/pipelines');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Name' => '',
'InputBucket' => '',
'OutputBucket' => '',
'Role' => '',
'AwsKmsKeyArn' => '',
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
],
'ContentConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
],
'ThumbnailConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Name' => '',
'InputBucket' => '',
'OutputBucket' => '',
'Role' => '',
'AwsKmsKeyArn' => '',
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
],
'ContentConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
],
'ThumbnailConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/2012-09-25/pipelines');
$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}}/2012-09-25/pipelines' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/pipelines' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/2012-09-25/pipelines", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/pipelines"
payload = {
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/pipelines"
payload <- "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/pipelines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/2012-09-25/pipelines') do |req|
req.body = "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/pipelines";
let payload = json!({
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": json!({
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}),
"ContentConfig": json!({
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}),
"ThumbnailConfig": json!({
"Bucket": "",
"StorageClass": "",
"Permissions": ""
})
});
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}}/2012-09-25/pipelines \
--header 'content-type: application/json' \
--data '{
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}'
echo '{
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}' | \
http POST {{baseUrl}}/2012-09-25/pipelines \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Name": "",\n "InputBucket": "",\n "OutputBucket": "",\n "Role": "",\n "AwsKmsKeyArn": "",\n "Notifications": {\n "Progressing": "",\n "Completed": "",\n "Warning": "",\n "Error": ""\n },\n "ContentConfig": {\n "Bucket": "",\n "StorageClass": "",\n "Permissions": ""\n },\n "ThumbnailConfig": {\n "Bucket": "",\n "StorageClass": "",\n "Permissions": ""\n }\n}' \
--output-document \
- {{baseUrl}}/2012-09-25/pipelines
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Name": "",
"InputBucket": "",
"OutputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": [
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
],
"ContentConfig": [
"Bucket": "",
"StorageClass": "",
"Permissions": ""
],
"ThumbnailConfig": [
"Bucket": "",
"StorageClass": "",
"Permissions": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/pipelines")! 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
CreatePreset
{{baseUrl}}/2012-09-25/presets
BODY json
{
"Name": "",
"Description": "",
"Container": "",
"Video": {
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
},
"Audio": {
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
},
"Thumbnails": {
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/presets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/2012-09-25/presets" {:content-type :json
:form-params {:Name ""
:Description ""
:Container ""
:Video {:Codec ""
:CodecOptions ""
:KeyframesMaxDist ""
:FixedGOP ""
:BitRate ""
:FrameRate ""
:MaxFrameRate ""
:Resolution ""
:AspectRatio ""
:MaxWidth ""
:MaxHeight ""
:DisplayAspectRatio ""
:SizingPolicy ""
:PaddingPolicy ""
:Watermarks ""}
:Audio {:Codec ""
:SampleRate ""
:BitRate ""
:Channels ""
:AudioPackingMode ""
:CodecOptions ""}
:Thumbnails {:Format ""
:Interval ""
:Resolution ""
:AspectRatio ""
:MaxWidth ""
:MaxHeight ""
:SizingPolicy ""
:PaddingPolicy ""}}})
require "http/client"
url = "{{baseUrl}}/2012-09-25/presets"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/presets"),
Content = new StringContent("{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\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}}/2012-09-25/presets");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/presets"
payload := strings.NewReader("{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/2012-09-25/presets HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 755
{
"Name": "",
"Description": "",
"Container": "",
"Video": {
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
},
"Audio": {
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
},
"Thumbnails": {
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/2012-09-25/presets")
.setHeader("content-type", "application/json")
.setBody("{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/presets"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/presets")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/2012-09-25/presets")
.header("content-type", "application/json")
.body("{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
Name: '',
Description: '',
Container: '',
Video: {
Codec: '',
CodecOptions: '',
KeyframesMaxDist: '',
FixedGOP: '',
BitRate: '',
FrameRate: '',
MaxFrameRate: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
DisplayAspectRatio: '',
SizingPolicy: '',
PaddingPolicy: '',
Watermarks: ''
},
Audio: {
Codec: '',
SampleRate: '',
BitRate: '',
Channels: '',
AudioPackingMode: '',
CodecOptions: ''
},
Thumbnails: {
Format: '',
Interval: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
SizingPolicy: '',
PaddingPolicy: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/2012-09-25/presets');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/presets',
headers: {'content-type': 'application/json'},
data: {
Name: '',
Description: '',
Container: '',
Video: {
Codec: '',
CodecOptions: '',
KeyframesMaxDist: '',
FixedGOP: '',
BitRate: '',
FrameRate: '',
MaxFrameRate: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
DisplayAspectRatio: '',
SizingPolicy: '',
PaddingPolicy: '',
Watermarks: ''
},
Audio: {
Codec: '',
SampleRate: '',
BitRate: '',
Channels: '',
AudioPackingMode: '',
CodecOptions: ''
},
Thumbnails: {
Format: '',
Interval: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
SizingPolicy: '',
PaddingPolicy: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/presets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Name":"","Description":"","Container":"","Video":{"Codec":"","CodecOptions":"","KeyframesMaxDist":"","FixedGOP":"","BitRate":"","FrameRate":"","MaxFrameRate":"","Resolution":"","AspectRatio":"","MaxWidth":"","MaxHeight":"","DisplayAspectRatio":"","SizingPolicy":"","PaddingPolicy":"","Watermarks":""},"Audio":{"Codec":"","SampleRate":"","BitRate":"","Channels":"","AudioPackingMode":"","CodecOptions":""},"Thumbnails":{"Format":"","Interval":"","Resolution":"","AspectRatio":"","MaxWidth":"","MaxHeight":"","SizingPolicy":"","PaddingPolicy":""}}'
};
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}}/2012-09-25/presets',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Name": "",\n "Description": "",\n "Container": "",\n "Video": {\n "Codec": "",\n "CodecOptions": "",\n "KeyframesMaxDist": "",\n "FixedGOP": "",\n "BitRate": "",\n "FrameRate": "",\n "MaxFrameRate": "",\n "Resolution": "",\n "AspectRatio": "",\n "MaxWidth": "",\n "MaxHeight": "",\n "DisplayAspectRatio": "",\n "SizingPolicy": "",\n "PaddingPolicy": "",\n "Watermarks": ""\n },\n "Audio": {\n "Codec": "",\n "SampleRate": "",\n "BitRate": "",\n "Channels": "",\n "AudioPackingMode": "",\n "CodecOptions": ""\n },\n "Thumbnails": {\n "Format": "",\n "Interval": "",\n "Resolution": "",\n "AspectRatio": "",\n "MaxWidth": "",\n "MaxHeight": "",\n "SizingPolicy": "",\n "PaddingPolicy": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/presets")
.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/2012-09-25/presets',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
Name: '',
Description: '',
Container: '',
Video: {
Codec: '',
CodecOptions: '',
KeyframesMaxDist: '',
FixedGOP: '',
BitRate: '',
FrameRate: '',
MaxFrameRate: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
DisplayAspectRatio: '',
SizingPolicy: '',
PaddingPolicy: '',
Watermarks: ''
},
Audio: {
Codec: '',
SampleRate: '',
BitRate: '',
Channels: '',
AudioPackingMode: '',
CodecOptions: ''
},
Thumbnails: {
Format: '',
Interval: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
SizingPolicy: '',
PaddingPolicy: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/presets',
headers: {'content-type': 'application/json'},
body: {
Name: '',
Description: '',
Container: '',
Video: {
Codec: '',
CodecOptions: '',
KeyframesMaxDist: '',
FixedGOP: '',
BitRate: '',
FrameRate: '',
MaxFrameRate: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
DisplayAspectRatio: '',
SizingPolicy: '',
PaddingPolicy: '',
Watermarks: ''
},
Audio: {
Codec: '',
SampleRate: '',
BitRate: '',
Channels: '',
AudioPackingMode: '',
CodecOptions: ''
},
Thumbnails: {
Format: '',
Interval: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
SizingPolicy: '',
PaddingPolicy: ''
}
},
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}}/2012-09-25/presets');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Name: '',
Description: '',
Container: '',
Video: {
Codec: '',
CodecOptions: '',
KeyframesMaxDist: '',
FixedGOP: '',
BitRate: '',
FrameRate: '',
MaxFrameRate: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
DisplayAspectRatio: '',
SizingPolicy: '',
PaddingPolicy: '',
Watermarks: ''
},
Audio: {
Codec: '',
SampleRate: '',
BitRate: '',
Channels: '',
AudioPackingMode: '',
CodecOptions: ''
},
Thumbnails: {
Format: '',
Interval: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
SizingPolicy: '',
PaddingPolicy: ''
}
});
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}}/2012-09-25/presets',
headers: {'content-type': 'application/json'},
data: {
Name: '',
Description: '',
Container: '',
Video: {
Codec: '',
CodecOptions: '',
KeyframesMaxDist: '',
FixedGOP: '',
BitRate: '',
FrameRate: '',
MaxFrameRate: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
DisplayAspectRatio: '',
SizingPolicy: '',
PaddingPolicy: '',
Watermarks: ''
},
Audio: {
Codec: '',
SampleRate: '',
BitRate: '',
Channels: '',
AudioPackingMode: '',
CodecOptions: ''
},
Thumbnails: {
Format: '',
Interval: '',
Resolution: '',
AspectRatio: '',
MaxWidth: '',
MaxHeight: '',
SizingPolicy: '',
PaddingPolicy: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/presets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Name":"","Description":"","Container":"","Video":{"Codec":"","CodecOptions":"","KeyframesMaxDist":"","FixedGOP":"","BitRate":"","FrameRate":"","MaxFrameRate":"","Resolution":"","AspectRatio":"","MaxWidth":"","MaxHeight":"","DisplayAspectRatio":"","SizingPolicy":"","PaddingPolicy":"","Watermarks":""},"Audio":{"Codec":"","SampleRate":"","BitRate":"","Channels":"","AudioPackingMode":"","CodecOptions":""},"Thumbnails":{"Format":"","Interval":"","Resolution":"","AspectRatio":"","MaxWidth":"","MaxHeight":"","SizingPolicy":"","PaddingPolicy":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Name": @"",
@"Description": @"",
@"Container": @"",
@"Video": @{ @"Codec": @"", @"CodecOptions": @"", @"KeyframesMaxDist": @"", @"FixedGOP": @"", @"BitRate": @"", @"FrameRate": @"", @"MaxFrameRate": @"", @"Resolution": @"", @"AspectRatio": @"", @"MaxWidth": @"", @"MaxHeight": @"", @"DisplayAspectRatio": @"", @"SizingPolicy": @"", @"PaddingPolicy": @"", @"Watermarks": @"" },
@"Audio": @{ @"Codec": @"", @"SampleRate": @"", @"BitRate": @"", @"Channels": @"", @"AudioPackingMode": @"", @"CodecOptions": @"" },
@"Thumbnails": @{ @"Format": @"", @"Interval": @"", @"Resolution": @"", @"AspectRatio": @"", @"MaxWidth": @"", @"MaxHeight": @"", @"SizingPolicy": @"", @"PaddingPolicy": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/presets"]
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}}/2012-09-25/presets" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/presets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Name' => '',
'Description' => '',
'Container' => '',
'Video' => [
'Codec' => '',
'CodecOptions' => '',
'KeyframesMaxDist' => '',
'FixedGOP' => '',
'BitRate' => '',
'FrameRate' => '',
'MaxFrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'MaxWidth' => '',
'MaxHeight' => '',
'DisplayAspectRatio' => '',
'SizingPolicy' => '',
'PaddingPolicy' => '',
'Watermarks' => ''
],
'Audio' => [
'Codec' => '',
'SampleRate' => '',
'BitRate' => '',
'Channels' => '',
'AudioPackingMode' => '',
'CodecOptions' => ''
],
'Thumbnails' => [
'Format' => '',
'Interval' => '',
'Resolution' => '',
'AspectRatio' => '',
'MaxWidth' => '',
'MaxHeight' => '',
'SizingPolicy' => '',
'PaddingPolicy' => ''
]
]),
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}}/2012-09-25/presets', [
'body' => '{
"Name": "",
"Description": "",
"Container": "",
"Video": {
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
},
"Audio": {
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
},
"Thumbnails": {
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/presets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Name' => '',
'Description' => '',
'Container' => '',
'Video' => [
'Codec' => '',
'CodecOptions' => '',
'KeyframesMaxDist' => '',
'FixedGOP' => '',
'BitRate' => '',
'FrameRate' => '',
'MaxFrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'MaxWidth' => '',
'MaxHeight' => '',
'DisplayAspectRatio' => '',
'SizingPolicy' => '',
'PaddingPolicy' => '',
'Watermarks' => ''
],
'Audio' => [
'Codec' => '',
'SampleRate' => '',
'BitRate' => '',
'Channels' => '',
'AudioPackingMode' => '',
'CodecOptions' => ''
],
'Thumbnails' => [
'Format' => '',
'Interval' => '',
'Resolution' => '',
'AspectRatio' => '',
'MaxWidth' => '',
'MaxHeight' => '',
'SizingPolicy' => '',
'PaddingPolicy' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Name' => '',
'Description' => '',
'Container' => '',
'Video' => [
'Codec' => '',
'CodecOptions' => '',
'KeyframesMaxDist' => '',
'FixedGOP' => '',
'BitRate' => '',
'FrameRate' => '',
'MaxFrameRate' => '',
'Resolution' => '',
'AspectRatio' => '',
'MaxWidth' => '',
'MaxHeight' => '',
'DisplayAspectRatio' => '',
'SizingPolicy' => '',
'PaddingPolicy' => '',
'Watermarks' => ''
],
'Audio' => [
'Codec' => '',
'SampleRate' => '',
'BitRate' => '',
'Channels' => '',
'AudioPackingMode' => '',
'CodecOptions' => ''
],
'Thumbnails' => [
'Format' => '',
'Interval' => '',
'Resolution' => '',
'AspectRatio' => '',
'MaxWidth' => '',
'MaxHeight' => '',
'SizingPolicy' => '',
'PaddingPolicy' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/2012-09-25/presets');
$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}}/2012-09-25/presets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Name": "",
"Description": "",
"Container": "",
"Video": {
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
},
"Audio": {
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
},
"Thumbnails": {
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/presets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Name": "",
"Description": "",
"Container": "",
"Video": {
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
},
"Audio": {
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
},
"Thumbnails": {
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/2012-09-25/presets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/presets"
payload = {
"Name": "",
"Description": "",
"Container": "",
"Video": {
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
},
"Audio": {
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
},
"Thumbnails": {
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/presets"
payload <- "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/presets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/2012-09-25/presets') do |req|
req.body = "{\n \"Name\": \"\",\n \"Description\": \"\",\n \"Container\": \"\",\n \"Video\": {\n \"Codec\": \"\",\n \"CodecOptions\": \"\",\n \"KeyframesMaxDist\": \"\",\n \"FixedGOP\": \"\",\n \"BitRate\": \"\",\n \"FrameRate\": \"\",\n \"MaxFrameRate\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"DisplayAspectRatio\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\",\n \"Watermarks\": \"\"\n },\n \"Audio\": {\n \"Codec\": \"\",\n \"SampleRate\": \"\",\n \"BitRate\": \"\",\n \"Channels\": \"\",\n \"AudioPackingMode\": \"\",\n \"CodecOptions\": \"\"\n },\n \"Thumbnails\": {\n \"Format\": \"\",\n \"Interval\": \"\",\n \"Resolution\": \"\",\n \"AspectRatio\": \"\",\n \"MaxWidth\": \"\",\n \"MaxHeight\": \"\",\n \"SizingPolicy\": \"\",\n \"PaddingPolicy\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/presets";
let payload = json!({
"Name": "",
"Description": "",
"Container": "",
"Video": json!({
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
}),
"Audio": json!({
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
}),
"Thumbnails": json!({
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
})
});
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}}/2012-09-25/presets \
--header 'content-type: application/json' \
--data '{
"Name": "",
"Description": "",
"Container": "",
"Video": {
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
},
"Audio": {
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
},
"Thumbnails": {
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
}
}'
echo '{
"Name": "",
"Description": "",
"Container": "",
"Video": {
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
},
"Audio": {
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
},
"Thumbnails": {
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
}
}' | \
http POST {{baseUrl}}/2012-09-25/presets \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Name": "",\n "Description": "",\n "Container": "",\n "Video": {\n "Codec": "",\n "CodecOptions": "",\n "KeyframesMaxDist": "",\n "FixedGOP": "",\n "BitRate": "",\n "FrameRate": "",\n "MaxFrameRate": "",\n "Resolution": "",\n "AspectRatio": "",\n "MaxWidth": "",\n "MaxHeight": "",\n "DisplayAspectRatio": "",\n "SizingPolicy": "",\n "PaddingPolicy": "",\n "Watermarks": ""\n },\n "Audio": {\n "Codec": "",\n "SampleRate": "",\n "BitRate": "",\n "Channels": "",\n "AudioPackingMode": "",\n "CodecOptions": ""\n },\n "Thumbnails": {\n "Format": "",\n "Interval": "",\n "Resolution": "",\n "AspectRatio": "",\n "MaxWidth": "",\n "MaxHeight": "",\n "SizingPolicy": "",\n "PaddingPolicy": ""\n }\n}' \
--output-document \
- {{baseUrl}}/2012-09-25/presets
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Name": "",
"Description": "",
"Container": "",
"Video": [
"Codec": "",
"CodecOptions": "",
"KeyframesMaxDist": "",
"FixedGOP": "",
"BitRate": "",
"FrameRate": "",
"MaxFrameRate": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"DisplayAspectRatio": "",
"SizingPolicy": "",
"PaddingPolicy": "",
"Watermarks": ""
],
"Audio": [
"Codec": "",
"SampleRate": "",
"BitRate": "",
"Channels": "",
"AudioPackingMode": "",
"CodecOptions": ""
],
"Thumbnails": [
"Format": "",
"Interval": "",
"Resolution": "",
"AspectRatio": "",
"MaxWidth": "",
"MaxHeight": "",
"SizingPolicy": "",
"PaddingPolicy": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/presets")! 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
DeletePipeline
{{baseUrl}}/2012-09-25/pipelines/:Id
QUERY PARAMS
Id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/pipelines/:Id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/2012-09-25/pipelines/:Id")
require "http/client"
url = "{{baseUrl}}/2012-09-25/pipelines/:Id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/pipelines/:Id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/pipelines/:Id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/pipelines/:Id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/2012-09-25/pipelines/:Id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/2012-09-25/pipelines/:Id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/pipelines/:Id"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/2012-09-25/pipelines/:Id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/2012-09-25/pipelines/:Id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/pipelines/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/2012-09-25/pipelines/:Id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/pipelines/:Id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/pipelines/:Id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/2012-09-25/pipelines/:Id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/pipelines/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/pipelines/:Id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/2012-09-25/pipelines/:Id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/pipelines/:Id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/2012-09-25/pipelines/:Id');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/pipelines/:Id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/pipelines/:Id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/pipelines/:Id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/pipelines/:Id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/2012-09-25/pipelines/:Id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/pipelines/:Id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/pipelines/:Id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/pipelines/:Id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/2012-09-25/pipelines/:Id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/pipelines/:Id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/2012-09-25/pipelines/:Id
http DELETE {{baseUrl}}/2012-09-25/pipelines/:Id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/2012-09-25/pipelines/:Id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/pipelines/:Id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
DeletePreset
{{baseUrl}}/2012-09-25/presets/:Id
QUERY PARAMS
Id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/presets/:Id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/2012-09-25/presets/:Id")
require "http/client"
url = "{{baseUrl}}/2012-09-25/presets/:Id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/presets/:Id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/presets/:Id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/presets/:Id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/2012-09-25/presets/:Id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/2012-09-25/presets/:Id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/presets/:Id"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/presets/:Id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/2012-09-25/presets/:Id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/2012-09-25/presets/:Id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/presets/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/presets/:Id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/2012-09-25/presets/:Id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/presets/:Id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/presets/:Id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/presets/:Id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/2012-09-25/presets/:Id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/2012-09-25/presets/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/presets/:Id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/presets/:Id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/2012-09-25/presets/:Id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/presets/:Id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/2012-09-25/presets/:Id');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/presets/:Id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/presets/:Id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/presets/:Id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/presets/:Id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/2012-09-25/presets/:Id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/presets/:Id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/presets/:Id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/presets/:Id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/2012-09-25/presets/:Id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/presets/:Id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/2012-09-25/presets/:Id
http DELETE {{baseUrl}}/2012-09-25/presets/:Id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/2012-09-25/presets/:Id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/presets/:Id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ListJobsByPipeline
{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId
QUERY PARAMS
PipelineId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId")
require "http/client"
url = "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId"
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}}/2012-09-25/jobsByPipeline/:PipelineId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId"
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/2012-09-25/jobsByPipeline/:PipelineId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId"))
.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}}/2012-09-25/jobsByPipeline/:PipelineId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId")
.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}}/2012-09-25/jobsByPipeline/:PipelineId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId';
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}}/2012-09-25/jobsByPipeline/:PipelineId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/jobsByPipeline/:PipelineId',
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}}/2012-09-25/jobsByPipeline/:PipelineId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId');
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}}/2012-09-25/jobsByPipeline/:PipelineId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId';
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}}/2012-09-25/jobsByPipeline/:PipelineId"]
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}}/2012-09-25/jobsByPipeline/:PipelineId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId",
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}}/2012-09-25/jobsByPipeline/:PipelineId');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/2012-09-25/jobsByPipeline/:PipelineId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId")
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/2012-09-25/jobsByPipeline/:PipelineId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId";
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}}/2012-09-25/jobsByPipeline/:PipelineId
http GET {{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/jobsByPipeline/:PipelineId")! 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
ListJobsByStatus
{{baseUrl}}/2012-09-25/jobsByStatus/:Status
QUERY PARAMS
Status
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/jobsByStatus/:Status");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/2012-09-25/jobsByStatus/:Status")
require "http/client"
url = "{{baseUrl}}/2012-09-25/jobsByStatus/:Status"
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}}/2012-09-25/jobsByStatus/:Status"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/jobsByStatus/:Status");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/jobsByStatus/:Status"
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/2012-09-25/jobsByStatus/:Status HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/2012-09-25/jobsByStatus/:Status")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/jobsByStatus/:Status"))
.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}}/2012-09-25/jobsByStatus/:Status")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/2012-09-25/jobsByStatus/:Status")
.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}}/2012-09-25/jobsByStatus/:Status');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/2012-09-25/jobsByStatus/:Status'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/jobsByStatus/:Status';
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}}/2012-09-25/jobsByStatus/:Status',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/jobsByStatus/:Status")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/jobsByStatus/:Status',
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}}/2012-09-25/jobsByStatus/:Status'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/2012-09-25/jobsByStatus/:Status');
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}}/2012-09-25/jobsByStatus/:Status'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/jobsByStatus/:Status';
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}}/2012-09-25/jobsByStatus/:Status"]
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}}/2012-09-25/jobsByStatus/:Status" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/jobsByStatus/:Status",
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}}/2012-09-25/jobsByStatus/:Status');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/jobsByStatus/:Status');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/jobsByStatus/:Status');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/jobsByStatus/:Status' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/jobsByStatus/:Status' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/2012-09-25/jobsByStatus/:Status")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/jobsByStatus/:Status"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/jobsByStatus/:Status"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/jobsByStatus/:Status")
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/2012-09-25/jobsByStatus/:Status') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/jobsByStatus/:Status";
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}}/2012-09-25/jobsByStatus/:Status
http GET {{baseUrl}}/2012-09-25/jobsByStatus/:Status
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/2012-09-25/jobsByStatus/:Status
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/jobsByStatus/:Status")! 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
ListPipelines
{{baseUrl}}/2012-09-25/pipelines
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/pipelines");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/2012-09-25/pipelines")
require "http/client"
url = "{{baseUrl}}/2012-09-25/pipelines"
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}}/2012-09-25/pipelines"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/pipelines");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/pipelines"
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/2012-09-25/pipelines HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/2012-09-25/pipelines")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/pipelines"))
.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}}/2012-09-25/pipelines")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/2012-09-25/pipelines")
.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}}/2012-09-25/pipelines');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/pipelines'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/pipelines';
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}}/2012-09-25/pipelines',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/pipelines',
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}}/2012-09-25/pipelines'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/2012-09-25/pipelines');
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}}/2012-09-25/pipelines'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/pipelines';
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}}/2012-09-25/pipelines"]
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}}/2012-09-25/pipelines" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/pipelines",
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}}/2012-09-25/pipelines');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/pipelines');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/pipelines');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/pipelines' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/pipelines' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/2012-09-25/pipelines")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/pipelines"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/pipelines"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/pipelines")
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/2012-09-25/pipelines') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/pipelines";
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}}/2012-09-25/pipelines
http GET {{baseUrl}}/2012-09-25/pipelines
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/2012-09-25/pipelines
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/pipelines")! 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
ListPresets
{{baseUrl}}/2012-09-25/presets
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/presets");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/2012-09-25/presets")
require "http/client"
url = "{{baseUrl}}/2012-09-25/presets"
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}}/2012-09-25/presets"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/presets");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/presets"
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/2012-09-25/presets HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/2012-09-25/presets")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/presets"))
.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}}/2012-09-25/presets")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/2012-09-25/presets")
.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}}/2012-09-25/presets');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/presets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/presets';
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}}/2012-09-25/presets',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/presets")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/presets',
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}}/2012-09-25/presets'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/2012-09-25/presets');
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}}/2012-09-25/presets'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/presets';
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}}/2012-09-25/presets"]
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}}/2012-09-25/presets" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/presets",
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}}/2012-09-25/presets');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/presets');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/presets');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/presets' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/presets' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/2012-09-25/presets")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/presets"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/presets"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/presets")
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/2012-09-25/presets') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/presets";
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}}/2012-09-25/presets
http GET {{baseUrl}}/2012-09-25/presets
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/2012-09-25/presets
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/presets")! 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
ReadJob
{{baseUrl}}/2012-09-25/jobs/:Id
QUERY PARAMS
Id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/jobs/:Id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/2012-09-25/jobs/:Id")
require "http/client"
url = "{{baseUrl}}/2012-09-25/jobs/:Id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/jobs/:Id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/jobs/:Id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/jobs/:Id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/2012-09-25/jobs/:Id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/2012-09-25/jobs/:Id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/jobs/:Id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/jobs/:Id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/2012-09-25/jobs/:Id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/2012-09-25/jobs/:Id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/jobs/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/jobs/:Id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/2012-09-25/jobs/:Id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/jobs/:Id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/jobs/:Id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/jobs/:Id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/2012-09-25/jobs/:Id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/jobs/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/jobs/:Id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/jobs/:Id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/2012-09-25/jobs/:Id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/jobs/:Id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/2012-09-25/jobs/:Id');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/jobs/:Id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/jobs/:Id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/jobs/:Id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/jobs/:Id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/2012-09-25/jobs/:Id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/jobs/:Id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/jobs/:Id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/jobs/:Id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/2012-09-25/jobs/:Id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/jobs/:Id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/2012-09-25/jobs/:Id
http GET {{baseUrl}}/2012-09-25/jobs/:Id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/2012-09-25/jobs/:Id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/jobs/:Id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ReadPipeline
{{baseUrl}}/2012-09-25/pipelines/:Id
QUERY PARAMS
Id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/pipelines/:Id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/2012-09-25/pipelines/:Id")
require "http/client"
url = "{{baseUrl}}/2012-09-25/pipelines/:Id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/pipelines/:Id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/pipelines/:Id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/pipelines/:Id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/2012-09-25/pipelines/:Id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/2012-09-25/pipelines/:Id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/pipelines/:Id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/2012-09-25/pipelines/:Id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/2012-09-25/pipelines/:Id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/pipelines/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/2012-09-25/pipelines/:Id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/pipelines/:Id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/pipelines/:Id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/2012-09-25/pipelines/:Id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/pipelines/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/pipelines/:Id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/2012-09-25/pipelines/:Id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/pipelines/:Id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/2012-09-25/pipelines/:Id');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/pipelines/:Id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/pipelines/:Id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/pipelines/:Id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/pipelines/:Id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/2012-09-25/pipelines/:Id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/pipelines/:Id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/pipelines/:Id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/pipelines/:Id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/2012-09-25/pipelines/:Id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/pipelines/:Id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/2012-09-25/pipelines/:Id
http GET {{baseUrl}}/2012-09-25/pipelines/:Id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/2012-09-25/pipelines/:Id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/pipelines/:Id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
ReadPreset
{{baseUrl}}/2012-09-25/presets/:Id
QUERY PARAMS
Id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/presets/:Id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/2012-09-25/presets/:Id")
require "http/client"
url = "{{baseUrl}}/2012-09-25/presets/:Id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/presets/:Id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/2012-09-25/presets/:Id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/presets/:Id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/2012-09-25/presets/:Id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/2012-09-25/presets/:Id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/presets/:Id"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/presets/:Id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/2012-09-25/presets/:Id")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/2012-09-25/presets/:Id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/presets/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/presets/:Id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/2012-09-25/presets/:Id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/presets/:Id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/2012-09-25/presets/:Id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/presets/:Id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/2012-09-25/presets/:Id');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/2012-09-25/presets/:Id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/presets/:Id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/presets/:Id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/2012-09-25/presets/:Id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/presets/:Id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/2012-09-25/presets/:Id');
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/presets/:Id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/2012-09-25/presets/:Id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/2012-09-25/presets/:Id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/presets/:Id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/2012-09-25/presets/:Id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/presets/:Id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/presets/:Id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/presets/:Id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/2012-09-25/presets/:Id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/presets/:Id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/2012-09-25/presets/:Id
http GET {{baseUrl}}/2012-09-25/presets/:Id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/2012-09-25/presets/:Id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/presets/:Id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
TestRole
{{baseUrl}}/2012-09-25/roleTests
BODY json
{
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/roleTests");
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 \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/2012-09-25/roleTests" {:content-type :json
:form-params {:Role ""
:InputBucket ""
:OutputBucket ""
:Topics []}})
require "http/client"
url = "{{baseUrl}}/2012-09-25/roleTests"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\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}}/2012-09-25/roleTests"),
Content = new StringContent("{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\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}}/2012-09-25/roleTests");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/roleTests"
payload := strings.NewReader("{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\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/2012-09-25/roleTests HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 75
{
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/2012-09-25/roleTests")
.setHeader("content-type", "application/json")
.setBody("{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/roleTests"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\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 \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/roleTests")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/2012-09-25/roleTests")
.header("content-type", "application/json")
.body("{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}")
.asString();
const data = JSON.stringify({
Role: '',
InputBucket: '',
OutputBucket: '',
Topics: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/2012-09-25/roleTests');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/roleTests',
headers: {'content-type': 'application/json'},
data: {Role: '', InputBucket: '', OutputBucket: '', Topics: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/roleTests';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Role":"","InputBucket":"","OutputBucket":"","Topics":[]}'
};
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}}/2012-09-25/roleTests',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Role": "",\n "InputBucket": "",\n "OutputBucket": "",\n "Topics": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/roleTests")
.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/2012-09-25/roleTests',
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({Role: '', InputBucket: '', OutputBucket: '', Topics: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/roleTests',
headers: {'content-type': 'application/json'},
body: {Role: '', InputBucket: '', OutputBucket: '', Topics: []},
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}}/2012-09-25/roleTests');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Role: '',
InputBucket: '',
OutputBucket: '',
Topics: []
});
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}}/2012-09-25/roleTests',
headers: {'content-type': 'application/json'},
data: {Role: '', InputBucket: '', OutputBucket: '', Topics: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/roleTests';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Role":"","InputBucket":"","OutputBucket":"","Topics":[]}'
};
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 = @{ @"Role": @"",
@"InputBucket": @"",
@"OutputBucket": @"",
@"Topics": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/roleTests"]
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}}/2012-09-25/roleTests" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/roleTests",
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([
'Role' => '',
'InputBucket' => '',
'OutputBucket' => '',
'Topics' => [
]
]),
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}}/2012-09-25/roleTests', [
'body' => '{
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/roleTests');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Role' => '',
'InputBucket' => '',
'OutputBucket' => '',
'Topics' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Role' => '',
'InputBucket' => '',
'OutputBucket' => '',
'Topics' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/2012-09-25/roleTests');
$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}}/2012-09-25/roleTests' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/roleTests' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/2012-09-25/roleTests", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/roleTests"
payload = {
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/roleTests"
payload <- "{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\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}}/2012-09-25/roleTests")
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 \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\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/2012-09-25/roleTests') do |req|
req.body = "{\n \"Role\": \"\",\n \"InputBucket\": \"\",\n \"OutputBucket\": \"\",\n \"Topics\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/roleTests";
let payload = json!({
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": ()
});
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}}/2012-09-25/roleTests \
--header 'content-type: application/json' \
--data '{
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
}'
echo '{
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
}' | \
http POST {{baseUrl}}/2012-09-25/roleTests \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Role": "",\n "InputBucket": "",\n "OutputBucket": "",\n "Topics": []\n}' \
--output-document \
- {{baseUrl}}/2012-09-25/roleTests
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Role": "",
"InputBucket": "",
"OutputBucket": "",
"Topics": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/roleTests")! 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
UpdatePipeline
{{baseUrl}}/2012-09-25/pipelines/:Id
QUERY PARAMS
Id
BODY json
{
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/pipelines/:Id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/2012-09-25/pipelines/:Id" {:content-type :json
:form-params {:Name ""
:InputBucket ""
:Role ""
:AwsKmsKeyArn ""
:Notifications {:Progressing ""
:Completed ""
:Warning ""
:Error ""}
:ContentConfig {:Bucket ""
:StorageClass ""
:Permissions ""}
:ThumbnailConfig {:Bucket ""
:StorageClass ""
:Permissions ""}}})
require "http/client"
url = "{{baseUrl}}/2012-09-25/pipelines/:Id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\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}}/2012-09-25/pipelines/:Id"),
Content = new StringContent("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\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}}/2012-09-25/pipelines/:Id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/pipelines/:Id"
payload := strings.NewReader("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\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/2012-09-25/pipelines/:Id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 360
{
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/2012-09-25/pipelines/:Id")
.setHeader("content-type", "application/json")
.setBody("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/pipelines/:Id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/2012-09-25/pipelines/:Id")
.header("content-type", "application/json")
.body("{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
Name: '',
InputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {
Progressing: '',
Completed: '',
Warning: '',
Error: ''
},
ContentConfig: {
Bucket: '',
StorageClass: '',
Permissions: ''
},
ThumbnailConfig: {
Bucket: '',
StorageClass: '',
Permissions: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/2012-09-25/pipelines/:Id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/2012-09-25/pipelines/:Id',
headers: {'content-type': 'application/json'},
data: {
Name: '',
InputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''},
ContentConfig: {Bucket: '', StorageClass: '', Permissions: ''},
ThumbnailConfig: {Bucket: '', StorageClass: '', Permissions: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"Name":"","InputBucket":"","Role":"","AwsKmsKeyArn":"","Notifications":{"Progressing":"","Completed":"","Warning":"","Error":""},"ContentConfig":{"Bucket":"","StorageClass":"","Permissions":""},"ThumbnailConfig":{"Bucket":"","StorageClass":"","Permissions":""}}'
};
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}}/2012-09-25/pipelines/:Id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Name": "",\n "InputBucket": "",\n "Role": "",\n "AwsKmsKeyArn": "",\n "Notifications": {\n "Progressing": "",\n "Completed": "",\n "Warning": "",\n "Error": ""\n },\n "ContentConfig": {\n "Bucket": "",\n "StorageClass": "",\n "Permissions": ""\n },\n "ThumbnailConfig": {\n "Bucket": "",\n "StorageClass": "",\n "Permissions": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id")
.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/2012-09-25/pipelines/:Id',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
Name: '',
InputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''},
ContentConfig: {Bucket: '', StorageClass: '', Permissions: ''},
ThumbnailConfig: {Bucket: '', StorageClass: '', Permissions: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/2012-09-25/pipelines/:Id',
headers: {'content-type': 'application/json'},
body: {
Name: '',
InputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''},
ContentConfig: {Bucket: '', StorageClass: '', Permissions: ''},
ThumbnailConfig: {Bucket: '', StorageClass: '', Permissions: ''}
},
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}}/2012-09-25/pipelines/:Id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Name: '',
InputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {
Progressing: '',
Completed: '',
Warning: '',
Error: ''
},
ContentConfig: {
Bucket: '',
StorageClass: '',
Permissions: ''
},
ThumbnailConfig: {
Bucket: '',
StorageClass: '',
Permissions: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/2012-09-25/pipelines/:Id',
headers: {'content-type': 'application/json'},
data: {
Name: '',
InputBucket: '',
Role: '',
AwsKmsKeyArn: '',
Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''},
ContentConfig: {Bucket: '', StorageClass: '', Permissions: ''},
ThumbnailConfig: {Bucket: '', StorageClass: '', Permissions: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"Name":"","InputBucket":"","Role":"","AwsKmsKeyArn":"","Notifications":{"Progressing":"","Completed":"","Warning":"","Error":""},"ContentConfig":{"Bucket":"","StorageClass":"","Permissions":""},"ThumbnailConfig":{"Bucket":"","StorageClass":"","Permissions":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Name": @"",
@"InputBucket": @"",
@"Role": @"",
@"AwsKmsKeyArn": @"",
@"Notifications": @{ @"Progressing": @"", @"Completed": @"", @"Warning": @"", @"Error": @"" },
@"ContentConfig": @{ @"Bucket": @"", @"StorageClass": @"", @"Permissions": @"" },
@"ThumbnailConfig": @{ @"Bucket": @"", @"StorageClass": @"", @"Permissions": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/pipelines/:Id"]
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}}/2012-09-25/pipelines/:Id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/pipelines/:Id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'Name' => '',
'InputBucket' => '',
'Role' => '',
'AwsKmsKeyArn' => '',
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
],
'ContentConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
],
'ThumbnailConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
]
]),
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}}/2012-09-25/pipelines/:Id', [
'body' => '{
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/pipelines/:Id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Name' => '',
'InputBucket' => '',
'Role' => '',
'AwsKmsKeyArn' => '',
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
],
'ContentConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
],
'ThumbnailConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Name' => '',
'InputBucket' => '',
'Role' => '',
'AwsKmsKeyArn' => '',
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
],
'ContentConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
],
'ThumbnailConfig' => [
'Bucket' => '',
'StorageClass' => '',
'Permissions' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/2012-09-25/pipelines/:Id');
$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}}/2012-09-25/pipelines/:Id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/pipelines/:Id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/2012-09-25/pipelines/:Id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/pipelines/:Id"
payload = {
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/pipelines/:Id"
payload <- "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\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}}/2012-09-25/pipelines/:Id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\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/2012-09-25/pipelines/:Id') do |req|
req.body = "{\n \"Name\": \"\",\n \"InputBucket\": \"\",\n \"Role\": \"\",\n \"AwsKmsKeyArn\": \"\",\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n },\n \"ContentConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\n },\n \"ThumbnailConfig\": {\n \"Bucket\": \"\",\n \"StorageClass\": \"\",\n \"Permissions\": \"\"\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}}/2012-09-25/pipelines/:Id";
let payload = json!({
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": json!({
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}),
"ContentConfig": json!({
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}),
"ThumbnailConfig": json!({
"Bucket": "",
"StorageClass": "",
"Permissions": ""
})
});
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}}/2012-09-25/pipelines/:Id \
--header 'content-type: application/json' \
--data '{
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}'
echo '{
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
},
"ContentConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
},
"ThumbnailConfig": {
"Bucket": "",
"StorageClass": "",
"Permissions": ""
}
}' | \
http PUT {{baseUrl}}/2012-09-25/pipelines/:Id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "Name": "",\n "InputBucket": "",\n "Role": "",\n "AwsKmsKeyArn": "",\n "Notifications": {\n "Progressing": "",\n "Completed": "",\n "Warning": "",\n "Error": ""\n },\n "ContentConfig": {\n "Bucket": "",\n "StorageClass": "",\n "Permissions": ""\n },\n "ThumbnailConfig": {\n "Bucket": "",\n "StorageClass": "",\n "Permissions": ""\n }\n}' \
--output-document \
- {{baseUrl}}/2012-09-25/pipelines/:Id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Name": "",
"InputBucket": "",
"Role": "",
"AwsKmsKeyArn": "",
"Notifications": [
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
],
"ContentConfig": [
"Bucket": "",
"StorageClass": "",
"Permissions": ""
],
"ThumbnailConfig": [
"Bucket": "",
"StorageClass": "",
"Permissions": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/pipelines/:Id")! 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
UpdatePipelineNotifications
{{baseUrl}}/2012-09-25/pipelines/:Id/notifications
QUERY PARAMS
Id
BODY json
{
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications");
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 \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications" {:content-type :json
:form-params {:Notifications {:Progressing ""
:Completed ""
:Warning ""
:Error ""}}})
require "http/client"
url = "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/2012-09-25/pipelines/:Id/notifications"),
Content = new StringContent("{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\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}}/2012-09-25/pipelines/:Id/notifications");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications"
payload := strings.NewReader("{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/2012-09-25/pipelines/:Id/notifications HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 107
{
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications")
.setHeader("content-type", "application/json")
.setBody("{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/pipelines/:Id/notifications"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\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 \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id/notifications")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/2012-09-25/pipelines/:Id/notifications")
.header("content-type", "application/json")
.body("{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
Notifications: {
Progressing: '',
Completed: '',
Warning: '',
Error: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/2012-09-25/pipelines/:Id/notifications');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/pipelines/:Id/notifications',
headers: {'content-type': 'application/json'},
data: {Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id/notifications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Notifications":{"Progressing":"","Completed":"","Warning":"","Error":""}}'
};
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}}/2012-09-25/pipelines/:Id/notifications',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Notifications": {\n "Progressing": "",\n "Completed": "",\n "Warning": "",\n "Error": ""\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 \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id/notifications")
.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/2012-09-25/pipelines/:Id/notifications',
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({Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/pipelines/:Id/notifications',
headers: {'content-type': 'application/json'},
body: {Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''}},
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}}/2012-09-25/pipelines/:Id/notifications');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Notifications: {
Progressing: '',
Completed: '',
Warning: '',
Error: ''
}
});
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}}/2012-09-25/pipelines/:Id/notifications',
headers: {'content-type': 'application/json'},
data: {Notifications: {Progressing: '', Completed: '', Warning: '', Error: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id/notifications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Notifications":{"Progressing":"","Completed":"","Warning":"","Error":""}}'
};
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 = @{ @"Notifications": @{ @"Progressing": @"", @"Completed": @"", @"Warning": @"", @"Error": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/pipelines/:Id/notifications"]
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}}/2012-09-25/pipelines/:Id/notifications" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/pipelines/:Id/notifications",
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([
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
]
]),
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}}/2012-09-25/pipelines/:Id/notifications', [
'body' => '{
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/pipelines/:Id/notifications');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Notifications' => [
'Progressing' => '',
'Completed' => '',
'Warning' => '',
'Error' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/2012-09-25/pipelines/:Id/notifications');
$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}}/2012-09-25/pipelines/:Id/notifications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/pipelines/:Id/notifications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/2012-09-25/pipelines/:Id/notifications", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications"
payload = { "Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications"
payload <- "{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/2012-09-25/pipelines/:Id/notifications")
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 \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/2012-09-25/pipelines/:Id/notifications') do |req|
req.body = "{\n \"Notifications\": {\n \"Progressing\": \"\",\n \"Completed\": \"\",\n \"Warning\": \"\",\n \"Error\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications";
let payload = json!({"Notifications": json!({
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
})});
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}}/2012-09-25/pipelines/:Id/notifications \
--header 'content-type: application/json' \
--data '{
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}
}'
echo '{
"Notifications": {
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
}
}' | \
http POST {{baseUrl}}/2012-09-25/pipelines/:Id/notifications \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Notifications": {\n "Progressing": "",\n "Completed": "",\n "Warning": "",\n "Error": ""\n }\n}' \
--output-document \
- {{baseUrl}}/2012-09-25/pipelines/:Id/notifications
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Notifications": [
"Progressing": "",
"Completed": "",
"Warning": "",
"Error": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/pipelines/:Id/notifications")! 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
UpdatePipelineStatus
{{baseUrl}}/2012-09-25/pipelines/:Id/status
QUERY PARAMS
Id
BODY json
{
"Status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/2012-09-25/pipelines/:Id/status");
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 \"Status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/2012-09-25/pipelines/:Id/status" {:content-type :json
:form-params {:Status ""}})
require "http/client"
url = "{{baseUrl}}/2012-09-25/pipelines/:Id/status"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Status\": \"\"\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}}/2012-09-25/pipelines/:Id/status"),
Content = new StringContent("{\n \"Status\": \"\"\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}}/2012-09-25/pipelines/:Id/status");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/2012-09-25/pipelines/:Id/status"
payload := strings.NewReader("{\n \"Status\": \"\"\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/2012-09-25/pipelines/:Id/status HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18
{
"Status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/2012-09-25/pipelines/:Id/status")
.setHeader("content-type", "application/json")
.setBody("{\n \"Status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/2012-09-25/pipelines/:Id/status"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Status\": \"\"\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 \"Status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id/status")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/2012-09-25/pipelines/:Id/status")
.header("content-type", "application/json")
.body("{\n \"Status\": \"\"\n}")
.asString();
const data = JSON.stringify({
Status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/2012-09-25/pipelines/:Id/status');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/pipelines/:Id/status',
headers: {'content-type': 'application/json'},
data: {Status: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id/status';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Status":""}'
};
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}}/2012-09-25/pipelines/:Id/status',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/2012-09-25/pipelines/:Id/status")
.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/2012-09-25/pipelines/:Id/status',
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({Status: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/2012-09-25/pipelines/:Id/status',
headers: {'content-type': 'application/json'},
body: {Status: ''},
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}}/2012-09-25/pipelines/:Id/status');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Status: ''
});
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}}/2012-09-25/pipelines/:Id/status',
headers: {'content-type': 'application/json'},
data: {Status: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/2012-09-25/pipelines/:Id/status';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Status":""}'
};
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 = @{ @"Status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/2012-09-25/pipelines/:Id/status"]
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}}/2012-09-25/pipelines/:Id/status" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Status\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/2012-09-25/pipelines/:Id/status",
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([
'Status' => ''
]),
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}}/2012-09-25/pipelines/:Id/status', [
'body' => '{
"Status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/2012-09-25/pipelines/:Id/status');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/2012-09-25/pipelines/:Id/status');
$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}}/2012-09-25/pipelines/:Id/status' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/2012-09-25/pipelines/:Id/status' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/2012-09-25/pipelines/:Id/status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/2012-09-25/pipelines/:Id/status"
payload = { "Status": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/2012-09-25/pipelines/:Id/status"
payload <- "{\n \"Status\": \"\"\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}}/2012-09-25/pipelines/:Id/status")
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 \"Status\": \"\"\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/2012-09-25/pipelines/:Id/status') do |req|
req.body = "{\n \"Status\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/2012-09-25/pipelines/:Id/status";
let payload = json!({"Status": ""});
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}}/2012-09-25/pipelines/:Id/status \
--header 'content-type: application/json' \
--data '{
"Status": ""
}'
echo '{
"Status": ""
}' | \
http POST {{baseUrl}}/2012-09-25/pipelines/:Id/status \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Status": ""\n}' \
--output-document \
- {{baseUrl}}/2012-09-25/pipelines/:Id/status
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Status": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/2012-09-25/pipelines/:Id/status")! 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()