Transcoder API
POST
transcoder.projects.locations.jobTemplates.create
{{baseUrl}}/v1/:parent/jobTemplates
QUERY PARAMS
parent
BODY json
{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"labels": {},
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/jobTemplates");
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 \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/jobTemplates" {:content-type :json
:form-params {:config {:adBreaks [{:startTimeOffset ""}]
:editList [{:endTimeOffset ""
:inputs []
:key ""
:startTimeOffset ""}]
:elementaryStreams [{:audioStream {:bitrateBps 0
:channelCount 0
:channelLayout []
:codec ""
:displayName ""
:languageCode ""
:mapping [{:atomKey ""
:gainDb ""
:inputChannel 0
:inputKey ""
:inputTrack 0
:outputChannel 0}]
:sampleRateHertz 0}
:key ""
:textStream {:codec ""
:displayName ""
:languageCode ""
:mapping [{:atomKey ""
:inputKey ""
:inputTrack 0}]}
:videoStream {:h264 {:allowOpenGop false
:aqStrength ""
:bFrameCount 0
:bPyramid false
:bitrateBps 0
:crfLevel 0
:enableTwoPass false
:entropyCoder ""
:frameRate ""
:gopDuration ""
:gopFrameCount 0
:heightPixels 0
:pixelFormat ""
:preset ""
:profile ""
:rateControlMode ""
:tune ""
:vbvFullnessBits 0
:vbvSizeBits 0
:widthPixels 0}
:h265 {:allowOpenGop false
:aqStrength ""
:bFrameCount 0
:bPyramid false
:bitrateBps 0
:crfLevel 0
:enableTwoPass false
:frameRate ""
:gopDuration ""
:gopFrameCount 0
:heightPixels 0
:pixelFormat ""
:preset ""
:profile ""
:rateControlMode ""
:tune ""
:vbvFullnessBits 0
:vbvSizeBits 0
:widthPixels 0}
:vp9 {:bitrateBps 0
:crfLevel 0
:frameRate ""
:gopDuration ""
:gopFrameCount 0
:heightPixels 0
:pixelFormat ""
:profile ""
:rateControlMode ""
:widthPixels 0}}}]
:inputs [{:key ""
:preprocessingConfig {:audio {:highBoost false
:lowBoost false
:lufs ""}
:color {:brightness ""
:contrast ""
:saturation ""}
:crop {:bottomPixels 0
:leftPixels 0
:rightPixels 0
:topPixels 0}
:deblock {:enabled false
:strength ""}
:deinterlace {:bwdif {:deinterlaceAllFrames false
:mode ""
:parity ""}
:yadif {:deinterlaceAllFrames false
:disableSpatialInterlacing false
:mode ""
:parity ""}}
:denoise {:strength ""
:tune ""}
:pad {:bottomPixels 0
:leftPixels 0
:rightPixels 0
:topPixels 0}}
:uri ""}]
:manifests [{:fileName ""
:muxStreams []
:type ""}]
:muxStreams [{:container ""
:elementaryStreams []
:fileName ""
:key ""
:segmentSettings {:individualSegments false
:segmentDuration ""}}]
:output {:uri ""}
:overlays [{:animations [{:animationEnd {:startTimeOffset ""}
:animationFade {:endTimeOffset ""
:fadeType ""
:startTimeOffset ""
:xy {:x ""
:y ""}}
:animationStatic {:startTimeOffset ""
:xy {}}}]
:image {:alpha ""
:resolution {}
:uri ""}}]
:pubsubDestination {:topic ""}
:spriteSheets [{:columnCount 0
:endTimeOffset ""
:filePrefix ""
:format ""
:interval ""
:quality 0
:rowCount 0
:spriteHeightPixels 0
:spriteWidthPixels 0
:startTimeOffset ""
:totalCount 0}]}
:labels {}
:name ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/jobTemplates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/jobTemplates"),
Content = new StringContent("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/jobTemplates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/jobTemplates"
payload := strings.NewReader("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/jobTemplates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5319
{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"labels": {},
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/jobTemplates")
.setHeader("content-type", "application/json")
.setBody("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/jobTemplates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\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 \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/jobTemplates")
.header("content-type", "application/json")
.body("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
config: {
adBreaks: [
{
startTimeOffset: ''
}
],
editList: [
{
endTimeOffset: '',
inputs: [],
key: '',
startTimeOffset: ''
}
],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
inputKey: '',
inputTrack: 0
}
]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {
highBoost: false,
lowBoost: false,
lufs: ''
},
color: {
brightness: '',
contrast: '',
saturation: ''
},
crop: {
bottomPixels: 0,
leftPixels: 0,
rightPixels: 0,
topPixels: 0
},
deblock: {
enabled: false,
strength: ''
},
deinterlace: {
bwdif: {
deinterlaceAllFrames: false,
mode: '',
parity: ''
},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {
strength: '',
tune: ''
},
pad: {
bottomPixels: 0,
leftPixels: 0,
rightPixels: 0,
topPixels: 0
}
},
uri: ''
}
],
manifests: [
{
fileName: '',
muxStreams: [],
type: ''
}
],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {
individualSegments: false,
segmentDuration: ''
}
}
],
output: {
uri: ''
},
overlays: [
{
animations: [
{
animationEnd: {
startTimeOffset: ''
},
animationFade: {
endTimeOffset: '',
fadeType: '',
startTimeOffset: '',
xy: {
x: '',
y: ''
}
},
animationStatic: {
startTimeOffset: '',
xy: {}
}
}
],
image: {
alpha: '',
resolution: {},
uri: ''
}
}
],
pubsubDestination: {
topic: ''
},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
labels: {},
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/jobTemplates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/jobTemplates',
headers: {'content-type': 'application/json'},
data: {
config: {
adBreaks: [{startTimeOffset: ''}],
editList: [{endTimeOffset: '', inputs: [], key: '', startTimeOffset: ''}],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [{atomKey: '', inputKey: '', inputTrack: 0}]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {highBoost: false, lowBoost: false, lufs: ''},
color: {brightness: '', contrast: '', saturation: ''},
crop: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0},
deblock: {enabled: false, strength: ''},
deinterlace: {
bwdif: {deinterlaceAllFrames: false, mode: '', parity: ''},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {strength: '', tune: ''},
pad: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0}
},
uri: ''
}
],
manifests: [{fileName: '', muxStreams: [], type: ''}],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {individualSegments: false, segmentDuration: ''}
}
],
output: {uri: ''},
overlays: [
{
animations: [
{
animationEnd: {startTimeOffset: ''},
animationFade: {endTimeOffset: '', fadeType: '', startTimeOffset: '', xy: {x: '', y: ''}},
animationStatic: {startTimeOffset: '', xy: {}}
}
],
image: {alpha: '', resolution: {}, uri: ''}
}
],
pubsubDestination: {topic: ''},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
labels: {},
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/jobTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"config":{"adBreaks":[{"startTimeOffset":""}],"editList":[{"endTimeOffset":"","inputs":[],"key":"","startTimeOffset":""}],"elementaryStreams":[{"audioStream":{"bitrateBps":0,"channelCount":0,"channelLayout":[],"codec":"","displayName":"","languageCode":"","mapping":[{"atomKey":"","gainDb":"","inputChannel":0,"inputKey":"","inputTrack":0,"outputChannel":0}],"sampleRateHertz":0},"key":"","textStream":{"codec":"","displayName":"","languageCode":"","mapping":[{"atomKey":"","inputKey":"","inputTrack":0}]},"videoStream":{"h264":{"allowOpenGop":false,"aqStrength":"","bFrameCount":0,"bPyramid":false,"bitrateBps":0,"crfLevel":0,"enableTwoPass":false,"entropyCoder":"","frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","preset":"","profile":"","rateControlMode":"","tune":"","vbvFullnessBits":0,"vbvSizeBits":0,"widthPixels":0},"h265":{"allowOpenGop":false,"aqStrength":"","bFrameCount":0,"bPyramid":false,"bitrateBps":0,"crfLevel":0,"enableTwoPass":false,"frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","preset":"","profile":"","rateControlMode":"","tune":"","vbvFullnessBits":0,"vbvSizeBits":0,"widthPixels":0},"vp9":{"bitrateBps":0,"crfLevel":0,"frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","profile":"","rateControlMode":"","widthPixels":0}}}],"inputs":[{"key":"","preprocessingConfig":{"audio":{"highBoost":false,"lowBoost":false,"lufs":""},"color":{"brightness":"","contrast":"","saturation":""},"crop":{"bottomPixels":0,"leftPixels":0,"rightPixels":0,"topPixels":0},"deblock":{"enabled":false,"strength":""},"deinterlace":{"bwdif":{"deinterlaceAllFrames":false,"mode":"","parity":""},"yadif":{"deinterlaceAllFrames":false,"disableSpatialInterlacing":false,"mode":"","parity":""}},"denoise":{"strength":"","tune":""},"pad":{"bottomPixels":0,"leftPixels":0,"rightPixels":0,"topPixels":0}},"uri":""}],"manifests":[{"fileName":"","muxStreams":[],"type":""}],"muxStreams":[{"container":"","elementaryStreams":[],"fileName":"","key":"","segmentSettings":{"individualSegments":false,"segmentDuration":""}}],"output":{"uri":""},"overlays":[{"animations":[{"animationEnd":{"startTimeOffset":""},"animationFade":{"endTimeOffset":"","fadeType":"","startTimeOffset":"","xy":{"x":"","y":""}},"animationStatic":{"startTimeOffset":"","xy":{}}}],"image":{"alpha":"","resolution":{},"uri":""}}],"pubsubDestination":{"topic":""},"spriteSheets":[{"columnCount":0,"endTimeOffset":"","filePrefix":"","format":"","interval":"","quality":0,"rowCount":0,"spriteHeightPixels":0,"spriteWidthPixels":0,"startTimeOffset":"","totalCount":0}]},"labels":{},"name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/jobTemplates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "config": {\n "adBreaks": [\n {\n "startTimeOffset": ""\n }\n ],\n "editList": [\n {\n "endTimeOffset": "",\n "inputs": [],\n "key": "",\n "startTimeOffset": ""\n }\n ],\n "elementaryStreams": [\n {\n "audioStream": {\n "bitrateBps": 0,\n "channelCount": 0,\n "channelLayout": [],\n "codec": "",\n "displayName": "",\n "languageCode": "",\n "mapping": [\n {\n "atomKey": "",\n "gainDb": "",\n "inputChannel": 0,\n "inputKey": "",\n "inputTrack": 0,\n "outputChannel": 0\n }\n ],\n "sampleRateHertz": 0\n },\n "key": "",\n "textStream": {\n "codec": "",\n "displayName": "",\n "languageCode": "",\n "mapping": [\n {\n "atomKey": "",\n "inputKey": "",\n "inputTrack": 0\n }\n ]\n },\n "videoStream": {\n "h264": {\n "allowOpenGop": false,\n "aqStrength": "",\n "bFrameCount": 0,\n "bPyramid": false,\n "bitrateBps": 0,\n "crfLevel": 0,\n "enableTwoPass": false,\n "entropyCoder": "",\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "preset": "",\n "profile": "",\n "rateControlMode": "",\n "tune": "",\n "vbvFullnessBits": 0,\n "vbvSizeBits": 0,\n "widthPixels": 0\n },\n "h265": {\n "allowOpenGop": false,\n "aqStrength": "",\n "bFrameCount": 0,\n "bPyramid": false,\n "bitrateBps": 0,\n "crfLevel": 0,\n "enableTwoPass": false,\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "preset": "",\n "profile": "",\n "rateControlMode": "",\n "tune": "",\n "vbvFullnessBits": 0,\n "vbvSizeBits": 0,\n "widthPixels": 0\n },\n "vp9": {\n "bitrateBps": 0,\n "crfLevel": 0,\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "profile": "",\n "rateControlMode": "",\n "widthPixels": 0\n }\n }\n }\n ],\n "inputs": [\n {\n "key": "",\n "preprocessingConfig": {\n "audio": {\n "highBoost": false,\n "lowBoost": false,\n "lufs": ""\n },\n "color": {\n "brightness": "",\n "contrast": "",\n "saturation": ""\n },\n "crop": {\n "bottomPixels": 0,\n "leftPixels": 0,\n "rightPixels": 0,\n "topPixels": 0\n },\n "deblock": {\n "enabled": false,\n "strength": ""\n },\n "deinterlace": {\n "bwdif": {\n "deinterlaceAllFrames": false,\n "mode": "",\n "parity": ""\n },\n "yadif": {\n "deinterlaceAllFrames": false,\n "disableSpatialInterlacing": false,\n "mode": "",\n "parity": ""\n }\n },\n "denoise": {\n "strength": "",\n "tune": ""\n },\n "pad": {\n "bottomPixels": 0,\n "leftPixels": 0,\n "rightPixels": 0,\n "topPixels": 0\n }\n },\n "uri": ""\n }\n ],\n "manifests": [\n {\n "fileName": "",\n "muxStreams": [],\n "type": ""\n }\n ],\n "muxStreams": [\n {\n "container": "",\n "elementaryStreams": [],\n "fileName": "",\n "key": "",\n "segmentSettings": {\n "individualSegments": false,\n "segmentDuration": ""\n }\n }\n ],\n "output": {\n "uri": ""\n },\n "overlays": [\n {\n "animations": [\n {\n "animationEnd": {\n "startTimeOffset": ""\n },\n "animationFade": {\n "endTimeOffset": "",\n "fadeType": "",\n "startTimeOffset": "",\n "xy": {\n "x": "",\n "y": ""\n }\n },\n "animationStatic": {\n "startTimeOffset": "",\n "xy": {}\n }\n }\n ],\n "image": {\n "alpha": "",\n "resolution": {},\n "uri": ""\n }\n }\n ],\n "pubsubDestination": {\n "topic": ""\n },\n "spriteSheets": [\n {\n "columnCount": 0,\n "endTimeOffset": "",\n "filePrefix": "",\n "format": "",\n "interval": "",\n "quality": 0,\n "rowCount": 0,\n "spriteHeightPixels": 0,\n "spriteWidthPixels": 0,\n "startTimeOffset": "",\n "totalCount": 0\n }\n ]\n },\n "labels": {},\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobTemplates")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/jobTemplates',
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({
config: {
adBreaks: [{startTimeOffset: ''}],
editList: [{endTimeOffset: '', inputs: [], key: '', startTimeOffset: ''}],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [{atomKey: '', inputKey: '', inputTrack: 0}]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {highBoost: false, lowBoost: false, lufs: ''},
color: {brightness: '', contrast: '', saturation: ''},
crop: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0},
deblock: {enabled: false, strength: ''},
deinterlace: {
bwdif: {deinterlaceAllFrames: false, mode: '', parity: ''},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {strength: '', tune: ''},
pad: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0}
},
uri: ''
}
],
manifests: [{fileName: '', muxStreams: [], type: ''}],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {individualSegments: false, segmentDuration: ''}
}
],
output: {uri: ''},
overlays: [
{
animations: [
{
animationEnd: {startTimeOffset: ''},
animationFade: {endTimeOffset: '', fadeType: '', startTimeOffset: '', xy: {x: '', y: ''}},
animationStatic: {startTimeOffset: '', xy: {}}
}
],
image: {alpha: '', resolution: {}, uri: ''}
}
],
pubsubDestination: {topic: ''},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
labels: {},
name: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/jobTemplates',
headers: {'content-type': 'application/json'},
body: {
config: {
adBreaks: [{startTimeOffset: ''}],
editList: [{endTimeOffset: '', inputs: [], key: '', startTimeOffset: ''}],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [{atomKey: '', inputKey: '', inputTrack: 0}]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {highBoost: false, lowBoost: false, lufs: ''},
color: {brightness: '', contrast: '', saturation: ''},
crop: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0},
deblock: {enabled: false, strength: ''},
deinterlace: {
bwdif: {deinterlaceAllFrames: false, mode: '', parity: ''},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {strength: '', tune: ''},
pad: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0}
},
uri: ''
}
],
manifests: [{fileName: '', muxStreams: [], type: ''}],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {individualSegments: false, segmentDuration: ''}
}
],
output: {uri: ''},
overlays: [
{
animations: [
{
animationEnd: {startTimeOffset: ''},
animationFade: {endTimeOffset: '', fadeType: '', startTimeOffset: '', xy: {x: '', y: ''}},
animationStatic: {startTimeOffset: '', xy: {}}
}
],
image: {alpha: '', resolution: {}, uri: ''}
}
],
pubsubDestination: {topic: ''},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
labels: {},
name: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:parent/jobTemplates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
config: {
adBreaks: [
{
startTimeOffset: ''
}
],
editList: [
{
endTimeOffset: '',
inputs: [],
key: '',
startTimeOffset: ''
}
],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
inputKey: '',
inputTrack: 0
}
]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {
highBoost: false,
lowBoost: false,
lufs: ''
},
color: {
brightness: '',
contrast: '',
saturation: ''
},
crop: {
bottomPixels: 0,
leftPixels: 0,
rightPixels: 0,
topPixels: 0
},
deblock: {
enabled: false,
strength: ''
},
deinterlace: {
bwdif: {
deinterlaceAllFrames: false,
mode: '',
parity: ''
},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {
strength: '',
tune: ''
},
pad: {
bottomPixels: 0,
leftPixels: 0,
rightPixels: 0,
topPixels: 0
}
},
uri: ''
}
],
manifests: [
{
fileName: '',
muxStreams: [],
type: ''
}
],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {
individualSegments: false,
segmentDuration: ''
}
}
],
output: {
uri: ''
},
overlays: [
{
animations: [
{
animationEnd: {
startTimeOffset: ''
},
animationFade: {
endTimeOffset: '',
fadeType: '',
startTimeOffset: '',
xy: {
x: '',
y: ''
}
},
animationStatic: {
startTimeOffset: '',
xy: {}
}
}
],
image: {
alpha: '',
resolution: {},
uri: ''
}
}
],
pubsubDestination: {
topic: ''
},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
labels: {},
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/jobTemplates',
headers: {'content-type': 'application/json'},
data: {
config: {
adBreaks: [{startTimeOffset: ''}],
editList: [{endTimeOffset: '', inputs: [], key: '', startTimeOffset: ''}],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [{atomKey: '', inputKey: '', inputTrack: 0}]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {highBoost: false, lowBoost: false, lufs: ''},
color: {brightness: '', contrast: '', saturation: ''},
crop: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0},
deblock: {enabled: false, strength: ''},
deinterlace: {
bwdif: {deinterlaceAllFrames: false, mode: '', parity: ''},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {strength: '', tune: ''},
pad: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0}
},
uri: ''
}
],
manifests: [{fileName: '', muxStreams: [], type: ''}],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {individualSegments: false, segmentDuration: ''}
}
],
output: {uri: ''},
overlays: [
{
animations: [
{
animationEnd: {startTimeOffset: ''},
animationFade: {endTimeOffset: '', fadeType: '', startTimeOffset: '', xy: {x: '', y: ''}},
animationStatic: {startTimeOffset: '', xy: {}}
}
],
image: {alpha: '', resolution: {}, uri: ''}
}
],
pubsubDestination: {topic: ''},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
labels: {},
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/jobTemplates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"config":{"adBreaks":[{"startTimeOffset":""}],"editList":[{"endTimeOffset":"","inputs":[],"key":"","startTimeOffset":""}],"elementaryStreams":[{"audioStream":{"bitrateBps":0,"channelCount":0,"channelLayout":[],"codec":"","displayName":"","languageCode":"","mapping":[{"atomKey":"","gainDb":"","inputChannel":0,"inputKey":"","inputTrack":0,"outputChannel":0}],"sampleRateHertz":0},"key":"","textStream":{"codec":"","displayName":"","languageCode":"","mapping":[{"atomKey":"","inputKey":"","inputTrack":0}]},"videoStream":{"h264":{"allowOpenGop":false,"aqStrength":"","bFrameCount":0,"bPyramid":false,"bitrateBps":0,"crfLevel":0,"enableTwoPass":false,"entropyCoder":"","frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","preset":"","profile":"","rateControlMode":"","tune":"","vbvFullnessBits":0,"vbvSizeBits":0,"widthPixels":0},"h265":{"allowOpenGop":false,"aqStrength":"","bFrameCount":0,"bPyramid":false,"bitrateBps":0,"crfLevel":0,"enableTwoPass":false,"frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","preset":"","profile":"","rateControlMode":"","tune":"","vbvFullnessBits":0,"vbvSizeBits":0,"widthPixels":0},"vp9":{"bitrateBps":0,"crfLevel":0,"frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","profile":"","rateControlMode":"","widthPixels":0}}}],"inputs":[{"key":"","preprocessingConfig":{"audio":{"highBoost":false,"lowBoost":false,"lufs":""},"color":{"brightness":"","contrast":"","saturation":""},"crop":{"bottomPixels":0,"leftPixels":0,"rightPixels":0,"topPixels":0},"deblock":{"enabled":false,"strength":""},"deinterlace":{"bwdif":{"deinterlaceAllFrames":false,"mode":"","parity":""},"yadif":{"deinterlaceAllFrames":false,"disableSpatialInterlacing":false,"mode":"","parity":""}},"denoise":{"strength":"","tune":""},"pad":{"bottomPixels":0,"leftPixels":0,"rightPixels":0,"topPixels":0}},"uri":""}],"manifests":[{"fileName":"","muxStreams":[],"type":""}],"muxStreams":[{"container":"","elementaryStreams":[],"fileName":"","key":"","segmentSettings":{"individualSegments":false,"segmentDuration":""}}],"output":{"uri":""},"overlays":[{"animations":[{"animationEnd":{"startTimeOffset":""},"animationFade":{"endTimeOffset":"","fadeType":"","startTimeOffset":"","xy":{"x":"","y":""}},"animationStatic":{"startTimeOffset":"","xy":{}}}],"image":{"alpha":"","resolution":{},"uri":""}}],"pubsubDestination":{"topic":""},"spriteSheets":[{"columnCount":0,"endTimeOffset":"","filePrefix":"","format":"","interval":"","quality":0,"rowCount":0,"spriteHeightPixels":0,"spriteWidthPixels":0,"startTimeOffset":"","totalCount":0}]},"labels":{},"name":""}'
};
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 = @{ @"config": @{ @"adBreaks": @[ @{ @"startTimeOffset": @"" } ], @"editList": @[ @{ @"endTimeOffset": @"", @"inputs": @[ ], @"key": @"", @"startTimeOffset": @"" } ], @"elementaryStreams": @[ @{ @"audioStream": @{ @"bitrateBps": @0, @"channelCount": @0, @"channelLayout": @[ ], @"codec": @"", @"displayName": @"", @"languageCode": @"", @"mapping": @[ @{ @"atomKey": @"", @"gainDb": @"", @"inputChannel": @0, @"inputKey": @"", @"inputTrack": @0, @"outputChannel": @0 } ], @"sampleRateHertz": @0 }, @"key": @"", @"textStream": @{ @"codec": @"", @"displayName": @"", @"languageCode": @"", @"mapping": @[ @{ @"atomKey": @"", @"inputKey": @"", @"inputTrack": @0 } ] }, @"videoStream": @{ @"h264": @{ @"allowOpenGop": @NO, @"aqStrength": @"", @"bFrameCount": @0, @"bPyramid": @NO, @"bitrateBps": @0, @"crfLevel": @0, @"enableTwoPass": @NO, @"entropyCoder": @"", @"frameRate": @"", @"gopDuration": @"", @"gopFrameCount": @0, @"heightPixels": @0, @"pixelFormat": @"", @"preset": @"", @"profile": @"", @"rateControlMode": @"", @"tune": @"", @"vbvFullnessBits": @0, @"vbvSizeBits": @0, @"widthPixels": @0 }, @"h265": @{ @"allowOpenGop": @NO, @"aqStrength": @"", @"bFrameCount": @0, @"bPyramid": @NO, @"bitrateBps": @0, @"crfLevel": @0, @"enableTwoPass": @NO, @"frameRate": @"", @"gopDuration": @"", @"gopFrameCount": @0, @"heightPixels": @0, @"pixelFormat": @"", @"preset": @"", @"profile": @"", @"rateControlMode": @"", @"tune": @"", @"vbvFullnessBits": @0, @"vbvSizeBits": @0, @"widthPixels": @0 }, @"vp9": @{ @"bitrateBps": @0, @"crfLevel": @0, @"frameRate": @"", @"gopDuration": @"", @"gopFrameCount": @0, @"heightPixels": @0, @"pixelFormat": @"", @"profile": @"", @"rateControlMode": @"", @"widthPixels": @0 } } } ], @"inputs": @[ @{ @"key": @"", @"preprocessingConfig": @{ @"audio": @{ @"highBoost": @NO, @"lowBoost": @NO, @"lufs": @"" }, @"color": @{ @"brightness": @"", @"contrast": @"", @"saturation": @"" }, @"crop": @{ @"bottomPixels": @0, @"leftPixels": @0, @"rightPixels": @0, @"topPixels": @0 }, @"deblock": @{ @"enabled": @NO, @"strength": @"" }, @"deinterlace": @{ @"bwdif": @{ @"deinterlaceAllFrames": @NO, @"mode": @"", @"parity": @"" }, @"yadif": @{ @"deinterlaceAllFrames": @NO, @"disableSpatialInterlacing": @NO, @"mode": @"", @"parity": @"" } }, @"denoise": @{ @"strength": @"", @"tune": @"" }, @"pad": @{ @"bottomPixels": @0, @"leftPixels": @0, @"rightPixels": @0, @"topPixels": @0 } }, @"uri": @"" } ], @"manifests": @[ @{ @"fileName": @"", @"muxStreams": @[ ], @"type": @"" } ], @"muxStreams": @[ @{ @"container": @"", @"elementaryStreams": @[ ], @"fileName": @"", @"key": @"", @"segmentSettings": @{ @"individualSegments": @NO, @"segmentDuration": @"" } } ], @"output": @{ @"uri": @"" }, @"overlays": @[ @{ @"animations": @[ @{ @"animationEnd": @{ @"startTimeOffset": @"" }, @"animationFade": @{ @"endTimeOffset": @"", @"fadeType": @"", @"startTimeOffset": @"", @"xy": @{ @"x": @"", @"y": @"" } }, @"animationStatic": @{ @"startTimeOffset": @"", @"xy": @{ } } } ], @"image": @{ @"alpha": @"", @"resolution": @{ }, @"uri": @"" } } ], @"pubsubDestination": @{ @"topic": @"" }, @"spriteSheets": @[ @{ @"columnCount": @0, @"endTimeOffset": @"", @"filePrefix": @"", @"format": @"", @"interval": @"", @"quality": @0, @"rowCount": @0, @"spriteHeightPixels": @0, @"spriteWidthPixels": @0, @"startTimeOffset": @"", @"totalCount": @0 } ] },
@"labels": @{ },
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/jobTemplates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/jobTemplates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/jobTemplates",
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([
'config' => [
'adBreaks' => [
[
'startTimeOffset' => ''
]
],
'editList' => [
[
'endTimeOffset' => '',
'inputs' => [
],
'key' => '',
'startTimeOffset' => ''
]
],
'elementaryStreams' => [
[
'audioStream' => [
'bitrateBps' => 0,
'channelCount' => 0,
'channelLayout' => [
],
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'gainDb' => '',
'inputChannel' => 0,
'inputKey' => '',
'inputTrack' => 0,
'outputChannel' => 0
]
],
'sampleRateHertz' => 0
],
'key' => '',
'textStream' => [
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'inputKey' => '',
'inputTrack' => 0
]
]
],
'videoStream' => [
'h264' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'entropyCoder' => '',
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'h265' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'vp9' => [
'bitrateBps' => 0,
'crfLevel' => 0,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'profile' => '',
'rateControlMode' => '',
'widthPixels' => 0
]
]
]
],
'inputs' => [
[
'key' => '',
'preprocessingConfig' => [
'audio' => [
'highBoost' => null,
'lowBoost' => null,
'lufs' => ''
],
'color' => [
'brightness' => '',
'contrast' => '',
'saturation' => ''
],
'crop' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
],
'deblock' => [
'enabled' => null,
'strength' => ''
],
'deinterlace' => [
'bwdif' => [
'deinterlaceAllFrames' => null,
'mode' => '',
'parity' => ''
],
'yadif' => [
'deinterlaceAllFrames' => null,
'disableSpatialInterlacing' => null,
'mode' => '',
'parity' => ''
]
],
'denoise' => [
'strength' => '',
'tune' => ''
],
'pad' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
]
],
'uri' => ''
]
],
'manifests' => [
[
'fileName' => '',
'muxStreams' => [
],
'type' => ''
]
],
'muxStreams' => [
[
'container' => '',
'elementaryStreams' => [
],
'fileName' => '',
'key' => '',
'segmentSettings' => [
'individualSegments' => null,
'segmentDuration' => ''
]
]
],
'output' => [
'uri' => ''
],
'overlays' => [
[
'animations' => [
[
'animationEnd' => [
'startTimeOffset' => ''
],
'animationFade' => [
'endTimeOffset' => '',
'fadeType' => '',
'startTimeOffset' => '',
'xy' => [
'x' => '',
'y' => ''
]
],
'animationStatic' => [
'startTimeOffset' => '',
'xy' => [
]
]
]
],
'image' => [
'alpha' => '',
'resolution' => [
],
'uri' => ''
]
]
],
'pubsubDestination' => [
'topic' => ''
],
'spriteSheets' => [
[
'columnCount' => 0,
'endTimeOffset' => '',
'filePrefix' => '',
'format' => '',
'interval' => '',
'quality' => 0,
'rowCount' => 0,
'spriteHeightPixels' => 0,
'spriteWidthPixels' => 0,
'startTimeOffset' => '',
'totalCount' => 0
]
]
],
'labels' => [
],
'name' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/jobTemplates', [
'body' => '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"labels": {},
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/jobTemplates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'config' => [
'adBreaks' => [
[
'startTimeOffset' => ''
]
],
'editList' => [
[
'endTimeOffset' => '',
'inputs' => [
],
'key' => '',
'startTimeOffset' => ''
]
],
'elementaryStreams' => [
[
'audioStream' => [
'bitrateBps' => 0,
'channelCount' => 0,
'channelLayout' => [
],
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'gainDb' => '',
'inputChannel' => 0,
'inputKey' => '',
'inputTrack' => 0,
'outputChannel' => 0
]
],
'sampleRateHertz' => 0
],
'key' => '',
'textStream' => [
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'inputKey' => '',
'inputTrack' => 0
]
]
],
'videoStream' => [
'h264' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'entropyCoder' => '',
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'h265' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'vp9' => [
'bitrateBps' => 0,
'crfLevel' => 0,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'profile' => '',
'rateControlMode' => '',
'widthPixels' => 0
]
]
]
],
'inputs' => [
[
'key' => '',
'preprocessingConfig' => [
'audio' => [
'highBoost' => null,
'lowBoost' => null,
'lufs' => ''
],
'color' => [
'brightness' => '',
'contrast' => '',
'saturation' => ''
],
'crop' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
],
'deblock' => [
'enabled' => null,
'strength' => ''
],
'deinterlace' => [
'bwdif' => [
'deinterlaceAllFrames' => null,
'mode' => '',
'parity' => ''
],
'yadif' => [
'deinterlaceAllFrames' => null,
'disableSpatialInterlacing' => null,
'mode' => '',
'parity' => ''
]
],
'denoise' => [
'strength' => '',
'tune' => ''
],
'pad' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
]
],
'uri' => ''
]
],
'manifests' => [
[
'fileName' => '',
'muxStreams' => [
],
'type' => ''
]
],
'muxStreams' => [
[
'container' => '',
'elementaryStreams' => [
],
'fileName' => '',
'key' => '',
'segmentSettings' => [
'individualSegments' => null,
'segmentDuration' => ''
]
]
],
'output' => [
'uri' => ''
],
'overlays' => [
[
'animations' => [
[
'animationEnd' => [
'startTimeOffset' => ''
],
'animationFade' => [
'endTimeOffset' => '',
'fadeType' => '',
'startTimeOffset' => '',
'xy' => [
'x' => '',
'y' => ''
]
],
'animationStatic' => [
'startTimeOffset' => '',
'xy' => [
]
]
]
],
'image' => [
'alpha' => '',
'resolution' => [
],
'uri' => ''
]
]
],
'pubsubDestination' => [
'topic' => ''
],
'spriteSheets' => [
[
'columnCount' => 0,
'endTimeOffset' => '',
'filePrefix' => '',
'format' => '',
'interval' => '',
'quality' => 0,
'rowCount' => 0,
'spriteHeightPixels' => 0,
'spriteWidthPixels' => 0,
'startTimeOffset' => '',
'totalCount' => 0
]
]
],
'labels' => [
],
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'config' => [
'adBreaks' => [
[
'startTimeOffset' => ''
]
],
'editList' => [
[
'endTimeOffset' => '',
'inputs' => [
],
'key' => '',
'startTimeOffset' => ''
]
],
'elementaryStreams' => [
[
'audioStream' => [
'bitrateBps' => 0,
'channelCount' => 0,
'channelLayout' => [
],
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'gainDb' => '',
'inputChannel' => 0,
'inputKey' => '',
'inputTrack' => 0,
'outputChannel' => 0
]
],
'sampleRateHertz' => 0
],
'key' => '',
'textStream' => [
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'inputKey' => '',
'inputTrack' => 0
]
]
],
'videoStream' => [
'h264' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'entropyCoder' => '',
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'h265' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'vp9' => [
'bitrateBps' => 0,
'crfLevel' => 0,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'profile' => '',
'rateControlMode' => '',
'widthPixels' => 0
]
]
]
],
'inputs' => [
[
'key' => '',
'preprocessingConfig' => [
'audio' => [
'highBoost' => null,
'lowBoost' => null,
'lufs' => ''
],
'color' => [
'brightness' => '',
'contrast' => '',
'saturation' => ''
],
'crop' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
],
'deblock' => [
'enabled' => null,
'strength' => ''
],
'deinterlace' => [
'bwdif' => [
'deinterlaceAllFrames' => null,
'mode' => '',
'parity' => ''
],
'yadif' => [
'deinterlaceAllFrames' => null,
'disableSpatialInterlacing' => null,
'mode' => '',
'parity' => ''
]
],
'denoise' => [
'strength' => '',
'tune' => ''
],
'pad' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
]
],
'uri' => ''
]
],
'manifests' => [
[
'fileName' => '',
'muxStreams' => [
],
'type' => ''
]
],
'muxStreams' => [
[
'container' => '',
'elementaryStreams' => [
],
'fileName' => '',
'key' => '',
'segmentSettings' => [
'individualSegments' => null,
'segmentDuration' => ''
]
]
],
'output' => [
'uri' => ''
],
'overlays' => [
[
'animations' => [
[
'animationEnd' => [
'startTimeOffset' => ''
],
'animationFade' => [
'endTimeOffset' => '',
'fadeType' => '',
'startTimeOffset' => '',
'xy' => [
'x' => '',
'y' => ''
]
],
'animationStatic' => [
'startTimeOffset' => '',
'xy' => [
]
]
]
],
'image' => [
'alpha' => '',
'resolution' => [
],
'uri' => ''
]
]
],
'pubsubDestination' => [
'topic' => ''
],
'spriteSheets' => [
[
'columnCount' => 0,
'endTimeOffset' => '',
'filePrefix' => '',
'format' => '',
'interval' => '',
'quality' => 0,
'rowCount' => 0,
'spriteHeightPixels' => 0,
'spriteWidthPixels' => 0,
'startTimeOffset' => '',
'totalCount' => 0
]
]
],
'labels' => [
],
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/jobTemplates');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/jobTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"labels": {},
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/jobTemplates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"labels": {},
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/jobTemplates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/jobTemplates"
payload = {
"config": {
"adBreaks": [{ "startTimeOffset": "" }],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": False,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": False,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": False,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": False,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": False,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": False,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": False,
"lowBoost": False,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": False,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": False,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": False,
"disableSpatialInterlacing": False,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": False,
"segmentDuration": ""
}
}
],
"output": { "uri": "" },
"overlays": [
{
"animations": [
{
"animationEnd": { "startTimeOffset": "" },
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": { "topic": "" },
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"labels": {},
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/jobTemplates"
payload <- "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/jobTemplates")
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 \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/jobTemplates') do |req|
req.body = "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"labels\": {},\n \"name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/jobTemplates";
let payload = json!({
"config": json!({
"adBreaks": (json!({"startTimeOffset": ""})),
"editList": (
json!({
"endTimeOffset": "",
"inputs": (),
"key": "",
"startTimeOffset": ""
})
),
"elementaryStreams": (
json!({
"audioStream": json!({
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": (),
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": (
json!({
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
})
),
"sampleRateHertz": 0
}),
"key": "",
"textStream": json!({
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": (
json!({
"atomKey": "",
"inputKey": "",
"inputTrack": 0
})
)
}),
"videoStream": json!({
"h264": json!({
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
}),
"h265": json!({
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
}),
"vp9": json!({
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
})
})
})
),
"inputs": (
json!({
"key": "",
"preprocessingConfig": json!({
"audio": json!({
"highBoost": false,
"lowBoost": false,
"lufs": ""
}),
"color": json!({
"brightness": "",
"contrast": "",
"saturation": ""
}),
"crop": json!({
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}),
"deblock": json!({
"enabled": false,
"strength": ""
}),
"deinterlace": json!({
"bwdif": json!({
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
}),
"yadif": json!({
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
})
}),
"denoise": json!({
"strength": "",
"tune": ""
}),
"pad": json!({
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
})
}),
"uri": ""
})
),
"manifests": (
json!({
"fileName": "",
"muxStreams": (),
"type": ""
})
),
"muxStreams": (
json!({
"container": "",
"elementaryStreams": (),
"fileName": "",
"key": "",
"segmentSettings": json!({
"individualSegments": false,
"segmentDuration": ""
})
})
),
"output": json!({"uri": ""}),
"overlays": (
json!({
"animations": (
json!({
"animationEnd": json!({"startTimeOffset": ""}),
"animationFade": json!({
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": json!({
"x": "",
"y": ""
})
}),
"animationStatic": json!({
"startTimeOffset": "",
"xy": json!({})
})
})
),
"image": json!({
"alpha": "",
"resolution": json!({}),
"uri": ""
})
})
),
"pubsubDestination": json!({"topic": ""}),
"spriteSheets": (
json!({
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
})
)
}),
"labels": json!({}),
"name": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:parent/jobTemplates \
--header 'content-type: application/json' \
--data '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"labels": {},
"name": ""
}'
echo '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"labels": {},
"name": ""
}' | \
http POST {{baseUrl}}/v1/:parent/jobTemplates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "config": {\n "adBreaks": [\n {\n "startTimeOffset": ""\n }\n ],\n "editList": [\n {\n "endTimeOffset": "",\n "inputs": [],\n "key": "",\n "startTimeOffset": ""\n }\n ],\n "elementaryStreams": [\n {\n "audioStream": {\n "bitrateBps": 0,\n "channelCount": 0,\n "channelLayout": [],\n "codec": "",\n "displayName": "",\n "languageCode": "",\n "mapping": [\n {\n "atomKey": "",\n "gainDb": "",\n "inputChannel": 0,\n "inputKey": "",\n "inputTrack": 0,\n "outputChannel": 0\n }\n ],\n "sampleRateHertz": 0\n },\n "key": "",\n "textStream": {\n "codec": "",\n "displayName": "",\n "languageCode": "",\n "mapping": [\n {\n "atomKey": "",\n "inputKey": "",\n "inputTrack": 0\n }\n ]\n },\n "videoStream": {\n "h264": {\n "allowOpenGop": false,\n "aqStrength": "",\n "bFrameCount": 0,\n "bPyramid": false,\n "bitrateBps": 0,\n "crfLevel": 0,\n "enableTwoPass": false,\n "entropyCoder": "",\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "preset": "",\n "profile": "",\n "rateControlMode": "",\n "tune": "",\n "vbvFullnessBits": 0,\n "vbvSizeBits": 0,\n "widthPixels": 0\n },\n "h265": {\n "allowOpenGop": false,\n "aqStrength": "",\n "bFrameCount": 0,\n "bPyramid": false,\n "bitrateBps": 0,\n "crfLevel": 0,\n "enableTwoPass": false,\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "preset": "",\n "profile": "",\n "rateControlMode": "",\n "tune": "",\n "vbvFullnessBits": 0,\n "vbvSizeBits": 0,\n "widthPixels": 0\n },\n "vp9": {\n "bitrateBps": 0,\n "crfLevel": 0,\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "profile": "",\n "rateControlMode": "",\n "widthPixels": 0\n }\n }\n }\n ],\n "inputs": [\n {\n "key": "",\n "preprocessingConfig": {\n "audio": {\n "highBoost": false,\n "lowBoost": false,\n "lufs": ""\n },\n "color": {\n "brightness": "",\n "contrast": "",\n "saturation": ""\n },\n "crop": {\n "bottomPixels": 0,\n "leftPixels": 0,\n "rightPixels": 0,\n "topPixels": 0\n },\n "deblock": {\n "enabled": false,\n "strength": ""\n },\n "deinterlace": {\n "bwdif": {\n "deinterlaceAllFrames": false,\n "mode": "",\n "parity": ""\n },\n "yadif": {\n "deinterlaceAllFrames": false,\n "disableSpatialInterlacing": false,\n "mode": "",\n "parity": ""\n }\n },\n "denoise": {\n "strength": "",\n "tune": ""\n },\n "pad": {\n "bottomPixels": 0,\n "leftPixels": 0,\n "rightPixels": 0,\n "topPixels": 0\n }\n },\n "uri": ""\n }\n ],\n "manifests": [\n {\n "fileName": "",\n "muxStreams": [],\n "type": ""\n }\n ],\n "muxStreams": [\n {\n "container": "",\n "elementaryStreams": [],\n "fileName": "",\n "key": "",\n "segmentSettings": {\n "individualSegments": false,\n "segmentDuration": ""\n }\n }\n ],\n "output": {\n "uri": ""\n },\n "overlays": [\n {\n "animations": [\n {\n "animationEnd": {\n "startTimeOffset": ""\n },\n "animationFade": {\n "endTimeOffset": "",\n "fadeType": "",\n "startTimeOffset": "",\n "xy": {\n "x": "",\n "y": ""\n }\n },\n "animationStatic": {\n "startTimeOffset": "",\n "xy": {}\n }\n }\n ],\n "image": {\n "alpha": "",\n "resolution": {},\n "uri": ""\n }\n }\n ],\n "pubsubDestination": {\n "topic": ""\n },\n "spriteSheets": [\n {\n "columnCount": 0,\n "endTimeOffset": "",\n "filePrefix": "",\n "format": "",\n "interval": "",\n "quality": 0,\n "rowCount": 0,\n "spriteHeightPixels": 0,\n "spriteWidthPixels": 0,\n "startTimeOffset": "",\n "totalCount": 0\n }\n ]\n },\n "labels": {},\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/jobTemplates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"config": [
"adBreaks": [["startTimeOffset": ""]],
"editList": [
[
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
]
],
"elementaryStreams": [
[
"audioStream": [
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
[
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
]
],
"sampleRateHertz": 0
],
"key": "",
"textStream": [
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
[
"atomKey": "",
"inputKey": "",
"inputTrack": 0
]
]
],
"videoStream": [
"h264": [
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
],
"h265": [
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
],
"vp9": [
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
]
]
]
],
"inputs": [
[
"key": "",
"preprocessingConfig": [
"audio": [
"highBoost": false,
"lowBoost": false,
"lufs": ""
],
"color": [
"brightness": "",
"contrast": "",
"saturation": ""
],
"crop": [
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
],
"deblock": [
"enabled": false,
"strength": ""
],
"deinterlace": [
"bwdif": [
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
],
"yadif": [
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
]
],
"denoise": [
"strength": "",
"tune": ""
],
"pad": [
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
]
],
"uri": ""
]
],
"manifests": [
[
"fileName": "",
"muxStreams": [],
"type": ""
]
],
"muxStreams": [
[
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": [
"individualSegments": false,
"segmentDuration": ""
]
]
],
"output": ["uri": ""],
"overlays": [
[
"animations": [
[
"animationEnd": ["startTimeOffset": ""],
"animationFade": [
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": [
"x": "",
"y": ""
]
],
"animationStatic": [
"startTimeOffset": "",
"xy": []
]
]
],
"image": [
"alpha": "",
"resolution": [],
"uri": ""
]
]
],
"pubsubDestination": ["topic": ""],
"spriteSheets": [
[
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
]
]
],
"labels": [],
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/jobTemplates")! 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
transcoder.projects.locations.jobTemplates.delete
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/:name
http DELETE {{baseUrl}}/v1/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
transcoder.projects.locations.jobTemplates.get
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:name
http GET {{baseUrl}}/v1/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
transcoder.projects.locations.jobTemplates.list
{{baseUrl}}/v1/:parent/jobTemplates
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/jobTemplates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/jobTemplates")
require "http/client"
url = "{{baseUrl}}/v1/:parent/jobTemplates"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/jobTemplates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/jobTemplates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/jobTemplates"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/jobTemplates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/jobTemplates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/jobTemplates"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobTemplates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/jobTemplates")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/jobTemplates');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobTemplates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/jobTemplates';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/jobTemplates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobTemplates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/jobTemplates',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobTemplates'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/jobTemplates');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobTemplates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/jobTemplates';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/jobTemplates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/jobTemplates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/jobTemplates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/jobTemplates');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/jobTemplates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/jobTemplates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/jobTemplates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/jobTemplates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/jobTemplates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/jobTemplates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/jobTemplates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/jobTemplates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/jobTemplates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/jobTemplates";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/jobTemplates
http GET {{baseUrl}}/v1/:parent/jobTemplates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/jobTemplates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/jobTemplates")! 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
transcoder.projects.locations.jobs.create
{{baseUrl}}/v1/:parent/jobs
QUERY PARAMS
parent
BODY json
{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"createTime": "",
"endTime": "",
"error": {
"code": 0,
"details": [
{}
],
"message": ""
},
"inputUri": "",
"labels": {},
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/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 \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/jobs" {:content-type :json
:form-params {:config {:adBreaks [{:startTimeOffset ""}]
:editList [{:endTimeOffset ""
:inputs []
:key ""
:startTimeOffset ""}]
:elementaryStreams [{:audioStream {:bitrateBps 0
:channelCount 0
:channelLayout []
:codec ""
:displayName ""
:languageCode ""
:mapping [{:atomKey ""
:gainDb ""
:inputChannel 0
:inputKey ""
:inputTrack 0
:outputChannel 0}]
:sampleRateHertz 0}
:key ""
:textStream {:codec ""
:displayName ""
:languageCode ""
:mapping [{:atomKey ""
:inputKey ""
:inputTrack 0}]}
:videoStream {:h264 {:allowOpenGop false
:aqStrength ""
:bFrameCount 0
:bPyramid false
:bitrateBps 0
:crfLevel 0
:enableTwoPass false
:entropyCoder ""
:frameRate ""
:gopDuration ""
:gopFrameCount 0
:heightPixels 0
:pixelFormat ""
:preset ""
:profile ""
:rateControlMode ""
:tune ""
:vbvFullnessBits 0
:vbvSizeBits 0
:widthPixels 0}
:h265 {:allowOpenGop false
:aqStrength ""
:bFrameCount 0
:bPyramid false
:bitrateBps 0
:crfLevel 0
:enableTwoPass false
:frameRate ""
:gopDuration ""
:gopFrameCount 0
:heightPixels 0
:pixelFormat ""
:preset ""
:profile ""
:rateControlMode ""
:tune ""
:vbvFullnessBits 0
:vbvSizeBits 0
:widthPixels 0}
:vp9 {:bitrateBps 0
:crfLevel 0
:frameRate ""
:gopDuration ""
:gopFrameCount 0
:heightPixels 0
:pixelFormat ""
:profile ""
:rateControlMode ""
:widthPixels 0}}}]
:inputs [{:key ""
:preprocessingConfig {:audio {:highBoost false
:lowBoost false
:lufs ""}
:color {:brightness ""
:contrast ""
:saturation ""}
:crop {:bottomPixels 0
:leftPixels 0
:rightPixels 0
:topPixels 0}
:deblock {:enabled false
:strength ""}
:deinterlace {:bwdif {:deinterlaceAllFrames false
:mode ""
:parity ""}
:yadif {:deinterlaceAllFrames false
:disableSpatialInterlacing false
:mode ""
:parity ""}}
:denoise {:strength ""
:tune ""}
:pad {:bottomPixels 0
:leftPixels 0
:rightPixels 0
:topPixels 0}}
:uri ""}]
:manifests [{:fileName ""
:muxStreams []
:type ""}]
:muxStreams [{:container ""
:elementaryStreams []
:fileName ""
:key ""
:segmentSettings {:individualSegments false
:segmentDuration ""}}]
:output {:uri ""}
:overlays [{:animations [{:animationEnd {:startTimeOffset ""}
:animationFade {:endTimeOffset ""
:fadeType ""
:startTimeOffset ""
:xy {:x ""
:y ""}}
:animationStatic {:startTimeOffset ""
:xy {}}}]
:image {:alpha ""
:resolution {}
:uri ""}}]
:pubsubDestination {:topic ""}
:spriteSheets [{:columnCount 0
:endTimeOffset ""
:filePrefix ""
:format ""
:interval ""
:quality 0
:rowCount 0
:spriteHeightPixels 0
:spriteWidthPixels 0
:startTimeOffset ""
:totalCount 0}]}
:createTime ""
:endTime ""
:error {:code 0
:details [{}]
:message ""}
:inputUri ""
:labels {}
:mode ""
:name ""
:outputUri ""
:startTime ""
:state ""
:templateId ""
:ttlAfterCompletionDays 0}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/jobs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/jobs"),
Content = new StringContent("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/jobs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/jobs"
payload := strings.NewReader("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/jobs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5576
{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"createTime": "",
"endTime": "",
"error": {
"code": 0,
"details": [
{}
],
"message": ""
},
"inputUri": "",
"labels": {},
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/jobs")
.setHeader("content-type", "application/json")
.setBody("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/jobs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/jobs")
.header("content-type", "application/json")
.body("{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}")
.asString();
const data = JSON.stringify({
config: {
adBreaks: [
{
startTimeOffset: ''
}
],
editList: [
{
endTimeOffset: '',
inputs: [],
key: '',
startTimeOffset: ''
}
],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
inputKey: '',
inputTrack: 0
}
]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {
highBoost: false,
lowBoost: false,
lufs: ''
},
color: {
brightness: '',
contrast: '',
saturation: ''
},
crop: {
bottomPixels: 0,
leftPixels: 0,
rightPixels: 0,
topPixels: 0
},
deblock: {
enabled: false,
strength: ''
},
deinterlace: {
bwdif: {
deinterlaceAllFrames: false,
mode: '',
parity: ''
},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {
strength: '',
tune: ''
},
pad: {
bottomPixels: 0,
leftPixels: 0,
rightPixels: 0,
topPixels: 0
}
},
uri: ''
}
],
manifests: [
{
fileName: '',
muxStreams: [],
type: ''
}
],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {
individualSegments: false,
segmentDuration: ''
}
}
],
output: {
uri: ''
},
overlays: [
{
animations: [
{
animationEnd: {
startTimeOffset: ''
},
animationFade: {
endTimeOffset: '',
fadeType: '',
startTimeOffset: '',
xy: {
x: '',
y: ''
}
},
animationStatic: {
startTimeOffset: '',
xy: {}
}
}
],
image: {
alpha: '',
resolution: {},
uri: ''
}
}
],
pubsubDestination: {
topic: ''
},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
createTime: '',
endTime: '',
error: {
code: 0,
details: [
{}
],
message: ''
},
inputUri: '',
labels: {},
mode: '',
name: '',
outputUri: '',
startTime: '',
state: '',
templateId: '',
ttlAfterCompletionDays: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/jobs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/jobs',
headers: {'content-type': 'application/json'},
data: {
config: {
adBreaks: [{startTimeOffset: ''}],
editList: [{endTimeOffset: '', inputs: [], key: '', startTimeOffset: ''}],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [{atomKey: '', inputKey: '', inputTrack: 0}]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {highBoost: false, lowBoost: false, lufs: ''},
color: {brightness: '', contrast: '', saturation: ''},
crop: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0},
deblock: {enabled: false, strength: ''},
deinterlace: {
bwdif: {deinterlaceAllFrames: false, mode: '', parity: ''},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {strength: '', tune: ''},
pad: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0}
},
uri: ''
}
],
manifests: [{fileName: '', muxStreams: [], type: ''}],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {individualSegments: false, segmentDuration: ''}
}
],
output: {uri: ''},
overlays: [
{
animations: [
{
animationEnd: {startTimeOffset: ''},
animationFade: {endTimeOffset: '', fadeType: '', startTimeOffset: '', xy: {x: '', y: ''}},
animationStatic: {startTimeOffset: '', xy: {}}
}
],
image: {alpha: '', resolution: {}, uri: ''}
}
],
pubsubDestination: {topic: ''},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
createTime: '',
endTime: '',
error: {code: 0, details: [{}], message: ''},
inputUri: '',
labels: {},
mode: '',
name: '',
outputUri: '',
startTime: '',
state: '',
templateId: '',
ttlAfterCompletionDays: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"config":{"adBreaks":[{"startTimeOffset":""}],"editList":[{"endTimeOffset":"","inputs":[],"key":"","startTimeOffset":""}],"elementaryStreams":[{"audioStream":{"bitrateBps":0,"channelCount":0,"channelLayout":[],"codec":"","displayName":"","languageCode":"","mapping":[{"atomKey":"","gainDb":"","inputChannel":0,"inputKey":"","inputTrack":0,"outputChannel":0}],"sampleRateHertz":0},"key":"","textStream":{"codec":"","displayName":"","languageCode":"","mapping":[{"atomKey":"","inputKey":"","inputTrack":0}]},"videoStream":{"h264":{"allowOpenGop":false,"aqStrength":"","bFrameCount":0,"bPyramid":false,"bitrateBps":0,"crfLevel":0,"enableTwoPass":false,"entropyCoder":"","frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","preset":"","profile":"","rateControlMode":"","tune":"","vbvFullnessBits":0,"vbvSizeBits":0,"widthPixels":0},"h265":{"allowOpenGop":false,"aqStrength":"","bFrameCount":0,"bPyramid":false,"bitrateBps":0,"crfLevel":0,"enableTwoPass":false,"frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","preset":"","profile":"","rateControlMode":"","tune":"","vbvFullnessBits":0,"vbvSizeBits":0,"widthPixels":0},"vp9":{"bitrateBps":0,"crfLevel":0,"frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","profile":"","rateControlMode":"","widthPixels":0}}}],"inputs":[{"key":"","preprocessingConfig":{"audio":{"highBoost":false,"lowBoost":false,"lufs":""},"color":{"brightness":"","contrast":"","saturation":""},"crop":{"bottomPixels":0,"leftPixels":0,"rightPixels":0,"topPixels":0},"deblock":{"enabled":false,"strength":""},"deinterlace":{"bwdif":{"deinterlaceAllFrames":false,"mode":"","parity":""},"yadif":{"deinterlaceAllFrames":false,"disableSpatialInterlacing":false,"mode":"","parity":""}},"denoise":{"strength":"","tune":""},"pad":{"bottomPixels":0,"leftPixels":0,"rightPixels":0,"topPixels":0}},"uri":""}],"manifests":[{"fileName":"","muxStreams":[],"type":""}],"muxStreams":[{"container":"","elementaryStreams":[],"fileName":"","key":"","segmentSettings":{"individualSegments":false,"segmentDuration":""}}],"output":{"uri":""},"overlays":[{"animations":[{"animationEnd":{"startTimeOffset":""},"animationFade":{"endTimeOffset":"","fadeType":"","startTimeOffset":"","xy":{"x":"","y":""}},"animationStatic":{"startTimeOffset":"","xy":{}}}],"image":{"alpha":"","resolution":{},"uri":""}}],"pubsubDestination":{"topic":""},"spriteSheets":[{"columnCount":0,"endTimeOffset":"","filePrefix":"","format":"","interval":"","quality":0,"rowCount":0,"spriteHeightPixels":0,"spriteWidthPixels":0,"startTimeOffset":"","totalCount":0}]},"createTime":"","endTime":"","error":{"code":0,"details":[{}],"message":""},"inputUri":"","labels":{},"mode":"","name":"","outputUri":"","startTime":"","state":"","templateId":"","ttlAfterCompletionDays":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/jobs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "config": {\n "adBreaks": [\n {\n "startTimeOffset": ""\n }\n ],\n "editList": [\n {\n "endTimeOffset": "",\n "inputs": [],\n "key": "",\n "startTimeOffset": ""\n }\n ],\n "elementaryStreams": [\n {\n "audioStream": {\n "bitrateBps": 0,\n "channelCount": 0,\n "channelLayout": [],\n "codec": "",\n "displayName": "",\n "languageCode": "",\n "mapping": [\n {\n "atomKey": "",\n "gainDb": "",\n "inputChannel": 0,\n "inputKey": "",\n "inputTrack": 0,\n "outputChannel": 0\n }\n ],\n "sampleRateHertz": 0\n },\n "key": "",\n "textStream": {\n "codec": "",\n "displayName": "",\n "languageCode": "",\n "mapping": [\n {\n "atomKey": "",\n "inputKey": "",\n "inputTrack": 0\n }\n ]\n },\n "videoStream": {\n "h264": {\n "allowOpenGop": false,\n "aqStrength": "",\n "bFrameCount": 0,\n "bPyramid": false,\n "bitrateBps": 0,\n "crfLevel": 0,\n "enableTwoPass": false,\n "entropyCoder": "",\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "preset": "",\n "profile": "",\n "rateControlMode": "",\n "tune": "",\n "vbvFullnessBits": 0,\n "vbvSizeBits": 0,\n "widthPixels": 0\n },\n "h265": {\n "allowOpenGop": false,\n "aqStrength": "",\n "bFrameCount": 0,\n "bPyramid": false,\n "bitrateBps": 0,\n "crfLevel": 0,\n "enableTwoPass": false,\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "preset": "",\n "profile": "",\n "rateControlMode": "",\n "tune": "",\n "vbvFullnessBits": 0,\n "vbvSizeBits": 0,\n "widthPixels": 0\n },\n "vp9": {\n "bitrateBps": 0,\n "crfLevel": 0,\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "profile": "",\n "rateControlMode": "",\n "widthPixels": 0\n }\n }\n }\n ],\n "inputs": [\n {\n "key": "",\n "preprocessingConfig": {\n "audio": {\n "highBoost": false,\n "lowBoost": false,\n "lufs": ""\n },\n "color": {\n "brightness": "",\n "contrast": "",\n "saturation": ""\n },\n "crop": {\n "bottomPixels": 0,\n "leftPixels": 0,\n "rightPixels": 0,\n "topPixels": 0\n },\n "deblock": {\n "enabled": false,\n "strength": ""\n },\n "deinterlace": {\n "bwdif": {\n "deinterlaceAllFrames": false,\n "mode": "",\n "parity": ""\n },\n "yadif": {\n "deinterlaceAllFrames": false,\n "disableSpatialInterlacing": false,\n "mode": "",\n "parity": ""\n }\n },\n "denoise": {\n "strength": "",\n "tune": ""\n },\n "pad": {\n "bottomPixels": 0,\n "leftPixels": 0,\n "rightPixels": 0,\n "topPixels": 0\n }\n },\n "uri": ""\n }\n ],\n "manifests": [\n {\n "fileName": "",\n "muxStreams": [],\n "type": ""\n }\n ],\n "muxStreams": [\n {\n "container": "",\n "elementaryStreams": [],\n "fileName": "",\n "key": "",\n "segmentSettings": {\n "individualSegments": false,\n "segmentDuration": ""\n }\n }\n ],\n "output": {\n "uri": ""\n },\n "overlays": [\n {\n "animations": [\n {\n "animationEnd": {\n "startTimeOffset": ""\n },\n "animationFade": {\n "endTimeOffset": "",\n "fadeType": "",\n "startTimeOffset": "",\n "xy": {\n "x": "",\n "y": ""\n }\n },\n "animationStatic": {\n "startTimeOffset": "",\n "xy": {}\n }\n }\n ],\n "image": {\n "alpha": "",\n "resolution": {},\n "uri": ""\n }\n }\n ],\n "pubsubDestination": {\n "topic": ""\n },\n "spriteSheets": [\n {\n "columnCount": 0,\n "endTimeOffset": "",\n "filePrefix": "",\n "format": "",\n "interval": "",\n "quality": 0,\n "rowCount": 0,\n "spriteHeightPixels": 0,\n "spriteWidthPixels": 0,\n "startTimeOffset": "",\n "totalCount": 0\n }\n ]\n },\n "createTime": "",\n "endTime": "",\n "error": {\n "code": 0,\n "details": [\n {}\n ],\n "message": ""\n },\n "inputUri": "",\n "labels": {},\n "mode": "",\n "name": "",\n "outputUri": "",\n "startTime": "",\n "state": "",\n "templateId": "",\n "ttlAfterCompletionDays": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/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/v1/:parent/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({
config: {
adBreaks: [{startTimeOffset: ''}],
editList: [{endTimeOffset: '', inputs: [], key: '', startTimeOffset: ''}],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [{atomKey: '', inputKey: '', inputTrack: 0}]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {highBoost: false, lowBoost: false, lufs: ''},
color: {brightness: '', contrast: '', saturation: ''},
crop: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0},
deblock: {enabled: false, strength: ''},
deinterlace: {
bwdif: {deinterlaceAllFrames: false, mode: '', parity: ''},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {strength: '', tune: ''},
pad: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0}
},
uri: ''
}
],
manifests: [{fileName: '', muxStreams: [], type: ''}],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {individualSegments: false, segmentDuration: ''}
}
],
output: {uri: ''},
overlays: [
{
animations: [
{
animationEnd: {startTimeOffset: ''},
animationFade: {endTimeOffset: '', fadeType: '', startTimeOffset: '', xy: {x: '', y: ''}},
animationStatic: {startTimeOffset: '', xy: {}}
}
],
image: {alpha: '', resolution: {}, uri: ''}
}
],
pubsubDestination: {topic: ''},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
createTime: '',
endTime: '',
error: {code: 0, details: [{}], message: ''},
inputUri: '',
labels: {},
mode: '',
name: '',
outputUri: '',
startTime: '',
state: '',
templateId: '',
ttlAfterCompletionDays: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/jobs',
headers: {'content-type': 'application/json'},
body: {
config: {
adBreaks: [{startTimeOffset: ''}],
editList: [{endTimeOffset: '', inputs: [], key: '', startTimeOffset: ''}],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [{atomKey: '', inputKey: '', inputTrack: 0}]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {highBoost: false, lowBoost: false, lufs: ''},
color: {brightness: '', contrast: '', saturation: ''},
crop: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0},
deblock: {enabled: false, strength: ''},
deinterlace: {
bwdif: {deinterlaceAllFrames: false, mode: '', parity: ''},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {strength: '', tune: ''},
pad: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0}
},
uri: ''
}
],
manifests: [{fileName: '', muxStreams: [], type: ''}],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {individualSegments: false, segmentDuration: ''}
}
],
output: {uri: ''},
overlays: [
{
animations: [
{
animationEnd: {startTimeOffset: ''},
animationFade: {endTimeOffset: '', fadeType: '', startTimeOffset: '', xy: {x: '', y: ''}},
animationStatic: {startTimeOffset: '', xy: {}}
}
],
image: {alpha: '', resolution: {}, uri: ''}
}
],
pubsubDestination: {topic: ''},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
createTime: '',
endTime: '',
error: {code: 0, details: [{}], message: ''},
inputUri: '',
labels: {},
mode: '',
name: '',
outputUri: '',
startTime: '',
state: '',
templateId: '',
ttlAfterCompletionDays: 0
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:parent/jobs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
config: {
adBreaks: [
{
startTimeOffset: ''
}
],
editList: [
{
endTimeOffset: '',
inputs: [],
key: '',
startTimeOffset: ''
}
],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
inputKey: '',
inputTrack: 0
}
]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {
highBoost: false,
lowBoost: false,
lufs: ''
},
color: {
brightness: '',
contrast: '',
saturation: ''
},
crop: {
bottomPixels: 0,
leftPixels: 0,
rightPixels: 0,
topPixels: 0
},
deblock: {
enabled: false,
strength: ''
},
deinterlace: {
bwdif: {
deinterlaceAllFrames: false,
mode: '',
parity: ''
},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {
strength: '',
tune: ''
},
pad: {
bottomPixels: 0,
leftPixels: 0,
rightPixels: 0,
topPixels: 0
}
},
uri: ''
}
],
manifests: [
{
fileName: '',
muxStreams: [],
type: ''
}
],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {
individualSegments: false,
segmentDuration: ''
}
}
],
output: {
uri: ''
},
overlays: [
{
animations: [
{
animationEnd: {
startTimeOffset: ''
},
animationFade: {
endTimeOffset: '',
fadeType: '',
startTimeOffset: '',
xy: {
x: '',
y: ''
}
},
animationStatic: {
startTimeOffset: '',
xy: {}
}
}
],
image: {
alpha: '',
resolution: {},
uri: ''
}
}
],
pubsubDestination: {
topic: ''
},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
createTime: '',
endTime: '',
error: {
code: 0,
details: [
{}
],
message: ''
},
inputUri: '',
labels: {},
mode: '',
name: '',
outputUri: '',
startTime: '',
state: '',
templateId: '',
ttlAfterCompletionDays: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/jobs',
headers: {'content-type': 'application/json'},
data: {
config: {
adBreaks: [{startTimeOffset: ''}],
editList: [{endTimeOffset: '', inputs: [], key: '', startTimeOffset: ''}],
elementaryStreams: [
{
audioStream: {
bitrateBps: 0,
channelCount: 0,
channelLayout: [],
codec: '',
displayName: '',
languageCode: '',
mapping: [
{
atomKey: '',
gainDb: '',
inputChannel: 0,
inputKey: '',
inputTrack: 0,
outputChannel: 0
}
],
sampleRateHertz: 0
},
key: '',
textStream: {
codec: '',
displayName: '',
languageCode: '',
mapping: [{atomKey: '', inputKey: '', inputTrack: 0}]
},
videoStream: {
h264: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
entropyCoder: '',
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
h265: {
allowOpenGop: false,
aqStrength: '',
bFrameCount: 0,
bPyramid: false,
bitrateBps: 0,
crfLevel: 0,
enableTwoPass: false,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
preset: '',
profile: '',
rateControlMode: '',
tune: '',
vbvFullnessBits: 0,
vbvSizeBits: 0,
widthPixels: 0
},
vp9: {
bitrateBps: 0,
crfLevel: 0,
frameRate: '',
gopDuration: '',
gopFrameCount: 0,
heightPixels: 0,
pixelFormat: '',
profile: '',
rateControlMode: '',
widthPixels: 0
}
}
}
],
inputs: [
{
key: '',
preprocessingConfig: {
audio: {highBoost: false, lowBoost: false, lufs: ''},
color: {brightness: '', contrast: '', saturation: ''},
crop: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0},
deblock: {enabled: false, strength: ''},
deinterlace: {
bwdif: {deinterlaceAllFrames: false, mode: '', parity: ''},
yadif: {
deinterlaceAllFrames: false,
disableSpatialInterlacing: false,
mode: '',
parity: ''
}
},
denoise: {strength: '', tune: ''},
pad: {bottomPixels: 0, leftPixels: 0, rightPixels: 0, topPixels: 0}
},
uri: ''
}
],
manifests: [{fileName: '', muxStreams: [], type: ''}],
muxStreams: [
{
container: '',
elementaryStreams: [],
fileName: '',
key: '',
segmentSettings: {individualSegments: false, segmentDuration: ''}
}
],
output: {uri: ''},
overlays: [
{
animations: [
{
animationEnd: {startTimeOffset: ''},
animationFade: {endTimeOffset: '', fadeType: '', startTimeOffset: '', xy: {x: '', y: ''}},
animationStatic: {startTimeOffset: '', xy: {}}
}
],
image: {alpha: '', resolution: {}, uri: ''}
}
],
pubsubDestination: {topic: ''},
spriteSheets: [
{
columnCount: 0,
endTimeOffset: '',
filePrefix: '',
format: '',
interval: '',
quality: 0,
rowCount: 0,
spriteHeightPixels: 0,
spriteWidthPixels: 0,
startTimeOffset: '',
totalCount: 0
}
]
},
createTime: '',
endTime: '',
error: {code: 0, details: [{}], message: ''},
inputUri: '',
labels: {},
mode: '',
name: '',
outputUri: '',
startTime: '',
state: '',
templateId: '',
ttlAfterCompletionDays: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"config":{"adBreaks":[{"startTimeOffset":""}],"editList":[{"endTimeOffset":"","inputs":[],"key":"","startTimeOffset":""}],"elementaryStreams":[{"audioStream":{"bitrateBps":0,"channelCount":0,"channelLayout":[],"codec":"","displayName":"","languageCode":"","mapping":[{"atomKey":"","gainDb":"","inputChannel":0,"inputKey":"","inputTrack":0,"outputChannel":0}],"sampleRateHertz":0},"key":"","textStream":{"codec":"","displayName":"","languageCode":"","mapping":[{"atomKey":"","inputKey":"","inputTrack":0}]},"videoStream":{"h264":{"allowOpenGop":false,"aqStrength":"","bFrameCount":0,"bPyramid":false,"bitrateBps":0,"crfLevel":0,"enableTwoPass":false,"entropyCoder":"","frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","preset":"","profile":"","rateControlMode":"","tune":"","vbvFullnessBits":0,"vbvSizeBits":0,"widthPixels":0},"h265":{"allowOpenGop":false,"aqStrength":"","bFrameCount":0,"bPyramid":false,"bitrateBps":0,"crfLevel":0,"enableTwoPass":false,"frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","preset":"","profile":"","rateControlMode":"","tune":"","vbvFullnessBits":0,"vbvSizeBits":0,"widthPixels":0},"vp9":{"bitrateBps":0,"crfLevel":0,"frameRate":"","gopDuration":"","gopFrameCount":0,"heightPixels":0,"pixelFormat":"","profile":"","rateControlMode":"","widthPixels":0}}}],"inputs":[{"key":"","preprocessingConfig":{"audio":{"highBoost":false,"lowBoost":false,"lufs":""},"color":{"brightness":"","contrast":"","saturation":""},"crop":{"bottomPixels":0,"leftPixels":0,"rightPixels":0,"topPixels":0},"deblock":{"enabled":false,"strength":""},"deinterlace":{"bwdif":{"deinterlaceAllFrames":false,"mode":"","parity":""},"yadif":{"deinterlaceAllFrames":false,"disableSpatialInterlacing":false,"mode":"","parity":""}},"denoise":{"strength":"","tune":""},"pad":{"bottomPixels":0,"leftPixels":0,"rightPixels":0,"topPixels":0}},"uri":""}],"manifests":[{"fileName":"","muxStreams":[],"type":""}],"muxStreams":[{"container":"","elementaryStreams":[],"fileName":"","key":"","segmentSettings":{"individualSegments":false,"segmentDuration":""}}],"output":{"uri":""},"overlays":[{"animations":[{"animationEnd":{"startTimeOffset":""},"animationFade":{"endTimeOffset":"","fadeType":"","startTimeOffset":"","xy":{"x":"","y":""}},"animationStatic":{"startTimeOffset":"","xy":{}}}],"image":{"alpha":"","resolution":{},"uri":""}}],"pubsubDestination":{"topic":""},"spriteSheets":[{"columnCount":0,"endTimeOffset":"","filePrefix":"","format":"","interval":"","quality":0,"rowCount":0,"spriteHeightPixels":0,"spriteWidthPixels":0,"startTimeOffset":"","totalCount":0}]},"createTime":"","endTime":"","error":{"code":0,"details":[{}],"message":""},"inputUri":"","labels":{},"mode":"","name":"","outputUri":"","startTime":"","state":"","templateId":"","ttlAfterCompletionDays":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"config": @{ @"adBreaks": @[ @{ @"startTimeOffset": @"" } ], @"editList": @[ @{ @"endTimeOffset": @"", @"inputs": @[ ], @"key": @"", @"startTimeOffset": @"" } ], @"elementaryStreams": @[ @{ @"audioStream": @{ @"bitrateBps": @0, @"channelCount": @0, @"channelLayout": @[ ], @"codec": @"", @"displayName": @"", @"languageCode": @"", @"mapping": @[ @{ @"atomKey": @"", @"gainDb": @"", @"inputChannel": @0, @"inputKey": @"", @"inputTrack": @0, @"outputChannel": @0 } ], @"sampleRateHertz": @0 }, @"key": @"", @"textStream": @{ @"codec": @"", @"displayName": @"", @"languageCode": @"", @"mapping": @[ @{ @"atomKey": @"", @"inputKey": @"", @"inputTrack": @0 } ] }, @"videoStream": @{ @"h264": @{ @"allowOpenGop": @NO, @"aqStrength": @"", @"bFrameCount": @0, @"bPyramid": @NO, @"bitrateBps": @0, @"crfLevel": @0, @"enableTwoPass": @NO, @"entropyCoder": @"", @"frameRate": @"", @"gopDuration": @"", @"gopFrameCount": @0, @"heightPixels": @0, @"pixelFormat": @"", @"preset": @"", @"profile": @"", @"rateControlMode": @"", @"tune": @"", @"vbvFullnessBits": @0, @"vbvSizeBits": @0, @"widthPixels": @0 }, @"h265": @{ @"allowOpenGop": @NO, @"aqStrength": @"", @"bFrameCount": @0, @"bPyramid": @NO, @"bitrateBps": @0, @"crfLevel": @0, @"enableTwoPass": @NO, @"frameRate": @"", @"gopDuration": @"", @"gopFrameCount": @0, @"heightPixels": @0, @"pixelFormat": @"", @"preset": @"", @"profile": @"", @"rateControlMode": @"", @"tune": @"", @"vbvFullnessBits": @0, @"vbvSizeBits": @0, @"widthPixels": @0 }, @"vp9": @{ @"bitrateBps": @0, @"crfLevel": @0, @"frameRate": @"", @"gopDuration": @"", @"gopFrameCount": @0, @"heightPixels": @0, @"pixelFormat": @"", @"profile": @"", @"rateControlMode": @"", @"widthPixels": @0 } } } ], @"inputs": @[ @{ @"key": @"", @"preprocessingConfig": @{ @"audio": @{ @"highBoost": @NO, @"lowBoost": @NO, @"lufs": @"" }, @"color": @{ @"brightness": @"", @"contrast": @"", @"saturation": @"" }, @"crop": @{ @"bottomPixels": @0, @"leftPixels": @0, @"rightPixels": @0, @"topPixels": @0 }, @"deblock": @{ @"enabled": @NO, @"strength": @"" }, @"deinterlace": @{ @"bwdif": @{ @"deinterlaceAllFrames": @NO, @"mode": @"", @"parity": @"" }, @"yadif": @{ @"deinterlaceAllFrames": @NO, @"disableSpatialInterlacing": @NO, @"mode": @"", @"parity": @"" } }, @"denoise": @{ @"strength": @"", @"tune": @"" }, @"pad": @{ @"bottomPixels": @0, @"leftPixels": @0, @"rightPixels": @0, @"topPixels": @0 } }, @"uri": @"" } ], @"manifests": @[ @{ @"fileName": @"", @"muxStreams": @[ ], @"type": @"" } ], @"muxStreams": @[ @{ @"container": @"", @"elementaryStreams": @[ ], @"fileName": @"", @"key": @"", @"segmentSettings": @{ @"individualSegments": @NO, @"segmentDuration": @"" } } ], @"output": @{ @"uri": @"" }, @"overlays": @[ @{ @"animations": @[ @{ @"animationEnd": @{ @"startTimeOffset": @"" }, @"animationFade": @{ @"endTimeOffset": @"", @"fadeType": @"", @"startTimeOffset": @"", @"xy": @{ @"x": @"", @"y": @"" } }, @"animationStatic": @{ @"startTimeOffset": @"", @"xy": @{ } } } ], @"image": @{ @"alpha": @"", @"resolution": @{ }, @"uri": @"" } } ], @"pubsubDestination": @{ @"topic": @"" }, @"spriteSheets": @[ @{ @"columnCount": @0, @"endTimeOffset": @"", @"filePrefix": @"", @"format": @"", @"interval": @"", @"quality": @0, @"rowCount": @0, @"spriteHeightPixels": @0, @"spriteWidthPixels": @0, @"startTimeOffset": @"", @"totalCount": @0 } ] },
@"createTime": @"",
@"endTime": @"",
@"error": @{ @"code": @0, @"details": @[ @{ } ], @"message": @"" },
@"inputUri": @"",
@"labels": @{ },
@"mode": @"",
@"name": @"",
@"outputUri": @"",
@"startTime": @"",
@"state": @"",
@"templateId": @"",
@"ttlAfterCompletionDays": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/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}}/v1/:parent/jobs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/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([
'config' => [
'adBreaks' => [
[
'startTimeOffset' => ''
]
],
'editList' => [
[
'endTimeOffset' => '',
'inputs' => [
],
'key' => '',
'startTimeOffset' => ''
]
],
'elementaryStreams' => [
[
'audioStream' => [
'bitrateBps' => 0,
'channelCount' => 0,
'channelLayout' => [
],
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'gainDb' => '',
'inputChannel' => 0,
'inputKey' => '',
'inputTrack' => 0,
'outputChannel' => 0
]
],
'sampleRateHertz' => 0
],
'key' => '',
'textStream' => [
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'inputKey' => '',
'inputTrack' => 0
]
]
],
'videoStream' => [
'h264' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'entropyCoder' => '',
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'h265' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'vp9' => [
'bitrateBps' => 0,
'crfLevel' => 0,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'profile' => '',
'rateControlMode' => '',
'widthPixels' => 0
]
]
]
],
'inputs' => [
[
'key' => '',
'preprocessingConfig' => [
'audio' => [
'highBoost' => null,
'lowBoost' => null,
'lufs' => ''
],
'color' => [
'brightness' => '',
'contrast' => '',
'saturation' => ''
],
'crop' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
],
'deblock' => [
'enabled' => null,
'strength' => ''
],
'deinterlace' => [
'bwdif' => [
'deinterlaceAllFrames' => null,
'mode' => '',
'parity' => ''
],
'yadif' => [
'deinterlaceAllFrames' => null,
'disableSpatialInterlacing' => null,
'mode' => '',
'parity' => ''
]
],
'denoise' => [
'strength' => '',
'tune' => ''
],
'pad' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
]
],
'uri' => ''
]
],
'manifests' => [
[
'fileName' => '',
'muxStreams' => [
],
'type' => ''
]
],
'muxStreams' => [
[
'container' => '',
'elementaryStreams' => [
],
'fileName' => '',
'key' => '',
'segmentSettings' => [
'individualSegments' => null,
'segmentDuration' => ''
]
]
],
'output' => [
'uri' => ''
],
'overlays' => [
[
'animations' => [
[
'animationEnd' => [
'startTimeOffset' => ''
],
'animationFade' => [
'endTimeOffset' => '',
'fadeType' => '',
'startTimeOffset' => '',
'xy' => [
'x' => '',
'y' => ''
]
],
'animationStatic' => [
'startTimeOffset' => '',
'xy' => [
]
]
]
],
'image' => [
'alpha' => '',
'resolution' => [
],
'uri' => ''
]
]
],
'pubsubDestination' => [
'topic' => ''
],
'spriteSheets' => [
[
'columnCount' => 0,
'endTimeOffset' => '',
'filePrefix' => '',
'format' => '',
'interval' => '',
'quality' => 0,
'rowCount' => 0,
'spriteHeightPixels' => 0,
'spriteWidthPixels' => 0,
'startTimeOffset' => '',
'totalCount' => 0
]
]
],
'createTime' => '',
'endTime' => '',
'error' => [
'code' => 0,
'details' => [
[
]
],
'message' => ''
],
'inputUri' => '',
'labels' => [
],
'mode' => '',
'name' => '',
'outputUri' => '',
'startTime' => '',
'state' => '',
'templateId' => '',
'ttlAfterCompletionDays' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/jobs', [
'body' => '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"createTime": "",
"endTime": "",
"error": {
"code": 0,
"details": [
{}
],
"message": ""
},
"inputUri": "",
"labels": {},
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/jobs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'config' => [
'adBreaks' => [
[
'startTimeOffset' => ''
]
],
'editList' => [
[
'endTimeOffset' => '',
'inputs' => [
],
'key' => '',
'startTimeOffset' => ''
]
],
'elementaryStreams' => [
[
'audioStream' => [
'bitrateBps' => 0,
'channelCount' => 0,
'channelLayout' => [
],
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'gainDb' => '',
'inputChannel' => 0,
'inputKey' => '',
'inputTrack' => 0,
'outputChannel' => 0
]
],
'sampleRateHertz' => 0
],
'key' => '',
'textStream' => [
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'inputKey' => '',
'inputTrack' => 0
]
]
],
'videoStream' => [
'h264' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'entropyCoder' => '',
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'h265' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'vp9' => [
'bitrateBps' => 0,
'crfLevel' => 0,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'profile' => '',
'rateControlMode' => '',
'widthPixels' => 0
]
]
]
],
'inputs' => [
[
'key' => '',
'preprocessingConfig' => [
'audio' => [
'highBoost' => null,
'lowBoost' => null,
'lufs' => ''
],
'color' => [
'brightness' => '',
'contrast' => '',
'saturation' => ''
],
'crop' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
],
'deblock' => [
'enabled' => null,
'strength' => ''
],
'deinterlace' => [
'bwdif' => [
'deinterlaceAllFrames' => null,
'mode' => '',
'parity' => ''
],
'yadif' => [
'deinterlaceAllFrames' => null,
'disableSpatialInterlacing' => null,
'mode' => '',
'parity' => ''
]
],
'denoise' => [
'strength' => '',
'tune' => ''
],
'pad' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
]
],
'uri' => ''
]
],
'manifests' => [
[
'fileName' => '',
'muxStreams' => [
],
'type' => ''
]
],
'muxStreams' => [
[
'container' => '',
'elementaryStreams' => [
],
'fileName' => '',
'key' => '',
'segmentSettings' => [
'individualSegments' => null,
'segmentDuration' => ''
]
]
],
'output' => [
'uri' => ''
],
'overlays' => [
[
'animations' => [
[
'animationEnd' => [
'startTimeOffset' => ''
],
'animationFade' => [
'endTimeOffset' => '',
'fadeType' => '',
'startTimeOffset' => '',
'xy' => [
'x' => '',
'y' => ''
]
],
'animationStatic' => [
'startTimeOffset' => '',
'xy' => [
]
]
]
],
'image' => [
'alpha' => '',
'resolution' => [
],
'uri' => ''
]
]
],
'pubsubDestination' => [
'topic' => ''
],
'spriteSheets' => [
[
'columnCount' => 0,
'endTimeOffset' => '',
'filePrefix' => '',
'format' => '',
'interval' => '',
'quality' => 0,
'rowCount' => 0,
'spriteHeightPixels' => 0,
'spriteWidthPixels' => 0,
'startTimeOffset' => '',
'totalCount' => 0
]
]
],
'createTime' => '',
'endTime' => '',
'error' => [
'code' => 0,
'details' => [
[
]
],
'message' => ''
],
'inputUri' => '',
'labels' => [
],
'mode' => '',
'name' => '',
'outputUri' => '',
'startTime' => '',
'state' => '',
'templateId' => '',
'ttlAfterCompletionDays' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'config' => [
'adBreaks' => [
[
'startTimeOffset' => ''
]
],
'editList' => [
[
'endTimeOffset' => '',
'inputs' => [
],
'key' => '',
'startTimeOffset' => ''
]
],
'elementaryStreams' => [
[
'audioStream' => [
'bitrateBps' => 0,
'channelCount' => 0,
'channelLayout' => [
],
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'gainDb' => '',
'inputChannel' => 0,
'inputKey' => '',
'inputTrack' => 0,
'outputChannel' => 0
]
],
'sampleRateHertz' => 0
],
'key' => '',
'textStream' => [
'codec' => '',
'displayName' => '',
'languageCode' => '',
'mapping' => [
[
'atomKey' => '',
'inputKey' => '',
'inputTrack' => 0
]
]
],
'videoStream' => [
'h264' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'entropyCoder' => '',
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'h265' => [
'allowOpenGop' => null,
'aqStrength' => '',
'bFrameCount' => 0,
'bPyramid' => null,
'bitrateBps' => 0,
'crfLevel' => 0,
'enableTwoPass' => null,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'preset' => '',
'profile' => '',
'rateControlMode' => '',
'tune' => '',
'vbvFullnessBits' => 0,
'vbvSizeBits' => 0,
'widthPixels' => 0
],
'vp9' => [
'bitrateBps' => 0,
'crfLevel' => 0,
'frameRate' => '',
'gopDuration' => '',
'gopFrameCount' => 0,
'heightPixels' => 0,
'pixelFormat' => '',
'profile' => '',
'rateControlMode' => '',
'widthPixels' => 0
]
]
]
],
'inputs' => [
[
'key' => '',
'preprocessingConfig' => [
'audio' => [
'highBoost' => null,
'lowBoost' => null,
'lufs' => ''
],
'color' => [
'brightness' => '',
'contrast' => '',
'saturation' => ''
],
'crop' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
],
'deblock' => [
'enabled' => null,
'strength' => ''
],
'deinterlace' => [
'bwdif' => [
'deinterlaceAllFrames' => null,
'mode' => '',
'parity' => ''
],
'yadif' => [
'deinterlaceAllFrames' => null,
'disableSpatialInterlacing' => null,
'mode' => '',
'parity' => ''
]
],
'denoise' => [
'strength' => '',
'tune' => ''
],
'pad' => [
'bottomPixels' => 0,
'leftPixels' => 0,
'rightPixels' => 0,
'topPixels' => 0
]
],
'uri' => ''
]
],
'manifests' => [
[
'fileName' => '',
'muxStreams' => [
],
'type' => ''
]
],
'muxStreams' => [
[
'container' => '',
'elementaryStreams' => [
],
'fileName' => '',
'key' => '',
'segmentSettings' => [
'individualSegments' => null,
'segmentDuration' => ''
]
]
],
'output' => [
'uri' => ''
],
'overlays' => [
[
'animations' => [
[
'animationEnd' => [
'startTimeOffset' => ''
],
'animationFade' => [
'endTimeOffset' => '',
'fadeType' => '',
'startTimeOffset' => '',
'xy' => [
'x' => '',
'y' => ''
]
],
'animationStatic' => [
'startTimeOffset' => '',
'xy' => [
]
]
]
],
'image' => [
'alpha' => '',
'resolution' => [
],
'uri' => ''
]
]
],
'pubsubDestination' => [
'topic' => ''
],
'spriteSheets' => [
[
'columnCount' => 0,
'endTimeOffset' => '',
'filePrefix' => '',
'format' => '',
'interval' => '',
'quality' => 0,
'rowCount' => 0,
'spriteHeightPixels' => 0,
'spriteWidthPixels' => 0,
'startTimeOffset' => '',
'totalCount' => 0
]
]
],
'createTime' => '',
'endTime' => '',
'error' => [
'code' => 0,
'details' => [
[
]
],
'message' => ''
],
'inputUri' => '',
'labels' => [
],
'mode' => '',
'name' => '',
'outputUri' => '',
'startTime' => '',
'state' => '',
'templateId' => '',
'ttlAfterCompletionDays' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/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}}/v1/:parent/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"createTime": "",
"endTime": "",
"error": {
"code": 0,
"details": [
{}
],
"message": ""
},
"inputUri": "",
"labels": {},
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"createTime": "",
"endTime": "",
"error": {
"code": 0,
"details": [
{}
],
"message": ""
},
"inputUri": "",
"labels": {},
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/jobs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/jobs"
payload = {
"config": {
"adBreaks": [{ "startTimeOffset": "" }],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": False,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": False,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": False,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": False,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": False,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": False,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": False,
"lowBoost": False,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": False,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": False,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": False,
"disableSpatialInterlacing": False,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": False,
"segmentDuration": ""
}
}
],
"output": { "uri": "" },
"overlays": [
{
"animations": [
{
"animationEnd": { "startTimeOffset": "" },
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": { "topic": "" },
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"createTime": "",
"endTime": "",
"error": {
"code": 0,
"details": [{}],
"message": ""
},
"inputUri": "",
"labels": {},
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/jobs"
payload <- "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/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 \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/jobs') do |req|
req.body = "{\n \"config\": {\n \"adBreaks\": [\n {\n \"startTimeOffset\": \"\"\n }\n ],\n \"editList\": [\n {\n \"endTimeOffset\": \"\",\n \"inputs\": [],\n \"key\": \"\",\n \"startTimeOffset\": \"\"\n }\n ],\n \"elementaryStreams\": [\n {\n \"audioStream\": {\n \"bitrateBps\": 0,\n \"channelCount\": 0,\n \"channelLayout\": [],\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"gainDb\": \"\",\n \"inputChannel\": 0,\n \"inputKey\": \"\",\n \"inputTrack\": 0,\n \"outputChannel\": 0\n }\n ],\n \"sampleRateHertz\": 0\n },\n \"key\": \"\",\n \"textStream\": {\n \"codec\": \"\",\n \"displayName\": \"\",\n \"languageCode\": \"\",\n \"mapping\": [\n {\n \"atomKey\": \"\",\n \"inputKey\": \"\",\n \"inputTrack\": 0\n }\n ]\n },\n \"videoStream\": {\n \"h264\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"entropyCoder\": \"\",\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"h265\": {\n \"allowOpenGop\": false,\n \"aqStrength\": \"\",\n \"bFrameCount\": 0,\n \"bPyramid\": false,\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"enableTwoPass\": false,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"preset\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"tune\": \"\",\n \"vbvFullnessBits\": 0,\n \"vbvSizeBits\": 0,\n \"widthPixels\": 0\n },\n \"vp9\": {\n \"bitrateBps\": 0,\n \"crfLevel\": 0,\n \"frameRate\": \"\",\n \"gopDuration\": \"\",\n \"gopFrameCount\": 0,\n \"heightPixels\": 0,\n \"pixelFormat\": \"\",\n \"profile\": \"\",\n \"rateControlMode\": \"\",\n \"widthPixels\": 0\n }\n }\n }\n ],\n \"inputs\": [\n {\n \"key\": \"\",\n \"preprocessingConfig\": {\n \"audio\": {\n \"highBoost\": false,\n \"lowBoost\": false,\n \"lufs\": \"\"\n },\n \"color\": {\n \"brightness\": \"\",\n \"contrast\": \"\",\n \"saturation\": \"\"\n },\n \"crop\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n },\n \"deblock\": {\n \"enabled\": false,\n \"strength\": \"\"\n },\n \"deinterlace\": {\n \"bwdif\": {\n \"deinterlaceAllFrames\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n },\n \"yadif\": {\n \"deinterlaceAllFrames\": false,\n \"disableSpatialInterlacing\": false,\n \"mode\": \"\",\n \"parity\": \"\"\n }\n },\n \"denoise\": {\n \"strength\": \"\",\n \"tune\": \"\"\n },\n \"pad\": {\n \"bottomPixels\": 0,\n \"leftPixels\": 0,\n \"rightPixels\": 0,\n \"topPixels\": 0\n }\n },\n \"uri\": \"\"\n }\n ],\n \"manifests\": [\n {\n \"fileName\": \"\",\n \"muxStreams\": [],\n \"type\": \"\"\n }\n ],\n \"muxStreams\": [\n {\n \"container\": \"\",\n \"elementaryStreams\": [],\n \"fileName\": \"\",\n \"key\": \"\",\n \"segmentSettings\": {\n \"individualSegments\": false,\n \"segmentDuration\": \"\"\n }\n }\n ],\n \"output\": {\n \"uri\": \"\"\n },\n \"overlays\": [\n {\n \"animations\": [\n {\n \"animationEnd\": {\n \"startTimeOffset\": \"\"\n },\n \"animationFade\": {\n \"endTimeOffset\": \"\",\n \"fadeType\": \"\",\n \"startTimeOffset\": \"\",\n \"xy\": {\n \"x\": \"\",\n \"y\": \"\"\n }\n },\n \"animationStatic\": {\n \"startTimeOffset\": \"\",\n \"xy\": {}\n }\n }\n ],\n \"image\": {\n \"alpha\": \"\",\n \"resolution\": {},\n \"uri\": \"\"\n }\n }\n ],\n \"pubsubDestination\": {\n \"topic\": \"\"\n },\n \"spriteSheets\": [\n {\n \"columnCount\": 0,\n \"endTimeOffset\": \"\",\n \"filePrefix\": \"\",\n \"format\": \"\",\n \"interval\": \"\",\n \"quality\": 0,\n \"rowCount\": 0,\n \"spriteHeightPixels\": 0,\n \"spriteWidthPixels\": 0,\n \"startTimeOffset\": \"\",\n \"totalCount\": 0\n }\n ]\n },\n \"createTime\": \"\",\n \"endTime\": \"\",\n \"error\": {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n },\n \"inputUri\": \"\",\n \"labels\": {},\n \"mode\": \"\",\n \"name\": \"\",\n \"outputUri\": \"\",\n \"startTime\": \"\",\n \"state\": \"\",\n \"templateId\": \"\",\n \"ttlAfterCompletionDays\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/jobs";
let payload = json!({
"config": json!({
"adBreaks": (json!({"startTimeOffset": ""})),
"editList": (
json!({
"endTimeOffset": "",
"inputs": (),
"key": "",
"startTimeOffset": ""
})
),
"elementaryStreams": (
json!({
"audioStream": json!({
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": (),
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": (
json!({
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
})
),
"sampleRateHertz": 0
}),
"key": "",
"textStream": json!({
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": (
json!({
"atomKey": "",
"inputKey": "",
"inputTrack": 0
})
)
}),
"videoStream": json!({
"h264": json!({
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
}),
"h265": json!({
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
}),
"vp9": json!({
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
})
})
})
),
"inputs": (
json!({
"key": "",
"preprocessingConfig": json!({
"audio": json!({
"highBoost": false,
"lowBoost": false,
"lufs": ""
}),
"color": json!({
"brightness": "",
"contrast": "",
"saturation": ""
}),
"crop": json!({
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}),
"deblock": json!({
"enabled": false,
"strength": ""
}),
"deinterlace": json!({
"bwdif": json!({
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
}),
"yadif": json!({
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
})
}),
"denoise": json!({
"strength": "",
"tune": ""
}),
"pad": json!({
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
})
}),
"uri": ""
})
),
"manifests": (
json!({
"fileName": "",
"muxStreams": (),
"type": ""
})
),
"muxStreams": (
json!({
"container": "",
"elementaryStreams": (),
"fileName": "",
"key": "",
"segmentSettings": json!({
"individualSegments": false,
"segmentDuration": ""
})
})
),
"output": json!({"uri": ""}),
"overlays": (
json!({
"animations": (
json!({
"animationEnd": json!({"startTimeOffset": ""}),
"animationFade": json!({
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": json!({
"x": "",
"y": ""
})
}),
"animationStatic": json!({
"startTimeOffset": "",
"xy": json!({})
})
})
),
"image": json!({
"alpha": "",
"resolution": json!({}),
"uri": ""
})
})
),
"pubsubDestination": json!({"topic": ""}),
"spriteSheets": (
json!({
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
})
)
}),
"createTime": "",
"endTime": "",
"error": json!({
"code": 0,
"details": (json!({})),
"message": ""
}),
"inputUri": "",
"labels": json!({}),
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:parent/jobs \
--header 'content-type: application/json' \
--data '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"createTime": "",
"endTime": "",
"error": {
"code": 0,
"details": [
{}
],
"message": ""
},
"inputUri": "",
"labels": {},
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
}'
echo '{
"config": {
"adBreaks": [
{
"startTimeOffset": ""
}
],
"editList": [
{
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
}
],
"elementaryStreams": [
{
"audioStream": {
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
}
],
"sampleRateHertz": 0
},
"key": "",
"textStream": {
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
{
"atomKey": "",
"inputKey": "",
"inputTrack": 0
}
]
},
"videoStream": {
"h264": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"h265": {
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
},
"vp9": {
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
}
}
}
],
"inputs": [
{
"key": "",
"preprocessingConfig": {
"audio": {
"highBoost": false,
"lowBoost": false,
"lufs": ""
},
"color": {
"brightness": "",
"contrast": "",
"saturation": ""
},
"crop": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
},
"deblock": {
"enabled": false,
"strength": ""
},
"deinterlace": {
"bwdif": {
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
},
"yadif": {
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
}
},
"denoise": {
"strength": "",
"tune": ""
},
"pad": {
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
}
},
"uri": ""
}
],
"manifests": [
{
"fileName": "",
"muxStreams": [],
"type": ""
}
],
"muxStreams": [
{
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": {
"individualSegments": false,
"segmentDuration": ""
}
}
],
"output": {
"uri": ""
},
"overlays": [
{
"animations": [
{
"animationEnd": {
"startTimeOffset": ""
},
"animationFade": {
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": {
"x": "",
"y": ""
}
},
"animationStatic": {
"startTimeOffset": "",
"xy": {}
}
}
],
"image": {
"alpha": "",
"resolution": {},
"uri": ""
}
}
],
"pubsubDestination": {
"topic": ""
},
"spriteSheets": [
{
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
}
]
},
"createTime": "",
"endTime": "",
"error": {
"code": 0,
"details": [
{}
],
"message": ""
},
"inputUri": "",
"labels": {},
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
}' | \
http POST {{baseUrl}}/v1/:parent/jobs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "config": {\n "adBreaks": [\n {\n "startTimeOffset": ""\n }\n ],\n "editList": [\n {\n "endTimeOffset": "",\n "inputs": [],\n "key": "",\n "startTimeOffset": ""\n }\n ],\n "elementaryStreams": [\n {\n "audioStream": {\n "bitrateBps": 0,\n "channelCount": 0,\n "channelLayout": [],\n "codec": "",\n "displayName": "",\n "languageCode": "",\n "mapping": [\n {\n "atomKey": "",\n "gainDb": "",\n "inputChannel": 0,\n "inputKey": "",\n "inputTrack": 0,\n "outputChannel": 0\n }\n ],\n "sampleRateHertz": 0\n },\n "key": "",\n "textStream": {\n "codec": "",\n "displayName": "",\n "languageCode": "",\n "mapping": [\n {\n "atomKey": "",\n "inputKey": "",\n "inputTrack": 0\n }\n ]\n },\n "videoStream": {\n "h264": {\n "allowOpenGop": false,\n "aqStrength": "",\n "bFrameCount": 0,\n "bPyramid": false,\n "bitrateBps": 0,\n "crfLevel": 0,\n "enableTwoPass": false,\n "entropyCoder": "",\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "preset": "",\n "profile": "",\n "rateControlMode": "",\n "tune": "",\n "vbvFullnessBits": 0,\n "vbvSizeBits": 0,\n "widthPixels": 0\n },\n "h265": {\n "allowOpenGop": false,\n "aqStrength": "",\n "bFrameCount": 0,\n "bPyramid": false,\n "bitrateBps": 0,\n "crfLevel": 0,\n "enableTwoPass": false,\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "preset": "",\n "profile": "",\n "rateControlMode": "",\n "tune": "",\n "vbvFullnessBits": 0,\n "vbvSizeBits": 0,\n "widthPixels": 0\n },\n "vp9": {\n "bitrateBps": 0,\n "crfLevel": 0,\n "frameRate": "",\n "gopDuration": "",\n "gopFrameCount": 0,\n "heightPixels": 0,\n "pixelFormat": "",\n "profile": "",\n "rateControlMode": "",\n "widthPixels": 0\n }\n }\n }\n ],\n "inputs": [\n {\n "key": "",\n "preprocessingConfig": {\n "audio": {\n "highBoost": false,\n "lowBoost": false,\n "lufs": ""\n },\n "color": {\n "brightness": "",\n "contrast": "",\n "saturation": ""\n },\n "crop": {\n "bottomPixels": 0,\n "leftPixels": 0,\n "rightPixels": 0,\n "topPixels": 0\n },\n "deblock": {\n "enabled": false,\n "strength": ""\n },\n "deinterlace": {\n "bwdif": {\n "deinterlaceAllFrames": false,\n "mode": "",\n "parity": ""\n },\n "yadif": {\n "deinterlaceAllFrames": false,\n "disableSpatialInterlacing": false,\n "mode": "",\n "parity": ""\n }\n },\n "denoise": {\n "strength": "",\n "tune": ""\n },\n "pad": {\n "bottomPixels": 0,\n "leftPixels": 0,\n "rightPixels": 0,\n "topPixels": 0\n }\n },\n "uri": ""\n }\n ],\n "manifests": [\n {\n "fileName": "",\n "muxStreams": [],\n "type": ""\n }\n ],\n "muxStreams": [\n {\n "container": "",\n "elementaryStreams": [],\n "fileName": "",\n "key": "",\n "segmentSettings": {\n "individualSegments": false,\n "segmentDuration": ""\n }\n }\n ],\n "output": {\n "uri": ""\n },\n "overlays": [\n {\n "animations": [\n {\n "animationEnd": {\n "startTimeOffset": ""\n },\n "animationFade": {\n "endTimeOffset": "",\n "fadeType": "",\n "startTimeOffset": "",\n "xy": {\n "x": "",\n "y": ""\n }\n },\n "animationStatic": {\n "startTimeOffset": "",\n "xy": {}\n }\n }\n ],\n "image": {\n "alpha": "",\n "resolution": {},\n "uri": ""\n }\n }\n ],\n "pubsubDestination": {\n "topic": ""\n },\n "spriteSheets": [\n {\n "columnCount": 0,\n "endTimeOffset": "",\n "filePrefix": "",\n "format": "",\n "interval": "",\n "quality": 0,\n "rowCount": 0,\n "spriteHeightPixels": 0,\n "spriteWidthPixels": 0,\n "startTimeOffset": "",\n "totalCount": 0\n }\n ]\n },\n "createTime": "",\n "endTime": "",\n "error": {\n "code": 0,\n "details": [\n {}\n ],\n "message": ""\n },\n "inputUri": "",\n "labels": {},\n "mode": "",\n "name": "",\n "outputUri": "",\n "startTime": "",\n "state": "",\n "templateId": "",\n "ttlAfterCompletionDays": 0\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/jobs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"config": [
"adBreaks": [["startTimeOffset": ""]],
"editList": [
[
"endTimeOffset": "",
"inputs": [],
"key": "",
"startTimeOffset": ""
]
],
"elementaryStreams": [
[
"audioStream": [
"bitrateBps": 0,
"channelCount": 0,
"channelLayout": [],
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
[
"atomKey": "",
"gainDb": "",
"inputChannel": 0,
"inputKey": "",
"inputTrack": 0,
"outputChannel": 0
]
],
"sampleRateHertz": 0
],
"key": "",
"textStream": [
"codec": "",
"displayName": "",
"languageCode": "",
"mapping": [
[
"atomKey": "",
"inputKey": "",
"inputTrack": 0
]
]
],
"videoStream": [
"h264": [
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"entropyCoder": "",
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
],
"h265": [
"allowOpenGop": false,
"aqStrength": "",
"bFrameCount": 0,
"bPyramid": false,
"bitrateBps": 0,
"crfLevel": 0,
"enableTwoPass": false,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"preset": "",
"profile": "",
"rateControlMode": "",
"tune": "",
"vbvFullnessBits": 0,
"vbvSizeBits": 0,
"widthPixels": 0
],
"vp9": [
"bitrateBps": 0,
"crfLevel": 0,
"frameRate": "",
"gopDuration": "",
"gopFrameCount": 0,
"heightPixels": 0,
"pixelFormat": "",
"profile": "",
"rateControlMode": "",
"widthPixels": 0
]
]
]
],
"inputs": [
[
"key": "",
"preprocessingConfig": [
"audio": [
"highBoost": false,
"lowBoost": false,
"lufs": ""
],
"color": [
"brightness": "",
"contrast": "",
"saturation": ""
],
"crop": [
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
],
"deblock": [
"enabled": false,
"strength": ""
],
"deinterlace": [
"bwdif": [
"deinterlaceAllFrames": false,
"mode": "",
"parity": ""
],
"yadif": [
"deinterlaceAllFrames": false,
"disableSpatialInterlacing": false,
"mode": "",
"parity": ""
]
],
"denoise": [
"strength": "",
"tune": ""
],
"pad": [
"bottomPixels": 0,
"leftPixels": 0,
"rightPixels": 0,
"topPixels": 0
]
],
"uri": ""
]
],
"manifests": [
[
"fileName": "",
"muxStreams": [],
"type": ""
]
],
"muxStreams": [
[
"container": "",
"elementaryStreams": [],
"fileName": "",
"key": "",
"segmentSettings": [
"individualSegments": false,
"segmentDuration": ""
]
]
],
"output": ["uri": ""],
"overlays": [
[
"animations": [
[
"animationEnd": ["startTimeOffset": ""],
"animationFade": [
"endTimeOffset": "",
"fadeType": "",
"startTimeOffset": "",
"xy": [
"x": "",
"y": ""
]
],
"animationStatic": [
"startTimeOffset": "",
"xy": []
]
]
],
"image": [
"alpha": "",
"resolution": [],
"uri": ""
]
]
],
"pubsubDestination": ["topic": ""],
"spriteSheets": [
[
"columnCount": 0,
"endTimeOffset": "",
"filePrefix": "",
"format": "",
"interval": "",
"quality": 0,
"rowCount": 0,
"spriteHeightPixels": 0,
"spriteWidthPixels": 0,
"startTimeOffset": "",
"totalCount": 0
]
]
],
"createTime": "",
"endTime": "",
"error": [
"code": 0,
"details": [[]],
"message": ""
],
"inputUri": "",
"labels": [],
"mode": "",
"name": "",
"outputUri": "",
"startTime": "",
"state": "",
"templateId": "",
"ttlAfterCompletionDays": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/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()
GET
transcoder.projects.locations.jobs.list
{{baseUrl}}/v1/:parent/jobs
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/jobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/jobs")
require "http/client"
url = "{{baseUrl}}/v1/:parent/jobs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/jobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/jobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/jobs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/jobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/jobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/jobs"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/jobs")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/jobs');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/jobs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/jobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/jobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/jobs',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobs'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/jobs');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/jobs'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/jobs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/jobs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/jobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/jobs');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/jobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/jobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/jobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/jobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/jobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/jobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/jobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/jobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/jobs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/jobs
http GET {{baseUrl}}/v1/:parent/jobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/jobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/jobs")! 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()