Dataflow API
DELETE
dataflow.projects.deleteSnapshots
{{baseUrl}}/v1b3/projects/:projectId/snapshots
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/snapshots");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1b3/projects/:projectId/snapshots")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots"
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}}/v1b3/projects/:projectId/snapshots"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/snapshots");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/snapshots"
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/v1b3/projects/:projectId/snapshots HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1b3/projects/:projectId/snapshots")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/snapshots"))
.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}}/v1b3/projects/:projectId/snapshots")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1b3/projects/:projectId/snapshots")
.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}}/v1b3/projects/:projectId/snapshots');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1b3/projects/:projectId/snapshots'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/snapshots';
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}}/v1b3/projects/:projectId/snapshots',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/snapshots")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/snapshots',
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}}/v1b3/projects/:projectId/snapshots'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1b3/projects/:projectId/snapshots');
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}}/v1b3/projects/:projectId/snapshots'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/snapshots';
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}}/v1b3/projects/:projectId/snapshots"]
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}}/v1b3/projects/:projectId/snapshots" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/snapshots",
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}}/v1b3/projects/:projectId/snapshots');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/snapshots');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/snapshots');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/snapshots' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/snapshots' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1b3/projects/:projectId/snapshots")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/snapshots"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/snapshots")
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/v1b3/projects/:projectId/snapshots') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots";
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}}/v1b3/projects/:projectId/snapshots
http DELETE {{baseUrl}}/v1b3/projects/:projectId/snapshots
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/snapshots
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/snapshots")! 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
dataflow.projects.jobs.aggregated
{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated"
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}}/v1b3/projects/:projectId/jobs:aggregated"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated"
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/v1b3/projects/:projectId/jobs:aggregated HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated"))
.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}}/v1b3/projects/:projectId/jobs:aggregated")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated")
.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}}/v1b3/projects/:projectId/jobs:aggregated');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated';
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}}/v1b3/projects/:projectId/jobs:aggregated',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/jobs:aggregated',
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}}/v1b3/projects/:projectId/jobs:aggregated'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated');
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}}/v1b3/projects/:projectId/jobs:aggregated'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated';
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}}/v1b3/projects/:projectId/jobs:aggregated"]
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}}/v1b3/projects/:projectId/jobs:aggregated" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated",
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}}/v1b3/projects/:projectId/jobs:aggregated');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/jobs:aggregated")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated")
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/v1b3/projects/:projectId/jobs:aggregated') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated";
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}}/v1b3/projects/:projectId/jobs:aggregated
http GET {{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs:aggregated")! 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
dataflow.projects.jobs.create
{{baseUrl}}/v1b3/projects/:projectId/jobs
QUERY PARAMS
projectId
BODY json
{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/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 \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/jobs" {:content-type :json
:form-params {:clientRequestId ""
:createTime ""
:createdFromSnapshotId ""
:currentState ""
:currentStateTime ""
:environment {:clusterManagerApiService ""
:dataset ""
:debugOptions {:enableHotKeyLogging false}
:experiments []
:flexResourceSchedulingGoal ""
:internalExperiments {}
:sdkPipelineOptions {}
:serviceAccountEmail ""
:serviceKmsKeyName ""
:serviceOptions []
:shuffleMode ""
:tempStoragePrefix ""
:userAgent {}
:version {}
:workerPools [{:autoscalingSettings {:algorithm ""
:maxNumWorkers 0}
:dataDisks [{:diskType ""
:mountPoint ""
:sizeGb 0}]
:defaultPackageSet ""
:diskSizeGb 0
:diskSourceImage ""
:diskType ""
:ipConfiguration ""
:kind ""
:machineType ""
:metadata {}
:network ""
:numThreadsPerWorker 0
:numWorkers 0
:onHostMaintenance ""
:packages [{:location ""
:name ""}]
:poolArgs {}
:sdkHarnessContainerImages [{:capabilities []
:containerImage ""
:environmentId ""
:useSingleCorePerContainer false}]
:subnetwork ""
:taskrunnerSettings {:alsologtostderr false
:baseTaskDir ""
:baseUrl ""
:commandlinesFileName ""
:continueOnException false
:dataflowApiVersion ""
:harnessCommand ""
:languageHint ""
:logDir ""
:logToSerialconsole false
:logUploadLocation ""
:oauthScopes []
:parallelWorkerSettings {:baseUrl ""
:reportingEnabled false
:servicePath ""
:shuffleServicePath ""
:tempStoragePrefix ""
:workerId ""}
:streamingWorkerMainClass ""
:taskGroup ""
:taskUser ""
:tempStoragePrefix ""
:vmId ""
:workflowFileName ""}
:teardownPolicy ""
:workerHarnessContainerImage ""
:zone ""}]
:workerRegion ""
:workerZone ""}
:executionInfo {:stages {}}
:id ""
:jobMetadata {:bigTableDetails [{:instanceId ""
:projectId ""
:tableId ""}]
:bigqueryDetails [{:dataset ""
:projectId ""
:query ""
:table ""}]
:datastoreDetails [{:namespace ""
:projectId ""}]
:fileDetails [{:filePattern ""}]
:pubsubDetails [{:subscription ""
:topic ""}]
:sdkVersion {:sdkSupportStatus ""
:version ""
:versionDisplayName ""}
:spannerDetails [{:databaseId ""
:instanceId ""
:projectId ""}]
:userDisplayProperties {}}
:labels {}
:location ""
:name ""
:pipelineDescription {:displayData [{:boolValue false
:durationValue ""
:floatValue ""
:int64Value ""
:javaClassValue ""
:key ""
:label ""
:namespace ""
:shortStrValue ""
:strValue ""
:timestampValue ""
:url ""}]
:executionPipelineStage [{:componentSource [{:name ""
:originalTransformOrCollection ""
:userName ""}]
:componentTransform [{:name ""
:originalTransform ""
:userName ""}]
:id ""
:inputSource [{:name ""
:originalTransformOrCollection ""
:sizeBytes ""
:userName ""}]
:kind ""
:name ""
:outputSource [{}]
:prerequisiteStage []}]
:originalPipelineTransform [{:displayData [{}]
:id ""
:inputCollectionName []
:kind ""
:name ""
:outputCollectionName []}]
:stepNamesHash ""}
:projectId ""
:replaceJobId ""
:replacedByJobId ""
:requestedState ""
:satisfiesPzs false
:stageStates [{:currentStateTime ""
:executionStageName ""
:executionStageState ""}]
:startTime ""
:steps [{:kind ""
:name ""
:properties {}}]
:stepsLocation ""
:tempFiles []
:transformNameMapping {}
:type ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/jobs"),
Content = new StringContent("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/jobs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs"
payload := strings.NewReader("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1b3/projects/:projectId/jobs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5262
{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/jobs")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/jobs")
.header("content-type", "application/json")
.body("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {
enableHotKeyLogging: false
},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {
algorithm: '',
maxNumWorkers: 0
},
dataDisks: [
{
diskType: '',
mountPoint: '',
sizeGb: 0
}
],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [
{
location: '',
name: ''
}
],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {
stages: {}
},
id: '',
jobMetadata: {
bigTableDetails: [
{
instanceId: '',
projectId: '',
tableId: ''
}
],
bigqueryDetails: [
{
dataset: '',
projectId: '',
query: '',
table: ''
}
],
datastoreDetails: [
{
namespace: '',
projectId: ''
}
],
fileDetails: [
{
filePattern: ''
}
],
pubsubDetails: [
{
subscription: '',
topic: ''
}
],
sdkVersion: {
sdkSupportStatus: '',
version: '',
versionDisplayName: ''
},
spannerDetails: [
{
databaseId: '',
instanceId: '',
projectId: ''
}
],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [
{
name: '',
originalTransformOrCollection: '',
userName: ''
}
],
componentTransform: [
{
name: '',
originalTransform: '',
userName: ''
}
],
id: '',
inputSource: [
{
name: '',
originalTransformOrCollection: '',
sizeBytes: '',
userName: ''
}
],
kind: '',
name: '',
outputSource: [
{}
],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [
{}
],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [
{
currentStateTime: '',
executionStageName: '',
executionStageState: ''
}
],
startTime: '',
steps: [
{
kind: '',
name: '',
properties: {}
}
],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/jobs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs',
headers: {'content-type': 'application/json'},
data: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientRequestId":"","createTime":"","createdFromSnapshotId":"","currentState":"","currentStateTime":"","environment":{"clusterManagerApiService":"","dataset":"","debugOptions":{"enableHotKeyLogging":false},"experiments":[],"flexResourceSchedulingGoal":"","internalExperiments":{},"sdkPipelineOptions":{},"serviceAccountEmail":"","serviceKmsKeyName":"","serviceOptions":[],"shuffleMode":"","tempStoragePrefix":"","userAgent":{},"version":{},"workerPools":[{"autoscalingSettings":{"algorithm":"","maxNumWorkers":0},"dataDisks":[{"diskType":"","mountPoint":"","sizeGb":0}],"defaultPackageSet":"","diskSizeGb":0,"diskSourceImage":"","diskType":"","ipConfiguration":"","kind":"","machineType":"","metadata":{},"network":"","numThreadsPerWorker":0,"numWorkers":0,"onHostMaintenance":"","packages":[{"location":"","name":""}],"poolArgs":{},"sdkHarnessContainerImages":[{"capabilities":[],"containerImage":"","environmentId":"","useSingleCorePerContainer":false}],"subnetwork":"","taskrunnerSettings":{"alsologtostderr":false,"baseTaskDir":"","baseUrl":"","commandlinesFileName":"","continueOnException":false,"dataflowApiVersion":"","harnessCommand":"","languageHint":"","logDir":"","logToSerialconsole":false,"logUploadLocation":"","oauthScopes":[],"parallelWorkerSettings":{"baseUrl":"","reportingEnabled":false,"servicePath":"","shuffleServicePath":"","tempStoragePrefix":"","workerId":""},"streamingWorkerMainClass":"","taskGroup":"","taskUser":"","tempStoragePrefix":"","vmId":"","workflowFileName":""},"teardownPolicy":"","workerHarnessContainerImage":"","zone":""}],"workerRegion":"","workerZone":""},"executionInfo":{"stages":{}},"id":"","jobMetadata":{"bigTableDetails":[{"instanceId":"","projectId":"","tableId":""}],"bigqueryDetails":[{"dataset":"","projectId":"","query":"","table":""}],"datastoreDetails":[{"namespace":"","projectId":""}],"fileDetails":[{"filePattern":""}],"pubsubDetails":[{"subscription":"","topic":""}],"sdkVersion":{"sdkSupportStatus":"","version":"","versionDisplayName":""},"spannerDetails":[{"databaseId":"","instanceId":"","projectId":""}],"userDisplayProperties":{}},"labels":{},"location":"","name":"","pipelineDescription":{"displayData":[{"boolValue":false,"durationValue":"","floatValue":"","int64Value":"","javaClassValue":"","key":"","label":"","namespace":"","shortStrValue":"","strValue":"","timestampValue":"","url":""}],"executionPipelineStage":[{"componentSource":[{"name":"","originalTransformOrCollection":"","userName":""}],"componentTransform":[{"name":"","originalTransform":"","userName":""}],"id":"","inputSource":[{"name":"","originalTransformOrCollection":"","sizeBytes":"","userName":""}],"kind":"","name":"","outputSource":[{}],"prerequisiteStage":[]}],"originalPipelineTransform":[{"displayData":[{}],"id":"","inputCollectionName":[],"kind":"","name":"","outputCollectionName":[]}],"stepNamesHash":""},"projectId":"","replaceJobId":"","replacedByJobId":"","requestedState":"","satisfiesPzs":false,"stageStates":[{"currentStateTime":"","executionStageName":"","executionStageState":""}],"startTime":"","steps":[{"kind":"","name":"","properties":{}}],"stepsLocation":"","tempFiles":[],"transformNameMapping":{},"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientRequestId": "",\n "createTime": "",\n "createdFromSnapshotId": "",\n "currentState": "",\n "currentStateTime": "",\n "environment": {\n "clusterManagerApiService": "",\n "dataset": "",\n "debugOptions": {\n "enableHotKeyLogging": false\n },\n "experiments": [],\n "flexResourceSchedulingGoal": "",\n "internalExperiments": {},\n "sdkPipelineOptions": {},\n "serviceAccountEmail": "",\n "serviceKmsKeyName": "",\n "serviceOptions": [],\n "shuffleMode": "",\n "tempStoragePrefix": "",\n "userAgent": {},\n "version": {},\n "workerPools": [\n {\n "autoscalingSettings": {\n "algorithm": "",\n "maxNumWorkers": 0\n },\n "dataDisks": [\n {\n "diskType": "",\n "mountPoint": "",\n "sizeGb": 0\n }\n ],\n "defaultPackageSet": "",\n "diskSizeGb": 0,\n "diskSourceImage": "",\n "diskType": "",\n "ipConfiguration": "",\n "kind": "",\n "machineType": "",\n "metadata": {},\n "network": "",\n "numThreadsPerWorker": 0,\n "numWorkers": 0,\n "onHostMaintenance": "",\n "packages": [\n {\n "location": "",\n "name": ""\n }\n ],\n "poolArgs": {},\n "sdkHarnessContainerImages": [\n {\n "capabilities": [],\n "containerImage": "",\n "environmentId": "",\n "useSingleCorePerContainer": false\n }\n ],\n "subnetwork": "",\n "taskrunnerSettings": {\n "alsologtostderr": false,\n "baseTaskDir": "",\n "baseUrl": "",\n "commandlinesFileName": "",\n "continueOnException": false,\n "dataflowApiVersion": "",\n "harnessCommand": "",\n "languageHint": "",\n "logDir": "",\n "logToSerialconsole": false,\n "logUploadLocation": "",\n "oauthScopes": [],\n "parallelWorkerSettings": {\n "baseUrl": "",\n "reportingEnabled": false,\n "servicePath": "",\n "shuffleServicePath": "",\n "tempStoragePrefix": "",\n "workerId": ""\n },\n "streamingWorkerMainClass": "",\n "taskGroup": "",\n "taskUser": "",\n "tempStoragePrefix": "",\n "vmId": "",\n "workflowFileName": ""\n },\n "teardownPolicy": "",\n "workerHarnessContainerImage": "",\n "zone": ""\n }\n ],\n "workerRegion": "",\n "workerZone": ""\n },\n "executionInfo": {\n "stages": {}\n },\n "id": "",\n "jobMetadata": {\n "bigTableDetails": [\n {\n "instanceId": "",\n "projectId": "",\n "tableId": ""\n }\n ],\n "bigqueryDetails": [\n {\n "dataset": "",\n "projectId": "",\n "query": "",\n "table": ""\n }\n ],\n "datastoreDetails": [\n {\n "namespace": "",\n "projectId": ""\n }\n ],\n "fileDetails": [\n {\n "filePattern": ""\n }\n ],\n "pubsubDetails": [\n {\n "subscription": "",\n "topic": ""\n }\n ],\n "sdkVersion": {\n "sdkSupportStatus": "",\n "version": "",\n "versionDisplayName": ""\n },\n "spannerDetails": [\n {\n "databaseId": "",\n "instanceId": "",\n "projectId": ""\n }\n ],\n "userDisplayProperties": {}\n },\n "labels": {},\n "location": "",\n "name": "",\n "pipelineDescription": {\n "displayData": [\n {\n "boolValue": false,\n "durationValue": "",\n "floatValue": "",\n "int64Value": "",\n "javaClassValue": "",\n "key": "",\n "label": "",\n "namespace": "",\n "shortStrValue": "",\n "strValue": "",\n "timestampValue": "",\n "url": ""\n }\n ],\n "executionPipelineStage": [\n {\n "componentSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "userName": ""\n }\n ],\n "componentTransform": [\n {\n "name": "",\n "originalTransform": "",\n "userName": ""\n }\n ],\n "id": "",\n "inputSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "sizeBytes": "",\n "userName": ""\n }\n ],\n "kind": "",\n "name": "",\n "outputSource": [\n {}\n ],\n "prerequisiteStage": []\n }\n ],\n "originalPipelineTransform": [\n {\n "displayData": [\n {}\n ],\n "id": "",\n "inputCollectionName": [],\n "kind": "",\n "name": "",\n "outputCollectionName": []\n }\n ],\n "stepNamesHash": ""\n },\n "projectId": "",\n "replaceJobId": "",\n "replacedByJobId": "",\n "requestedState": "",\n "satisfiesPzs": false,\n "stageStates": [\n {\n "currentStateTime": "",\n "executionStageName": "",\n "executionStageState": ""\n }\n ],\n "startTime": "",\n "steps": [\n {\n "kind": "",\n "name": "",\n "properties": {}\n }\n ],\n "stepsLocation": "",\n "tempFiles": [],\n "transformNameMapping": {},\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/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/v1b3/projects/:projectId/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({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs',
headers: {'content-type': 'application/json'},
body: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1b3/projects/:projectId/jobs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {
enableHotKeyLogging: false
},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {
algorithm: '',
maxNumWorkers: 0
},
dataDisks: [
{
diskType: '',
mountPoint: '',
sizeGb: 0
}
],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [
{
location: '',
name: ''
}
],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {
stages: {}
},
id: '',
jobMetadata: {
bigTableDetails: [
{
instanceId: '',
projectId: '',
tableId: ''
}
],
bigqueryDetails: [
{
dataset: '',
projectId: '',
query: '',
table: ''
}
],
datastoreDetails: [
{
namespace: '',
projectId: ''
}
],
fileDetails: [
{
filePattern: ''
}
],
pubsubDetails: [
{
subscription: '',
topic: ''
}
],
sdkVersion: {
sdkSupportStatus: '',
version: '',
versionDisplayName: ''
},
spannerDetails: [
{
databaseId: '',
instanceId: '',
projectId: ''
}
],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [
{
name: '',
originalTransformOrCollection: '',
userName: ''
}
],
componentTransform: [
{
name: '',
originalTransform: '',
userName: ''
}
],
id: '',
inputSource: [
{
name: '',
originalTransformOrCollection: '',
sizeBytes: '',
userName: ''
}
],
kind: '',
name: '',
outputSource: [
{}
],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [
{}
],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [
{
currentStateTime: '',
executionStageName: '',
executionStageState: ''
}
],
startTime: '',
steps: [
{
kind: '',
name: '',
properties: {}
}
],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs',
headers: {'content-type': 'application/json'},
data: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientRequestId":"","createTime":"","createdFromSnapshotId":"","currentState":"","currentStateTime":"","environment":{"clusterManagerApiService":"","dataset":"","debugOptions":{"enableHotKeyLogging":false},"experiments":[],"flexResourceSchedulingGoal":"","internalExperiments":{},"sdkPipelineOptions":{},"serviceAccountEmail":"","serviceKmsKeyName":"","serviceOptions":[],"shuffleMode":"","tempStoragePrefix":"","userAgent":{},"version":{},"workerPools":[{"autoscalingSettings":{"algorithm":"","maxNumWorkers":0},"dataDisks":[{"diskType":"","mountPoint":"","sizeGb":0}],"defaultPackageSet":"","diskSizeGb":0,"diskSourceImage":"","diskType":"","ipConfiguration":"","kind":"","machineType":"","metadata":{},"network":"","numThreadsPerWorker":0,"numWorkers":0,"onHostMaintenance":"","packages":[{"location":"","name":""}],"poolArgs":{},"sdkHarnessContainerImages":[{"capabilities":[],"containerImage":"","environmentId":"","useSingleCorePerContainer":false}],"subnetwork":"","taskrunnerSettings":{"alsologtostderr":false,"baseTaskDir":"","baseUrl":"","commandlinesFileName":"","continueOnException":false,"dataflowApiVersion":"","harnessCommand":"","languageHint":"","logDir":"","logToSerialconsole":false,"logUploadLocation":"","oauthScopes":[],"parallelWorkerSettings":{"baseUrl":"","reportingEnabled":false,"servicePath":"","shuffleServicePath":"","tempStoragePrefix":"","workerId":""},"streamingWorkerMainClass":"","taskGroup":"","taskUser":"","tempStoragePrefix":"","vmId":"","workflowFileName":""},"teardownPolicy":"","workerHarnessContainerImage":"","zone":""}],"workerRegion":"","workerZone":""},"executionInfo":{"stages":{}},"id":"","jobMetadata":{"bigTableDetails":[{"instanceId":"","projectId":"","tableId":""}],"bigqueryDetails":[{"dataset":"","projectId":"","query":"","table":""}],"datastoreDetails":[{"namespace":"","projectId":""}],"fileDetails":[{"filePattern":""}],"pubsubDetails":[{"subscription":"","topic":""}],"sdkVersion":{"sdkSupportStatus":"","version":"","versionDisplayName":""},"spannerDetails":[{"databaseId":"","instanceId":"","projectId":""}],"userDisplayProperties":{}},"labels":{},"location":"","name":"","pipelineDescription":{"displayData":[{"boolValue":false,"durationValue":"","floatValue":"","int64Value":"","javaClassValue":"","key":"","label":"","namespace":"","shortStrValue":"","strValue":"","timestampValue":"","url":""}],"executionPipelineStage":[{"componentSource":[{"name":"","originalTransformOrCollection":"","userName":""}],"componentTransform":[{"name":"","originalTransform":"","userName":""}],"id":"","inputSource":[{"name":"","originalTransformOrCollection":"","sizeBytes":"","userName":""}],"kind":"","name":"","outputSource":[{}],"prerequisiteStage":[]}],"originalPipelineTransform":[{"displayData":[{}],"id":"","inputCollectionName":[],"kind":"","name":"","outputCollectionName":[]}],"stepNamesHash":""},"projectId":"","replaceJobId":"","replacedByJobId":"","requestedState":"","satisfiesPzs":false,"stageStates":[{"currentStateTime":"","executionStageName":"","executionStageState":""}],"startTime":"","steps":[{"kind":"","name":"","properties":{}}],"stepsLocation":"","tempFiles":[],"transformNameMapping":{},"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientRequestId": @"",
@"createTime": @"",
@"createdFromSnapshotId": @"",
@"currentState": @"",
@"currentStateTime": @"",
@"environment": @{ @"clusterManagerApiService": @"", @"dataset": @"", @"debugOptions": @{ @"enableHotKeyLogging": @NO }, @"experiments": @[ ], @"flexResourceSchedulingGoal": @"", @"internalExperiments": @{ }, @"sdkPipelineOptions": @{ }, @"serviceAccountEmail": @"", @"serviceKmsKeyName": @"", @"serviceOptions": @[ ], @"shuffleMode": @"", @"tempStoragePrefix": @"", @"userAgent": @{ }, @"version": @{ }, @"workerPools": @[ @{ @"autoscalingSettings": @{ @"algorithm": @"", @"maxNumWorkers": @0 }, @"dataDisks": @[ @{ @"diskType": @"", @"mountPoint": @"", @"sizeGb": @0 } ], @"defaultPackageSet": @"", @"diskSizeGb": @0, @"diskSourceImage": @"", @"diskType": @"", @"ipConfiguration": @"", @"kind": @"", @"machineType": @"", @"metadata": @{ }, @"network": @"", @"numThreadsPerWorker": @0, @"numWorkers": @0, @"onHostMaintenance": @"", @"packages": @[ @{ @"location": @"", @"name": @"" } ], @"poolArgs": @{ }, @"sdkHarnessContainerImages": @[ @{ @"capabilities": @[ ], @"containerImage": @"", @"environmentId": @"", @"useSingleCorePerContainer": @NO } ], @"subnetwork": @"", @"taskrunnerSettings": @{ @"alsologtostderr": @NO, @"baseTaskDir": @"", @"baseUrl": @"", @"commandlinesFileName": @"", @"continueOnException": @NO, @"dataflowApiVersion": @"", @"harnessCommand": @"", @"languageHint": @"", @"logDir": @"", @"logToSerialconsole": @NO, @"logUploadLocation": @"", @"oauthScopes": @[ ], @"parallelWorkerSettings": @{ @"baseUrl": @"", @"reportingEnabled": @NO, @"servicePath": @"", @"shuffleServicePath": @"", @"tempStoragePrefix": @"", @"workerId": @"" }, @"streamingWorkerMainClass": @"", @"taskGroup": @"", @"taskUser": @"", @"tempStoragePrefix": @"", @"vmId": @"", @"workflowFileName": @"" }, @"teardownPolicy": @"", @"workerHarnessContainerImage": @"", @"zone": @"" } ], @"workerRegion": @"", @"workerZone": @"" },
@"executionInfo": @{ @"stages": @{ } },
@"id": @"",
@"jobMetadata": @{ @"bigTableDetails": @[ @{ @"instanceId": @"", @"projectId": @"", @"tableId": @"" } ], @"bigqueryDetails": @[ @{ @"dataset": @"", @"projectId": @"", @"query": @"", @"table": @"" } ], @"datastoreDetails": @[ @{ @"namespace": @"", @"projectId": @"" } ], @"fileDetails": @[ @{ @"filePattern": @"" } ], @"pubsubDetails": @[ @{ @"subscription": @"", @"topic": @"" } ], @"sdkVersion": @{ @"sdkSupportStatus": @"", @"version": @"", @"versionDisplayName": @"" }, @"spannerDetails": @[ @{ @"databaseId": @"", @"instanceId": @"", @"projectId": @"" } ], @"userDisplayProperties": @{ } },
@"labels": @{ },
@"location": @"",
@"name": @"",
@"pipelineDescription": @{ @"displayData": @[ @{ @"boolValue": @NO, @"durationValue": @"", @"floatValue": @"", @"int64Value": @"", @"javaClassValue": @"", @"key": @"", @"label": @"", @"namespace": @"", @"shortStrValue": @"", @"strValue": @"", @"timestampValue": @"", @"url": @"" } ], @"executionPipelineStage": @[ @{ @"componentSource": @[ @{ @"name": @"", @"originalTransformOrCollection": @"", @"userName": @"" } ], @"componentTransform": @[ @{ @"name": @"", @"originalTransform": @"", @"userName": @"" } ], @"id": @"", @"inputSource": @[ @{ @"name": @"", @"originalTransformOrCollection": @"", @"sizeBytes": @"", @"userName": @"" } ], @"kind": @"", @"name": @"", @"outputSource": @[ @{ } ], @"prerequisiteStage": @[ ] } ], @"originalPipelineTransform": @[ @{ @"displayData": @[ @{ } ], @"id": @"", @"inputCollectionName": @[ ], @"kind": @"", @"name": @"", @"outputCollectionName": @[ ] } ], @"stepNamesHash": @"" },
@"projectId": @"",
@"replaceJobId": @"",
@"replacedByJobId": @"",
@"requestedState": @"",
@"satisfiesPzs": @NO,
@"stageStates": @[ @{ @"currentStateTime": @"", @"executionStageName": @"", @"executionStageState": @"" } ],
@"startTime": @"",
@"steps": @[ @{ @"kind": @"", @"name": @"", @"properties": @{ } } ],
@"stepsLocation": @"",
@"tempFiles": @[ ],
@"transformNameMapping": @{ },
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/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([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1b3/projects/:projectId/jobs', [
'body' => '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/jobs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs"
payload = {
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": { "enableHotKeyLogging": False },
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": False
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": False,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": False,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": False,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": False,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": { "stages": {} },
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [{ "filePattern": "" }],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": False,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [{}],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [{}],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": False,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs"
payload <- "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/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 \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1b3/projects/:projectId/jobs') do |req|
req.body = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs";
let payload = json!({
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": json!({
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": json!({"enableHotKeyLogging": false}),
"experiments": (),
"flexResourceSchedulingGoal": "",
"internalExperiments": json!({}),
"sdkPipelineOptions": json!({}),
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": (),
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": json!({}),
"version": json!({}),
"workerPools": (
json!({
"autoscalingSettings": json!({
"algorithm": "",
"maxNumWorkers": 0
}),
"dataDisks": (
json!({
"diskType": "",
"mountPoint": "",
"sizeGb": 0
})
),
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": json!({}),
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": (
json!({
"location": "",
"name": ""
})
),
"poolArgs": json!({}),
"sdkHarnessContainerImages": (
json!({
"capabilities": (),
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
})
),
"subnetwork": "",
"taskrunnerSettings": json!({
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": (),
"parallelWorkerSettings": json!({
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
}),
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
}),
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
})
),
"workerRegion": "",
"workerZone": ""
}),
"executionInfo": json!({"stages": json!({})}),
"id": "",
"jobMetadata": json!({
"bigTableDetails": (
json!({
"instanceId": "",
"projectId": "",
"tableId": ""
})
),
"bigqueryDetails": (
json!({
"dataset": "",
"projectId": "",
"query": "",
"table": ""
})
),
"datastoreDetails": (
json!({
"namespace": "",
"projectId": ""
})
),
"fileDetails": (json!({"filePattern": ""})),
"pubsubDetails": (
json!({
"subscription": "",
"topic": ""
})
),
"sdkVersion": json!({
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
}),
"spannerDetails": (
json!({
"databaseId": "",
"instanceId": "",
"projectId": ""
})
),
"userDisplayProperties": json!({})
}),
"labels": json!({}),
"location": "",
"name": "",
"pipelineDescription": json!({
"displayData": (
json!({
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
})
),
"executionPipelineStage": (
json!({
"componentSource": (
json!({
"name": "",
"originalTransformOrCollection": "",
"userName": ""
})
),
"componentTransform": (
json!({
"name": "",
"originalTransform": "",
"userName": ""
})
),
"id": "",
"inputSource": (
json!({
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
})
),
"kind": "",
"name": "",
"outputSource": (json!({})),
"prerequisiteStage": ()
})
),
"originalPipelineTransform": (
json!({
"displayData": (json!({})),
"id": "",
"inputCollectionName": (),
"kind": "",
"name": "",
"outputCollectionName": ()
})
),
"stepNamesHash": ""
}),
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": (
json!({
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
})
),
"startTime": "",
"steps": (
json!({
"kind": "",
"name": "",
"properties": json!({})
})
),
"stepsLocation": "",
"tempFiles": (),
"transformNameMapping": json!({}),
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1b3/projects/:projectId/jobs \
--header 'content-type: application/json' \
--data '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
echo '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/jobs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientRequestId": "",\n "createTime": "",\n "createdFromSnapshotId": "",\n "currentState": "",\n "currentStateTime": "",\n "environment": {\n "clusterManagerApiService": "",\n "dataset": "",\n "debugOptions": {\n "enableHotKeyLogging": false\n },\n "experiments": [],\n "flexResourceSchedulingGoal": "",\n "internalExperiments": {},\n "sdkPipelineOptions": {},\n "serviceAccountEmail": "",\n "serviceKmsKeyName": "",\n "serviceOptions": [],\n "shuffleMode": "",\n "tempStoragePrefix": "",\n "userAgent": {},\n "version": {},\n "workerPools": [\n {\n "autoscalingSettings": {\n "algorithm": "",\n "maxNumWorkers": 0\n },\n "dataDisks": [\n {\n "diskType": "",\n "mountPoint": "",\n "sizeGb": 0\n }\n ],\n "defaultPackageSet": "",\n "diskSizeGb": 0,\n "diskSourceImage": "",\n "diskType": "",\n "ipConfiguration": "",\n "kind": "",\n "machineType": "",\n "metadata": {},\n "network": "",\n "numThreadsPerWorker": 0,\n "numWorkers": 0,\n "onHostMaintenance": "",\n "packages": [\n {\n "location": "",\n "name": ""\n }\n ],\n "poolArgs": {},\n "sdkHarnessContainerImages": [\n {\n "capabilities": [],\n "containerImage": "",\n "environmentId": "",\n "useSingleCorePerContainer": false\n }\n ],\n "subnetwork": "",\n "taskrunnerSettings": {\n "alsologtostderr": false,\n "baseTaskDir": "",\n "baseUrl": "",\n "commandlinesFileName": "",\n "continueOnException": false,\n "dataflowApiVersion": "",\n "harnessCommand": "",\n "languageHint": "",\n "logDir": "",\n "logToSerialconsole": false,\n "logUploadLocation": "",\n "oauthScopes": [],\n "parallelWorkerSettings": {\n "baseUrl": "",\n "reportingEnabled": false,\n "servicePath": "",\n "shuffleServicePath": "",\n "tempStoragePrefix": "",\n "workerId": ""\n },\n "streamingWorkerMainClass": "",\n "taskGroup": "",\n "taskUser": "",\n "tempStoragePrefix": "",\n "vmId": "",\n "workflowFileName": ""\n },\n "teardownPolicy": "",\n "workerHarnessContainerImage": "",\n "zone": ""\n }\n ],\n "workerRegion": "",\n "workerZone": ""\n },\n "executionInfo": {\n "stages": {}\n },\n "id": "",\n "jobMetadata": {\n "bigTableDetails": [\n {\n "instanceId": "",\n "projectId": "",\n "tableId": ""\n }\n ],\n "bigqueryDetails": [\n {\n "dataset": "",\n "projectId": "",\n "query": "",\n "table": ""\n }\n ],\n "datastoreDetails": [\n {\n "namespace": "",\n "projectId": ""\n }\n ],\n "fileDetails": [\n {\n "filePattern": ""\n }\n ],\n "pubsubDetails": [\n {\n "subscription": "",\n "topic": ""\n }\n ],\n "sdkVersion": {\n "sdkSupportStatus": "",\n "version": "",\n "versionDisplayName": ""\n },\n "spannerDetails": [\n {\n "databaseId": "",\n "instanceId": "",\n "projectId": ""\n }\n ],\n "userDisplayProperties": {}\n },\n "labels": {},\n "location": "",\n "name": "",\n "pipelineDescription": {\n "displayData": [\n {\n "boolValue": false,\n "durationValue": "",\n "floatValue": "",\n "int64Value": "",\n "javaClassValue": "",\n "key": "",\n "label": "",\n "namespace": "",\n "shortStrValue": "",\n "strValue": "",\n "timestampValue": "",\n "url": ""\n }\n ],\n "executionPipelineStage": [\n {\n "componentSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "userName": ""\n }\n ],\n "componentTransform": [\n {\n "name": "",\n "originalTransform": "",\n "userName": ""\n }\n ],\n "id": "",\n "inputSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "sizeBytes": "",\n "userName": ""\n }\n ],\n "kind": "",\n "name": "",\n "outputSource": [\n {}\n ],\n "prerequisiteStage": []\n }\n ],\n "originalPipelineTransform": [\n {\n "displayData": [\n {}\n ],\n "id": "",\n "inputCollectionName": [],\n "kind": "",\n "name": "",\n "outputCollectionName": []\n }\n ],\n "stepNamesHash": ""\n },\n "projectId": "",\n "replaceJobId": "",\n "replacedByJobId": "",\n "requestedState": "",\n "satisfiesPzs": false,\n "stageStates": [\n {\n "currentStateTime": "",\n "executionStageName": "",\n "executionStageState": ""\n }\n ],\n "startTime": "",\n "steps": [\n {\n "kind": "",\n "name": "",\n "properties": {}\n }\n ],\n "stepsLocation": "",\n "tempFiles": [],\n "transformNameMapping": {},\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": [
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": ["enableHotKeyLogging": false],
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": [],
"sdkPipelineOptions": [],
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": [],
"version": [],
"workerPools": [
[
"autoscalingSettings": [
"algorithm": "",
"maxNumWorkers": 0
],
"dataDisks": [
[
"diskType": "",
"mountPoint": "",
"sizeGb": 0
]
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": [],
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
[
"location": "",
"name": ""
]
],
"poolArgs": [],
"sdkHarnessContainerImages": [
[
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
]
],
"subnetwork": "",
"taskrunnerSettings": [
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": [
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
],
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
],
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
]
],
"workerRegion": "",
"workerZone": ""
],
"executionInfo": ["stages": []],
"id": "",
"jobMetadata": [
"bigTableDetails": [
[
"instanceId": "",
"projectId": "",
"tableId": ""
]
],
"bigqueryDetails": [
[
"dataset": "",
"projectId": "",
"query": "",
"table": ""
]
],
"datastoreDetails": [
[
"namespace": "",
"projectId": ""
]
],
"fileDetails": [["filePattern": ""]],
"pubsubDetails": [
[
"subscription": "",
"topic": ""
]
],
"sdkVersion": [
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
],
"spannerDetails": [
[
"databaseId": "",
"instanceId": "",
"projectId": ""
]
],
"userDisplayProperties": []
],
"labels": [],
"location": "",
"name": "",
"pipelineDescription": [
"displayData": [
[
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
]
],
"executionPipelineStage": [
[
"componentSource": [
[
"name": "",
"originalTransformOrCollection": "",
"userName": ""
]
],
"componentTransform": [
[
"name": "",
"originalTransform": "",
"userName": ""
]
],
"id": "",
"inputSource": [
[
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
]
],
"kind": "",
"name": "",
"outputSource": [[]],
"prerequisiteStage": []
]
],
"originalPipelineTransform": [
[
"displayData": [[]],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
]
],
"stepNamesHash": ""
],
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
[
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
]
],
"startTime": "",
"steps": [
[
"kind": "",
"name": "",
"properties": []
]
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": [],
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.jobs.debug.getConfig
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig
QUERY PARAMS
projectId
jobId
BODY json
{
"componentId": "",
"location": "",
"workerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig");
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 \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig" {:content-type :json
:form-params {:componentId ""
:location ""
:workerId ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig"),
Content = new StringContent("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig"
payload := strings.NewReader("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"componentId": "",
"location": "",
"workerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig")
.setHeader("content-type", "application/json")
.setBody("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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 \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig")
.header("content-type", "application/json")
.body("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
componentId: '',
location: '',
workerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig',
headers: {'content-type': 'application/json'},
data: {componentId: '', location: '', workerId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"componentId":"","location":"","workerId":""}'
};
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "componentId": "",\n "location": "",\n "workerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig")
.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/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig',
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({componentId: '', location: '', workerId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig',
headers: {'content-type': 'application/json'},
body: {componentId: '', location: '', workerId: ''},
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
componentId: '',
location: '',
workerId: ''
});
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig',
headers: {'content-type': 'application/json'},
data: {componentId: '', location: '', workerId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"componentId":"","location":"","workerId":""}'
};
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 = @{ @"componentId": @"",
@"location": @"",
@"workerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig"]
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig",
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([
'componentId' => '',
'location' => '',
'workerId' => ''
]),
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig', [
'body' => '{
"componentId": "",
"location": "",
"workerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'componentId' => '',
'location' => '',
'workerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'componentId' => '',
'location' => '',
'workerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig');
$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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"componentId": "",
"location": "",
"workerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"componentId": "",
"location": "",
"workerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig"
payload = {
"componentId": "",
"location": "",
"workerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig"
payload <- "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig")
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 \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig') do |req|
req.body = "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig";
let payload = json!({
"componentId": "",
"location": "",
"workerId": ""
});
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig \
--header 'content-type: application/json' \
--data '{
"componentId": "",
"location": "",
"workerId": ""
}'
echo '{
"componentId": "",
"location": "",
"workerId": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "componentId": "",\n "location": "",\n "workerId": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"componentId": "",
"location": "",
"workerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/getConfig")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.jobs.debug.sendCapture
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture
QUERY PARAMS
projectId
jobId
BODY json
{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture");
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 \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture" {:content-type :json
:form-params {:componentId ""
:data ""
:dataFormat ""
:location ""
:workerId ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture"),
Content = new StringContent("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture"
payload := strings.NewReader("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 93
{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture")
.setHeader("content-type", "application/json")
.setBody("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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 \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture")
.header("content-type", "application/json")
.body("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
componentId: '',
data: '',
dataFormat: '',
location: '',
workerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture',
headers: {'content-type': 'application/json'},
data: {componentId: '', data: '', dataFormat: '', location: '', workerId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"componentId":"","data":"","dataFormat":"","location":"","workerId":""}'
};
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "componentId": "",\n "data": "",\n "dataFormat": "",\n "location": "",\n "workerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture")
.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/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture',
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({componentId: '', data: '', dataFormat: '', location: '', workerId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture',
headers: {'content-type': 'application/json'},
body: {componentId: '', data: '', dataFormat: '', location: '', workerId: ''},
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
componentId: '',
data: '',
dataFormat: '',
location: '',
workerId: ''
});
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture',
headers: {'content-type': 'application/json'},
data: {componentId: '', data: '', dataFormat: '', location: '', workerId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"componentId":"","data":"","dataFormat":"","location":"","workerId":""}'
};
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 = @{ @"componentId": @"",
@"data": @"",
@"dataFormat": @"",
@"location": @"",
@"workerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture"]
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture",
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([
'componentId' => '',
'data' => '',
'dataFormat' => '',
'location' => '',
'workerId' => ''
]),
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture', [
'body' => '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'componentId' => '',
'data' => '',
'dataFormat' => '',
'location' => '',
'workerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'componentId' => '',
'data' => '',
'dataFormat' => '',
'location' => '',
'workerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture');
$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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture"
payload = {
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture"
payload <- "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture")
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 \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture') do |req|
req.body = "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture";
let payload = json!({
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
});
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}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture \
--header 'content-type: application/json' \
--data '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}'
echo '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "componentId": "",\n "data": "",\n "dataFormat": "",\n "location": "",\n "workerId": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/debug/sendCapture")! 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
dataflow.projects.jobs.get
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId
QUERY PARAMS
projectId
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"
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}}/v1b3/projects/:projectId/jobs/:jobId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"
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/v1b3/projects/:projectId/jobs/:jobId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"))
.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}}/v1b3/projects/:projectId/jobs/:jobId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
.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}}/v1b3/projects/:projectId/jobs/:jobId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId';
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}}/v1b3/projects/:projectId/jobs/:jobId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/jobs/:jobId',
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}}/v1b3/projects/:projectId/jobs/:jobId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId');
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}}/v1b3/projects/:projectId/jobs/:jobId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId';
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}}/v1b3/projects/:projectId/jobs/:jobId"]
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}}/v1b3/projects/:projectId/jobs/:jobId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId",
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}}/v1b3/projects/:projectId/jobs/:jobId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
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/v1b3/projects/:projectId/jobs/:jobId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId";
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}}/v1b3/projects/:projectId/jobs/:jobId
http GET {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")! 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
dataflow.projects.jobs.getMetrics
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics
QUERY PARAMS
projectId
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics"
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}}/v1b3/projects/:projectId/jobs/:jobId/metrics"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics"
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/v1b3/projects/:projectId/jobs/:jobId/metrics HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics"))
.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}}/v1b3/projects/:projectId/jobs/:jobId/metrics")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics")
.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}}/v1b3/projects/:projectId/jobs/:jobId/metrics');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics';
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}}/v1b3/projects/:projectId/jobs/:jobId/metrics',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/jobs/:jobId/metrics',
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}}/v1b3/projects/:projectId/jobs/:jobId/metrics'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics');
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}}/v1b3/projects/:projectId/jobs/:jobId/metrics'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics';
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}}/v1b3/projects/:projectId/jobs/:jobId/metrics"]
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}}/v1b3/projects/:projectId/jobs/:jobId/metrics" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics",
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}}/v1b3/projects/:projectId/jobs/:jobId/metrics');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId/metrics")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics")
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/v1b3/projects/:projectId/jobs/:jobId/metrics') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics";
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}}/v1b3/projects/:projectId/jobs/:jobId/metrics
http GET {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/metrics")! 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
dataflow.projects.jobs.list
{{baseUrl}}/v1b3/projects/:projectId/jobs
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/jobs")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/jobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/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/v1b3/projects/:projectId/jobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/jobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/jobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/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/v1b3/projects/:projectId/jobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/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}}/v1b3/projects/:projectId/jobs
http GET {{baseUrl}}/v1b3/projects/:projectId/jobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/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()
GET
dataflow.projects.jobs.messages.list
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages
QUERY PARAMS
projectId
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages"
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}}/v1b3/projects/:projectId/jobs/:jobId/messages"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages"
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/v1b3/projects/:projectId/jobs/:jobId/messages HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages"))
.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}}/v1b3/projects/:projectId/jobs/:jobId/messages")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages")
.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}}/v1b3/projects/:projectId/jobs/:jobId/messages');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages';
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}}/v1b3/projects/:projectId/jobs/:jobId/messages',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/jobs/:jobId/messages',
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}}/v1b3/projects/:projectId/jobs/:jobId/messages'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages');
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}}/v1b3/projects/:projectId/jobs/:jobId/messages'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages';
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}}/v1b3/projects/:projectId/jobs/:jobId/messages"]
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}}/v1b3/projects/:projectId/jobs/:jobId/messages" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages",
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}}/v1b3/projects/:projectId/jobs/:jobId/messages');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId/messages")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages")
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/v1b3/projects/:projectId/jobs/:jobId/messages') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages";
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}}/v1b3/projects/:projectId/jobs/:jobId/messages
http GET {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/messages")! 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
dataflow.projects.jobs.snapshot
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot
QUERY PARAMS
projectId
jobId
BODY json
{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot" {:content-type :json
:form-params {:description ""
:location ""
:snapshotSources false
:ttl ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot"),
Content = new StringContent("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot"
payload := strings.NewReader("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId:snapshot HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
location: '',
snapshotSources: false,
ttl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot',
headers: {'content-type': 'application/json'},
data: {description: '', location: '', snapshotSources: false, ttl: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","location":"","snapshotSources":false,"ttl":""}'
};
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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "location": "",\n "snapshotSources": false,\n "ttl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot")
.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/v1b3/projects/:projectId/jobs/:jobId:snapshot',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', location: '', snapshotSources: false, ttl: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot',
headers: {'content-type': 'application/json'},
body: {description: '', location: '', snapshotSources: false, ttl: ''},
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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
location: '',
snapshotSources: false,
ttl: ''
});
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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot',
headers: {'content-type': 'application/json'},
data: {description: '', location: '', snapshotSources: false, ttl: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","location":"","snapshotSources":false,"ttl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"location": @"",
@"snapshotSources": @NO,
@"ttl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot"]
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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'location' => '',
'snapshotSources' => null,
'ttl' => ''
]),
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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot', [
'body' => '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'location' => '',
'snapshotSources' => null,
'ttl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'location' => '',
'snapshotSources' => null,
'ttl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot');
$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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId:snapshot", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot"
payload = {
"description": "",
"location": "",
"snapshotSources": False,
"ttl": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot"
payload <- "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId:snapshot') do |req|
req.body = "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot";
let payload = json!({
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
});
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}}/v1b3/projects/:projectId/jobs/:jobId:snapshot \
--header 'content-type: application/json' \
--data '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}'
echo '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "location": "",\n "snapshotSources": false,\n "ttl": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId:snapshot")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
dataflow.projects.jobs.update
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId
QUERY PARAMS
projectId
jobId
BODY json
{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId");
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 \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId" {:content-type :json
:form-params {:clientRequestId ""
:createTime ""
:createdFromSnapshotId ""
:currentState ""
:currentStateTime ""
:environment {:clusterManagerApiService ""
:dataset ""
:debugOptions {:enableHotKeyLogging false}
:experiments []
:flexResourceSchedulingGoal ""
:internalExperiments {}
:sdkPipelineOptions {}
:serviceAccountEmail ""
:serviceKmsKeyName ""
:serviceOptions []
:shuffleMode ""
:tempStoragePrefix ""
:userAgent {}
:version {}
:workerPools [{:autoscalingSettings {:algorithm ""
:maxNumWorkers 0}
:dataDisks [{:diskType ""
:mountPoint ""
:sizeGb 0}]
:defaultPackageSet ""
:diskSizeGb 0
:diskSourceImage ""
:diskType ""
:ipConfiguration ""
:kind ""
:machineType ""
:metadata {}
:network ""
:numThreadsPerWorker 0
:numWorkers 0
:onHostMaintenance ""
:packages [{:location ""
:name ""}]
:poolArgs {}
:sdkHarnessContainerImages [{:capabilities []
:containerImage ""
:environmentId ""
:useSingleCorePerContainer false}]
:subnetwork ""
:taskrunnerSettings {:alsologtostderr false
:baseTaskDir ""
:baseUrl ""
:commandlinesFileName ""
:continueOnException false
:dataflowApiVersion ""
:harnessCommand ""
:languageHint ""
:logDir ""
:logToSerialconsole false
:logUploadLocation ""
:oauthScopes []
:parallelWorkerSettings {:baseUrl ""
:reportingEnabled false
:servicePath ""
:shuffleServicePath ""
:tempStoragePrefix ""
:workerId ""}
:streamingWorkerMainClass ""
:taskGroup ""
:taskUser ""
:tempStoragePrefix ""
:vmId ""
:workflowFileName ""}
:teardownPolicy ""
:workerHarnessContainerImage ""
:zone ""}]
:workerRegion ""
:workerZone ""}
:executionInfo {:stages {}}
:id ""
:jobMetadata {:bigTableDetails [{:instanceId ""
:projectId ""
:tableId ""}]
:bigqueryDetails [{:dataset ""
:projectId ""
:query ""
:table ""}]
:datastoreDetails [{:namespace ""
:projectId ""}]
:fileDetails [{:filePattern ""}]
:pubsubDetails [{:subscription ""
:topic ""}]
:sdkVersion {:sdkSupportStatus ""
:version ""
:versionDisplayName ""}
:spannerDetails [{:databaseId ""
:instanceId ""
:projectId ""}]
:userDisplayProperties {}}
:labels {}
:location ""
:name ""
:pipelineDescription {:displayData [{:boolValue false
:durationValue ""
:floatValue ""
:int64Value ""
:javaClassValue ""
:key ""
:label ""
:namespace ""
:shortStrValue ""
:strValue ""
:timestampValue ""
:url ""}]
:executionPipelineStage [{:componentSource [{:name ""
:originalTransformOrCollection ""
:userName ""}]
:componentTransform [{:name ""
:originalTransform ""
:userName ""}]
:id ""
:inputSource [{:name ""
:originalTransformOrCollection ""
:sizeBytes ""
:userName ""}]
:kind ""
:name ""
:outputSource [{}]
:prerequisiteStage []}]
:originalPipelineTransform [{:displayData [{}]
:id ""
:inputCollectionName []
:kind ""
:name ""
:outputCollectionName []}]
:stepNamesHash ""}
:projectId ""
:replaceJobId ""
:replacedByJobId ""
:requestedState ""
:satisfiesPzs false
:stageStates [{:currentStateTime ""
:executionStageName ""
:executionStageState ""}]
:startTime ""
:steps [{:kind ""
:name ""
:properties {}}]
:stepsLocation ""
:tempFiles []
:transformNameMapping {}
:type ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"),
Content = new StringContent("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"
payload := strings.NewReader("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1b3/projects/:projectId/jobs/:jobId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5262
{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
.header("content-type", "application/json")
.body("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {
enableHotKeyLogging: false
},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {
algorithm: '',
maxNumWorkers: 0
},
dataDisks: [
{
diskType: '',
mountPoint: '',
sizeGb: 0
}
],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [
{
location: '',
name: ''
}
],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {
stages: {}
},
id: '',
jobMetadata: {
bigTableDetails: [
{
instanceId: '',
projectId: '',
tableId: ''
}
],
bigqueryDetails: [
{
dataset: '',
projectId: '',
query: '',
table: ''
}
],
datastoreDetails: [
{
namespace: '',
projectId: ''
}
],
fileDetails: [
{
filePattern: ''
}
],
pubsubDetails: [
{
subscription: '',
topic: ''
}
],
sdkVersion: {
sdkSupportStatus: '',
version: '',
versionDisplayName: ''
},
spannerDetails: [
{
databaseId: '',
instanceId: '',
projectId: ''
}
],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [
{
name: '',
originalTransformOrCollection: '',
userName: ''
}
],
componentTransform: [
{
name: '',
originalTransform: '',
userName: ''
}
],
id: '',
inputSource: [
{
name: '',
originalTransformOrCollection: '',
sizeBytes: '',
userName: ''
}
],
kind: '',
name: '',
outputSource: [
{}
],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [
{}
],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [
{
currentStateTime: '',
executionStageName: '',
executionStageState: ''
}
],
startTime: '',
steps: [
{
kind: '',
name: '',
properties: {}
}
],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId',
headers: {'content-type': 'application/json'},
data: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"clientRequestId":"","createTime":"","createdFromSnapshotId":"","currentState":"","currentStateTime":"","environment":{"clusterManagerApiService":"","dataset":"","debugOptions":{"enableHotKeyLogging":false},"experiments":[],"flexResourceSchedulingGoal":"","internalExperiments":{},"sdkPipelineOptions":{},"serviceAccountEmail":"","serviceKmsKeyName":"","serviceOptions":[],"shuffleMode":"","tempStoragePrefix":"","userAgent":{},"version":{},"workerPools":[{"autoscalingSettings":{"algorithm":"","maxNumWorkers":0},"dataDisks":[{"diskType":"","mountPoint":"","sizeGb":0}],"defaultPackageSet":"","diskSizeGb":0,"diskSourceImage":"","diskType":"","ipConfiguration":"","kind":"","machineType":"","metadata":{},"network":"","numThreadsPerWorker":0,"numWorkers":0,"onHostMaintenance":"","packages":[{"location":"","name":""}],"poolArgs":{},"sdkHarnessContainerImages":[{"capabilities":[],"containerImage":"","environmentId":"","useSingleCorePerContainer":false}],"subnetwork":"","taskrunnerSettings":{"alsologtostderr":false,"baseTaskDir":"","baseUrl":"","commandlinesFileName":"","continueOnException":false,"dataflowApiVersion":"","harnessCommand":"","languageHint":"","logDir":"","logToSerialconsole":false,"logUploadLocation":"","oauthScopes":[],"parallelWorkerSettings":{"baseUrl":"","reportingEnabled":false,"servicePath":"","shuffleServicePath":"","tempStoragePrefix":"","workerId":""},"streamingWorkerMainClass":"","taskGroup":"","taskUser":"","tempStoragePrefix":"","vmId":"","workflowFileName":""},"teardownPolicy":"","workerHarnessContainerImage":"","zone":""}],"workerRegion":"","workerZone":""},"executionInfo":{"stages":{}},"id":"","jobMetadata":{"bigTableDetails":[{"instanceId":"","projectId":"","tableId":""}],"bigqueryDetails":[{"dataset":"","projectId":"","query":"","table":""}],"datastoreDetails":[{"namespace":"","projectId":""}],"fileDetails":[{"filePattern":""}],"pubsubDetails":[{"subscription":"","topic":""}],"sdkVersion":{"sdkSupportStatus":"","version":"","versionDisplayName":""},"spannerDetails":[{"databaseId":"","instanceId":"","projectId":""}],"userDisplayProperties":{}},"labels":{},"location":"","name":"","pipelineDescription":{"displayData":[{"boolValue":false,"durationValue":"","floatValue":"","int64Value":"","javaClassValue":"","key":"","label":"","namespace":"","shortStrValue":"","strValue":"","timestampValue":"","url":""}],"executionPipelineStage":[{"componentSource":[{"name":"","originalTransformOrCollection":"","userName":""}],"componentTransform":[{"name":"","originalTransform":"","userName":""}],"id":"","inputSource":[{"name":"","originalTransformOrCollection":"","sizeBytes":"","userName":""}],"kind":"","name":"","outputSource":[{}],"prerequisiteStage":[]}],"originalPipelineTransform":[{"displayData":[{}],"id":"","inputCollectionName":[],"kind":"","name":"","outputCollectionName":[]}],"stepNamesHash":""},"projectId":"","replaceJobId":"","replacedByJobId":"","requestedState":"","satisfiesPzs":false,"stageStates":[{"currentStateTime":"","executionStageName":"","executionStageState":""}],"startTime":"","steps":[{"kind":"","name":"","properties":{}}],"stepsLocation":"","tempFiles":[],"transformNameMapping":{},"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientRequestId": "",\n "createTime": "",\n "createdFromSnapshotId": "",\n "currentState": "",\n "currentStateTime": "",\n "environment": {\n "clusterManagerApiService": "",\n "dataset": "",\n "debugOptions": {\n "enableHotKeyLogging": false\n },\n "experiments": [],\n "flexResourceSchedulingGoal": "",\n "internalExperiments": {},\n "sdkPipelineOptions": {},\n "serviceAccountEmail": "",\n "serviceKmsKeyName": "",\n "serviceOptions": [],\n "shuffleMode": "",\n "tempStoragePrefix": "",\n "userAgent": {},\n "version": {},\n "workerPools": [\n {\n "autoscalingSettings": {\n "algorithm": "",\n "maxNumWorkers": 0\n },\n "dataDisks": [\n {\n "diskType": "",\n "mountPoint": "",\n "sizeGb": 0\n }\n ],\n "defaultPackageSet": "",\n "diskSizeGb": 0,\n "diskSourceImage": "",\n "diskType": "",\n "ipConfiguration": "",\n "kind": "",\n "machineType": "",\n "metadata": {},\n "network": "",\n "numThreadsPerWorker": 0,\n "numWorkers": 0,\n "onHostMaintenance": "",\n "packages": [\n {\n "location": "",\n "name": ""\n }\n ],\n "poolArgs": {},\n "sdkHarnessContainerImages": [\n {\n "capabilities": [],\n "containerImage": "",\n "environmentId": "",\n "useSingleCorePerContainer": false\n }\n ],\n "subnetwork": "",\n "taskrunnerSettings": {\n "alsologtostderr": false,\n "baseTaskDir": "",\n "baseUrl": "",\n "commandlinesFileName": "",\n "continueOnException": false,\n "dataflowApiVersion": "",\n "harnessCommand": "",\n "languageHint": "",\n "logDir": "",\n "logToSerialconsole": false,\n "logUploadLocation": "",\n "oauthScopes": [],\n "parallelWorkerSettings": {\n "baseUrl": "",\n "reportingEnabled": false,\n "servicePath": "",\n "shuffleServicePath": "",\n "tempStoragePrefix": "",\n "workerId": ""\n },\n "streamingWorkerMainClass": "",\n "taskGroup": "",\n "taskUser": "",\n "tempStoragePrefix": "",\n "vmId": "",\n "workflowFileName": ""\n },\n "teardownPolicy": "",\n "workerHarnessContainerImage": "",\n "zone": ""\n }\n ],\n "workerRegion": "",\n "workerZone": ""\n },\n "executionInfo": {\n "stages": {}\n },\n "id": "",\n "jobMetadata": {\n "bigTableDetails": [\n {\n "instanceId": "",\n "projectId": "",\n "tableId": ""\n }\n ],\n "bigqueryDetails": [\n {\n "dataset": "",\n "projectId": "",\n "query": "",\n "table": ""\n }\n ],\n "datastoreDetails": [\n {\n "namespace": "",\n "projectId": ""\n }\n ],\n "fileDetails": [\n {\n "filePattern": ""\n }\n ],\n "pubsubDetails": [\n {\n "subscription": "",\n "topic": ""\n }\n ],\n "sdkVersion": {\n "sdkSupportStatus": "",\n "version": "",\n "versionDisplayName": ""\n },\n "spannerDetails": [\n {\n "databaseId": "",\n "instanceId": "",\n "projectId": ""\n }\n ],\n "userDisplayProperties": {}\n },\n "labels": {},\n "location": "",\n "name": "",\n "pipelineDescription": {\n "displayData": [\n {\n "boolValue": false,\n "durationValue": "",\n "floatValue": "",\n "int64Value": "",\n "javaClassValue": "",\n "key": "",\n "label": "",\n "namespace": "",\n "shortStrValue": "",\n "strValue": "",\n "timestampValue": "",\n "url": ""\n }\n ],\n "executionPipelineStage": [\n {\n "componentSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "userName": ""\n }\n ],\n "componentTransform": [\n {\n "name": "",\n "originalTransform": "",\n "userName": ""\n }\n ],\n "id": "",\n "inputSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "sizeBytes": "",\n "userName": ""\n }\n ],\n "kind": "",\n "name": "",\n "outputSource": [\n {}\n ],\n "prerequisiteStage": []\n }\n ],\n "originalPipelineTransform": [\n {\n "displayData": [\n {}\n ],\n "id": "",\n "inputCollectionName": [],\n "kind": "",\n "name": "",\n "outputCollectionName": []\n }\n ],\n "stepNamesHash": ""\n },\n "projectId": "",\n "replaceJobId": "",\n "replacedByJobId": "",\n "requestedState": "",\n "satisfiesPzs": false,\n "stageStates": [\n {\n "currentStateTime": "",\n "executionStageName": "",\n "executionStageState": ""\n }\n ],\n "startTime": "",\n "steps": [\n {\n "kind": "",\n "name": "",\n "properties": {}\n }\n ],\n "stepsLocation": "",\n "tempFiles": [],\n "transformNameMapping": {},\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/jobs/:jobId',
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({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId',
headers: {'content-type': 'application/json'},
body: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {
enableHotKeyLogging: false
},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {
algorithm: '',
maxNumWorkers: 0
},
dataDisks: [
{
diskType: '',
mountPoint: '',
sizeGb: 0
}
],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [
{
location: '',
name: ''
}
],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {
stages: {}
},
id: '',
jobMetadata: {
bigTableDetails: [
{
instanceId: '',
projectId: '',
tableId: ''
}
],
bigqueryDetails: [
{
dataset: '',
projectId: '',
query: '',
table: ''
}
],
datastoreDetails: [
{
namespace: '',
projectId: ''
}
],
fileDetails: [
{
filePattern: ''
}
],
pubsubDetails: [
{
subscription: '',
topic: ''
}
],
sdkVersion: {
sdkSupportStatus: '',
version: '',
versionDisplayName: ''
},
spannerDetails: [
{
databaseId: '',
instanceId: '',
projectId: ''
}
],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [
{
name: '',
originalTransformOrCollection: '',
userName: ''
}
],
componentTransform: [
{
name: '',
originalTransform: '',
userName: ''
}
],
id: '',
inputSource: [
{
name: '',
originalTransformOrCollection: '',
sizeBytes: '',
userName: ''
}
],
kind: '',
name: '',
outputSource: [
{}
],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [
{}
],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [
{
currentStateTime: '',
executionStageName: '',
executionStageState: ''
}
],
startTime: '',
steps: [
{
kind: '',
name: '',
properties: {}
}
],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId',
headers: {'content-type': 'application/json'},
data: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"clientRequestId":"","createTime":"","createdFromSnapshotId":"","currentState":"","currentStateTime":"","environment":{"clusterManagerApiService":"","dataset":"","debugOptions":{"enableHotKeyLogging":false},"experiments":[],"flexResourceSchedulingGoal":"","internalExperiments":{},"sdkPipelineOptions":{},"serviceAccountEmail":"","serviceKmsKeyName":"","serviceOptions":[],"shuffleMode":"","tempStoragePrefix":"","userAgent":{},"version":{},"workerPools":[{"autoscalingSettings":{"algorithm":"","maxNumWorkers":0},"dataDisks":[{"diskType":"","mountPoint":"","sizeGb":0}],"defaultPackageSet":"","diskSizeGb":0,"diskSourceImage":"","diskType":"","ipConfiguration":"","kind":"","machineType":"","metadata":{},"network":"","numThreadsPerWorker":0,"numWorkers":0,"onHostMaintenance":"","packages":[{"location":"","name":""}],"poolArgs":{},"sdkHarnessContainerImages":[{"capabilities":[],"containerImage":"","environmentId":"","useSingleCorePerContainer":false}],"subnetwork":"","taskrunnerSettings":{"alsologtostderr":false,"baseTaskDir":"","baseUrl":"","commandlinesFileName":"","continueOnException":false,"dataflowApiVersion":"","harnessCommand":"","languageHint":"","logDir":"","logToSerialconsole":false,"logUploadLocation":"","oauthScopes":[],"parallelWorkerSettings":{"baseUrl":"","reportingEnabled":false,"servicePath":"","shuffleServicePath":"","tempStoragePrefix":"","workerId":""},"streamingWorkerMainClass":"","taskGroup":"","taskUser":"","tempStoragePrefix":"","vmId":"","workflowFileName":""},"teardownPolicy":"","workerHarnessContainerImage":"","zone":""}],"workerRegion":"","workerZone":""},"executionInfo":{"stages":{}},"id":"","jobMetadata":{"bigTableDetails":[{"instanceId":"","projectId":"","tableId":""}],"bigqueryDetails":[{"dataset":"","projectId":"","query":"","table":""}],"datastoreDetails":[{"namespace":"","projectId":""}],"fileDetails":[{"filePattern":""}],"pubsubDetails":[{"subscription":"","topic":""}],"sdkVersion":{"sdkSupportStatus":"","version":"","versionDisplayName":""},"spannerDetails":[{"databaseId":"","instanceId":"","projectId":""}],"userDisplayProperties":{}},"labels":{},"location":"","name":"","pipelineDescription":{"displayData":[{"boolValue":false,"durationValue":"","floatValue":"","int64Value":"","javaClassValue":"","key":"","label":"","namespace":"","shortStrValue":"","strValue":"","timestampValue":"","url":""}],"executionPipelineStage":[{"componentSource":[{"name":"","originalTransformOrCollection":"","userName":""}],"componentTransform":[{"name":"","originalTransform":"","userName":""}],"id":"","inputSource":[{"name":"","originalTransformOrCollection":"","sizeBytes":"","userName":""}],"kind":"","name":"","outputSource":[{}],"prerequisiteStage":[]}],"originalPipelineTransform":[{"displayData":[{}],"id":"","inputCollectionName":[],"kind":"","name":"","outputCollectionName":[]}],"stepNamesHash":""},"projectId":"","replaceJobId":"","replacedByJobId":"","requestedState":"","satisfiesPzs":false,"stageStates":[{"currentStateTime":"","executionStageName":"","executionStageState":""}],"startTime":"","steps":[{"kind":"","name":"","properties":{}}],"stepsLocation":"","tempFiles":[],"transformNameMapping":{},"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientRequestId": @"",
@"createTime": @"",
@"createdFromSnapshotId": @"",
@"currentState": @"",
@"currentStateTime": @"",
@"environment": @{ @"clusterManagerApiService": @"", @"dataset": @"", @"debugOptions": @{ @"enableHotKeyLogging": @NO }, @"experiments": @[ ], @"flexResourceSchedulingGoal": @"", @"internalExperiments": @{ }, @"sdkPipelineOptions": @{ }, @"serviceAccountEmail": @"", @"serviceKmsKeyName": @"", @"serviceOptions": @[ ], @"shuffleMode": @"", @"tempStoragePrefix": @"", @"userAgent": @{ }, @"version": @{ }, @"workerPools": @[ @{ @"autoscalingSettings": @{ @"algorithm": @"", @"maxNumWorkers": @0 }, @"dataDisks": @[ @{ @"diskType": @"", @"mountPoint": @"", @"sizeGb": @0 } ], @"defaultPackageSet": @"", @"diskSizeGb": @0, @"diskSourceImage": @"", @"diskType": @"", @"ipConfiguration": @"", @"kind": @"", @"machineType": @"", @"metadata": @{ }, @"network": @"", @"numThreadsPerWorker": @0, @"numWorkers": @0, @"onHostMaintenance": @"", @"packages": @[ @{ @"location": @"", @"name": @"" } ], @"poolArgs": @{ }, @"sdkHarnessContainerImages": @[ @{ @"capabilities": @[ ], @"containerImage": @"", @"environmentId": @"", @"useSingleCorePerContainer": @NO } ], @"subnetwork": @"", @"taskrunnerSettings": @{ @"alsologtostderr": @NO, @"baseTaskDir": @"", @"baseUrl": @"", @"commandlinesFileName": @"", @"continueOnException": @NO, @"dataflowApiVersion": @"", @"harnessCommand": @"", @"languageHint": @"", @"logDir": @"", @"logToSerialconsole": @NO, @"logUploadLocation": @"", @"oauthScopes": @[ ], @"parallelWorkerSettings": @{ @"baseUrl": @"", @"reportingEnabled": @NO, @"servicePath": @"", @"shuffleServicePath": @"", @"tempStoragePrefix": @"", @"workerId": @"" }, @"streamingWorkerMainClass": @"", @"taskGroup": @"", @"taskUser": @"", @"tempStoragePrefix": @"", @"vmId": @"", @"workflowFileName": @"" }, @"teardownPolicy": @"", @"workerHarnessContainerImage": @"", @"zone": @"" } ], @"workerRegion": @"", @"workerZone": @"" },
@"executionInfo": @{ @"stages": @{ } },
@"id": @"",
@"jobMetadata": @{ @"bigTableDetails": @[ @{ @"instanceId": @"", @"projectId": @"", @"tableId": @"" } ], @"bigqueryDetails": @[ @{ @"dataset": @"", @"projectId": @"", @"query": @"", @"table": @"" } ], @"datastoreDetails": @[ @{ @"namespace": @"", @"projectId": @"" } ], @"fileDetails": @[ @{ @"filePattern": @"" } ], @"pubsubDetails": @[ @{ @"subscription": @"", @"topic": @"" } ], @"sdkVersion": @{ @"sdkSupportStatus": @"", @"version": @"", @"versionDisplayName": @"" }, @"spannerDetails": @[ @{ @"databaseId": @"", @"instanceId": @"", @"projectId": @"" } ], @"userDisplayProperties": @{ } },
@"labels": @{ },
@"location": @"",
@"name": @"",
@"pipelineDescription": @{ @"displayData": @[ @{ @"boolValue": @NO, @"durationValue": @"", @"floatValue": @"", @"int64Value": @"", @"javaClassValue": @"", @"key": @"", @"label": @"", @"namespace": @"", @"shortStrValue": @"", @"strValue": @"", @"timestampValue": @"", @"url": @"" } ], @"executionPipelineStage": @[ @{ @"componentSource": @[ @{ @"name": @"", @"originalTransformOrCollection": @"", @"userName": @"" } ], @"componentTransform": @[ @{ @"name": @"", @"originalTransform": @"", @"userName": @"" } ], @"id": @"", @"inputSource": @[ @{ @"name": @"", @"originalTransformOrCollection": @"", @"sizeBytes": @"", @"userName": @"" } ], @"kind": @"", @"name": @"", @"outputSource": @[ @{ } ], @"prerequisiteStage": @[ ] } ], @"originalPipelineTransform": @[ @{ @"displayData": @[ @{ } ], @"id": @"", @"inputCollectionName": @[ ], @"kind": @"", @"name": @"", @"outputCollectionName": @[ ] } ], @"stepNamesHash": @"" },
@"projectId": @"",
@"replaceJobId": @"",
@"replacedByJobId": @"",
@"requestedState": @"",
@"satisfiesPzs": @NO,
@"stageStates": @[ @{ @"currentStateTime": @"", @"executionStageName": @"", @"executionStageState": @"" } ],
@"startTime": @"",
@"steps": @[ @{ @"kind": @"", @"name": @"", @"properties": @{ } } ],
@"stepsLocation": @"",
@"tempFiles": @[ ],
@"transformNameMapping": @{ },
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId', [
'body' => '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"
payload = {
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": { "enableHotKeyLogging": False },
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": False
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": False,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": False,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": False,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": False,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": { "stages": {} },
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [{ "filePattern": "" }],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": False,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [{}],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [{}],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": False,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId"
payload <- "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1b3/projects/:projectId/jobs/:jobId') do |req|
req.body = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId";
let payload = json!({
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": json!({
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": json!({"enableHotKeyLogging": false}),
"experiments": (),
"flexResourceSchedulingGoal": "",
"internalExperiments": json!({}),
"sdkPipelineOptions": json!({}),
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": (),
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": json!({}),
"version": json!({}),
"workerPools": (
json!({
"autoscalingSettings": json!({
"algorithm": "",
"maxNumWorkers": 0
}),
"dataDisks": (
json!({
"diskType": "",
"mountPoint": "",
"sizeGb": 0
})
),
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": json!({}),
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": (
json!({
"location": "",
"name": ""
})
),
"poolArgs": json!({}),
"sdkHarnessContainerImages": (
json!({
"capabilities": (),
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
})
),
"subnetwork": "",
"taskrunnerSettings": json!({
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": (),
"parallelWorkerSettings": json!({
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
}),
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
}),
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
})
),
"workerRegion": "",
"workerZone": ""
}),
"executionInfo": json!({"stages": json!({})}),
"id": "",
"jobMetadata": json!({
"bigTableDetails": (
json!({
"instanceId": "",
"projectId": "",
"tableId": ""
})
),
"bigqueryDetails": (
json!({
"dataset": "",
"projectId": "",
"query": "",
"table": ""
})
),
"datastoreDetails": (
json!({
"namespace": "",
"projectId": ""
})
),
"fileDetails": (json!({"filePattern": ""})),
"pubsubDetails": (
json!({
"subscription": "",
"topic": ""
})
),
"sdkVersion": json!({
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
}),
"spannerDetails": (
json!({
"databaseId": "",
"instanceId": "",
"projectId": ""
})
),
"userDisplayProperties": json!({})
}),
"labels": json!({}),
"location": "",
"name": "",
"pipelineDescription": json!({
"displayData": (
json!({
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
})
),
"executionPipelineStage": (
json!({
"componentSource": (
json!({
"name": "",
"originalTransformOrCollection": "",
"userName": ""
})
),
"componentTransform": (
json!({
"name": "",
"originalTransform": "",
"userName": ""
})
),
"id": "",
"inputSource": (
json!({
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
})
),
"kind": "",
"name": "",
"outputSource": (json!({})),
"prerequisiteStage": ()
})
),
"originalPipelineTransform": (
json!({
"displayData": (json!({})),
"id": "",
"inputCollectionName": (),
"kind": "",
"name": "",
"outputCollectionName": ()
})
),
"stepNamesHash": ""
}),
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": (
json!({
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
})
),
"startTime": "",
"steps": (
json!({
"kind": "",
"name": "",
"properties": json!({})
})
),
"stepsLocation": "",
"tempFiles": (),
"transformNameMapping": json!({}),
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId \
--header 'content-type: application/json' \
--data '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
echo '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}' | \
http PUT {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "clientRequestId": "",\n "createTime": "",\n "createdFromSnapshotId": "",\n "currentState": "",\n "currentStateTime": "",\n "environment": {\n "clusterManagerApiService": "",\n "dataset": "",\n "debugOptions": {\n "enableHotKeyLogging": false\n },\n "experiments": [],\n "flexResourceSchedulingGoal": "",\n "internalExperiments": {},\n "sdkPipelineOptions": {},\n "serviceAccountEmail": "",\n "serviceKmsKeyName": "",\n "serviceOptions": [],\n "shuffleMode": "",\n "tempStoragePrefix": "",\n "userAgent": {},\n "version": {},\n "workerPools": [\n {\n "autoscalingSettings": {\n "algorithm": "",\n "maxNumWorkers": 0\n },\n "dataDisks": [\n {\n "diskType": "",\n "mountPoint": "",\n "sizeGb": 0\n }\n ],\n "defaultPackageSet": "",\n "diskSizeGb": 0,\n "diskSourceImage": "",\n "diskType": "",\n "ipConfiguration": "",\n "kind": "",\n "machineType": "",\n "metadata": {},\n "network": "",\n "numThreadsPerWorker": 0,\n "numWorkers": 0,\n "onHostMaintenance": "",\n "packages": [\n {\n "location": "",\n "name": ""\n }\n ],\n "poolArgs": {},\n "sdkHarnessContainerImages": [\n {\n "capabilities": [],\n "containerImage": "",\n "environmentId": "",\n "useSingleCorePerContainer": false\n }\n ],\n "subnetwork": "",\n "taskrunnerSettings": {\n "alsologtostderr": false,\n "baseTaskDir": "",\n "baseUrl": "",\n "commandlinesFileName": "",\n "continueOnException": false,\n "dataflowApiVersion": "",\n "harnessCommand": "",\n "languageHint": "",\n "logDir": "",\n "logToSerialconsole": false,\n "logUploadLocation": "",\n "oauthScopes": [],\n "parallelWorkerSettings": {\n "baseUrl": "",\n "reportingEnabled": false,\n "servicePath": "",\n "shuffleServicePath": "",\n "tempStoragePrefix": "",\n "workerId": ""\n },\n "streamingWorkerMainClass": "",\n "taskGroup": "",\n "taskUser": "",\n "tempStoragePrefix": "",\n "vmId": "",\n "workflowFileName": ""\n },\n "teardownPolicy": "",\n "workerHarnessContainerImage": "",\n "zone": ""\n }\n ],\n "workerRegion": "",\n "workerZone": ""\n },\n "executionInfo": {\n "stages": {}\n },\n "id": "",\n "jobMetadata": {\n "bigTableDetails": [\n {\n "instanceId": "",\n "projectId": "",\n "tableId": ""\n }\n ],\n "bigqueryDetails": [\n {\n "dataset": "",\n "projectId": "",\n "query": "",\n "table": ""\n }\n ],\n "datastoreDetails": [\n {\n "namespace": "",\n "projectId": ""\n }\n ],\n "fileDetails": [\n {\n "filePattern": ""\n }\n ],\n "pubsubDetails": [\n {\n "subscription": "",\n "topic": ""\n }\n ],\n "sdkVersion": {\n "sdkSupportStatus": "",\n "version": "",\n "versionDisplayName": ""\n },\n "spannerDetails": [\n {\n "databaseId": "",\n "instanceId": "",\n "projectId": ""\n }\n ],\n "userDisplayProperties": {}\n },\n "labels": {},\n "location": "",\n "name": "",\n "pipelineDescription": {\n "displayData": [\n {\n "boolValue": false,\n "durationValue": "",\n "floatValue": "",\n "int64Value": "",\n "javaClassValue": "",\n "key": "",\n "label": "",\n "namespace": "",\n "shortStrValue": "",\n "strValue": "",\n "timestampValue": "",\n "url": ""\n }\n ],\n "executionPipelineStage": [\n {\n "componentSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "userName": ""\n }\n ],\n "componentTransform": [\n {\n "name": "",\n "originalTransform": "",\n "userName": ""\n }\n ],\n "id": "",\n "inputSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "sizeBytes": "",\n "userName": ""\n }\n ],\n "kind": "",\n "name": "",\n "outputSource": [\n {}\n ],\n "prerequisiteStage": []\n }\n ],\n "originalPipelineTransform": [\n {\n "displayData": [\n {}\n ],\n "id": "",\n "inputCollectionName": [],\n "kind": "",\n "name": "",\n "outputCollectionName": []\n }\n ],\n "stepNamesHash": ""\n },\n "projectId": "",\n "replaceJobId": "",\n "replacedByJobId": "",\n "requestedState": "",\n "satisfiesPzs": false,\n "stageStates": [\n {\n "currentStateTime": "",\n "executionStageName": "",\n "executionStageState": ""\n }\n ],\n "startTime": "",\n "steps": [\n {\n "kind": "",\n "name": "",\n "properties": {}\n }\n ],\n "stepsLocation": "",\n "tempFiles": [],\n "transformNameMapping": {},\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": [
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": ["enableHotKeyLogging": false],
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": [],
"sdkPipelineOptions": [],
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": [],
"version": [],
"workerPools": [
[
"autoscalingSettings": [
"algorithm": "",
"maxNumWorkers": 0
],
"dataDisks": [
[
"diskType": "",
"mountPoint": "",
"sizeGb": 0
]
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": [],
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
[
"location": "",
"name": ""
]
],
"poolArgs": [],
"sdkHarnessContainerImages": [
[
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
]
],
"subnetwork": "",
"taskrunnerSettings": [
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": [
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
],
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
],
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
]
],
"workerRegion": "",
"workerZone": ""
],
"executionInfo": ["stages": []],
"id": "",
"jobMetadata": [
"bigTableDetails": [
[
"instanceId": "",
"projectId": "",
"tableId": ""
]
],
"bigqueryDetails": [
[
"dataset": "",
"projectId": "",
"query": "",
"table": ""
]
],
"datastoreDetails": [
[
"namespace": "",
"projectId": ""
]
],
"fileDetails": [["filePattern": ""]],
"pubsubDetails": [
[
"subscription": "",
"topic": ""
]
],
"sdkVersion": [
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
],
"spannerDetails": [
[
"databaseId": "",
"instanceId": "",
"projectId": ""
]
],
"userDisplayProperties": []
],
"labels": [],
"location": "",
"name": "",
"pipelineDescription": [
"displayData": [
[
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
]
],
"executionPipelineStage": [
[
"componentSource": [
[
"name": "",
"originalTransformOrCollection": "",
"userName": ""
]
],
"componentTransform": [
[
"name": "",
"originalTransform": "",
"userName": ""
]
],
"id": "",
"inputSource": [
[
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
]
],
"kind": "",
"name": "",
"outputSource": [[]],
"prerequisiteStage": []
]
],
"originalPipelineTransform": [
[
"displayData": [[]],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
]
],
"stepNamesHash": ""
],
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
[
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
]
],
"startTime": "",
"steps": [
[
"kind": "",
"name": "",
"properties": []
]
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": [],
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.jobs.workItems.lease
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease
QUERY PARAMS
projectId
jobId
BODY json
{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease");
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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease" {:content-type :json
:form-params {:currentWorkerTime ""
:location ""
:requestedLeaseDuration ""
:unifiedWorkerRequest {}
:workItemTypes []
:workerCapabilities []
:workerId ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease"),
Content = new StringContent("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease"
payload := strings.NewReader("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId/workItems:lease HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 178
{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease")
.setHeader("content-type", "application/json")
.setBody("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease")
.header("content-type", "application/json")
.body("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease',
headers: {'content-type': 'application/json'},
data: {
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"currentWorkerTime":"","location":"","requestedLeaseDuration":"","unifiedWorkerRequest":{},"workItemTypes":[],"workerCapabilities":[],"workerId":""}'
};
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "currentWorkerTime": "",\n "location": "",\n "requestedLeaseDuration": "",\n "unifiedWorkerRequest": {},\n "workItemTypes": [],\n "workerCapabilities": [],\n "workerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease")
.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/v1b3/projects/:projectId/jobs/:jobId/workItems:lease',
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({
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease',
headers: {'content-type': 'application/json'},
body: {
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
},
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
});
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease',
headers: {'content-type': 'application/json'},
data: {
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"currentWorkerTime":"","location":"","requestedLeaseDuration":"","unifiedWorkerRequest":{},"workItemTypes":[],"workerCapabilities":[],"workerId":""}'
};
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 = @{ @"currentWorkerTime": @"",
@"location": @"",
@"requestedLeaseDuration": @"",
@"unifiedWorkerRequest": @{ },
@"workItemTypes": @[ ],
@"workerCapabilities": @[ ],
@"workerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease"]
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease",
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([
'currentWorkerTime' => '',
'location' => '',
'requestedLeaseDuration' => '',
'unifiedWorkerRequest' => [
],
'workItemTypes' => [
],
'workerCapabilities' => [
],
'workerId' => ''
]),
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease', [
'body' => '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currentWorkerTime' => '',
'location' => '',
'requestedLeaseDuration' => '',
'unifiedWorkerRequest' => [
],
'workItemTypes' => [
],
'workerCapabilities' => [
],
'workerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currentWorkerTime' => '',
'location' => '',
'requestedLeaseDuration' => '',
'unifiedWorkerRequest' => [
],
'workItemTypes' => [
],
'workerCapabilities' => [
],
'workerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease');
$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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId/workItems:lease", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease"
payload = {
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease"
payload <- "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease")
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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId/workItems:lease') do |req|
req.body = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease";
let payload = json!({
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": json!({}),
"workItemTypes": (),
"workerCapabilities": (),
"workerId": ""
});
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease \
--header 'content-type: application/json' \
--data '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}'
echo '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "currentWorkerTime": "",\n "location": "",\n "requestedLeaseDuration": "",\n "unifiedWorkerRequest": {},\n "workItemTypes": [],\n "workerCapabilities": [],\n "workerId": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": [],
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:lease")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.jobs.workItems.reportStatus
{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus
QUERY PARAMS
projectId
jobId
BODY json
{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus");
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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus" {:content-type :json
:form-params {:currentWorkerTime ""
:location ""
:unifiedWorkerRequest {}
:workItemStatuses [{:completed false
:counterUpdates [{:boolean false
:cumulative false
:distribution {:count {:highBits 0
:lowBits 0}
:histogram {:bucketCounts []
:firstBucketOffset 0}
:max {}
:min {}
:sum {}
:sumOfSquares ""}
:floatingPoint ""
:floatingPointList {:elements []}
:floatingPointMean {:count {}
:sum ""}
:integer {}
:integerGauge {:timestamp ""
:value {}}
:integerList {:elements [{}]}
:integerMean {:count {}
:sum {}}
:internal ""
:nameAndKind {:kind ""
:name ""}
:shortId ""
:stringList {:elements []}
:structuredNameAndMetadata {:metadata {:description ""
:kind ""
:otherUnits ""
:standardUnits ""}
:name {:componentStepName ""
:executionStepName ""
:inputIndex 0
:name ""
:origin ""
:originNamespace ""
:originalRequestingStepName ""
:originalStepName ""
:portion ""
:workerId ""}}}]
:dynamicSourceSplit {:primary {:derivationMode ""
:source {:baseSpecs [{}]
:codec {}
:doesNotNeedSplitting false
:metadata {:estimatedSizeBytes ""
:infinite false
:producesSortedKeys false}
:spec {}}}
:residual {}}
:errors [{:code 0
:details [{}]
:message ""}]
:metricUpdates [{:cumulative false
:distribution ""
:gauge ""
:internal ""
:kind ""
:meanCount ""
:meanSum ""
:name {:context {}
:name ""
:origin ""}
:scalar ""
:set ""
:updateTime ""}]
:progress {:percentComplete ""
:position {:byteOffset ""
:concatPosition {:index 0
:position ""}
:end false
:key ""
:recordIndex ""
:shufflePosition ""}
:remainingTime ""}
:reportIndex ""
:reportedProgress {:consumedParallelism {:isInfinite false
:value ""}
:fractionConsumed ""
:position {}
:remainingParallelism {}}
:requestedLeaseDuration ""
:sourceFork {:primary {:derivationMode ""
:source {}}
:primarySource {}
:residual {}
:residualSource {}}
:sourceOperationResponse {:getMetadata {:metadata {}}
:split {:bundles [{}]
:outcome ""
:shards [{}]}}
:stopPosition {}
:totalThrottlerWaitTimeSeconds ""
:workItemId ""}]
:workerId ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus"),
Content = new StringContent("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus"
payload := strings.NewReader("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4141
{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus")
.setHeader("content-type", "application/json")
.setBody("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus")
.header("content-type", "application/json")
.body("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {
highBits: 0,
lowBits: 0
},
histogram: {
bucketCounts: [],
firstBucketOffset: 0
},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {
elements: []
},
floatingPointMean: {
count: {},
sum: ''
},
integer: {},
integerGauge: {
timestamp: '',
value: {}
},
integerList: {
elements: [
{}
]
},
integerMean: {
count: {},
sum: {}
},
internal: '',
nameAndKind: {
kind: '',
name: ''
},
shortId: '',
stringList: {
elements: []
},
structuredNameAndMetadata: {
metadata: {
description: '',
kind: '',
otherUnits: '',
standardUnits: ''
},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [
{}
],
codec: {},
doesNotNeedSplitting: false,
metadata: {
estimatedSizeBytes: '',
infinite: false,
producesSortedKeys: false
},
spec: {}
}
},
residual: {}
},
errors: [
{
code: 0,
details: [
{}
],
message: ''
}
],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {
context: {},
name: '',
origin: ''
},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {
index: 0,
position: ''
},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {
isInfinite: false,
value: ''
},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {
derivationMode: '',
source: {}
},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {
getMetadata: {
metadata: {}
},
split: {
bundles: [
{}
],
outcome: '',
shards: [
{}
]
}
},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus',
headers: {'content-type': 'application/json'},
data: {
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {highBits: 0, lowBits: 0},
histogram: {bucketCounts: [], firstBucketOffset: 0},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {elements: []},
floatingPointMean: {count: {}, sum: ''},
integer: {},
integerGauge: {timestamp: '', value: {}},
integerList: {elements: [{}]},
integerMean: {count: {}, sum: {}},
internal: '',
nameAndKind: {kind: '', name: ''},
shortId: '',
stringList: {elements: []},
structuredNameAndMetadata: {
metadata: {description: '', kind: '', otherUnits: '', standardUnits: ''},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [{}],
codec: {},
doesNotNeedSplitting: false,
metadata: {estimatedSizeBytes: '', infinite: false, producesSortedKeys: false},
spec: {}
}
},
residual: {}
},
errors: [{code: 0, details: [{}], message: ''}],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {context: {}, name: '', origin: ''},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {index: 0, position: ''},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {isInfinite: false, value: ''},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {derivationMode: '', source: {}},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {getMetadata: {metadata: {}}, split: {bundles: [{}], outcome: '', shards: [{}]}},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"currentWorkerTime":"","location":"","unifiedWorkerRequest":{},"workItemStatuses":[{"completed":false,"counterUpdates":[{"boolean":false,"cumulative":false,"distribution":{"count":{"highBits":0,"lowBits":0},"histogram":{"bucketCounts":[],"firstBucketOffset":0},"max":{},"min":{},"sum":{},"sumOfSquares":""},"floatingPoint":"","floatingPointList":{"elements":[]},"floatingPointMean":{"count":{},"sum":""},"integer":{},"integerGauge":{"timestamp":"","value":{}},"integerList":{"elements":[{}]},"integerMean":{"count":{},"sum":{}},"internal":"","nameAndKind":{"kind":"","name":""},"shortId":"","stringList":{"elements":[]},"structuredNameAndMetadata":{"metadata":{"description":"","kind":"","otherUnits":"","standardUnits":""},"name":{"componentStepName":"","executionStepName":"","inputIndex":0,"name":"","origin":"","originNamespace":"","originalRequestingStepName":"","originalStepName":"","portion":"","workerId":""}}}],"dynamicSourceSplit":{"primary":{"derivationMode":"","source":{"baseSpecs":[{}],"codec":{},"doesNotNeedSplitting":false,"metadata":{"estimatedSizeBytes":"","infinite":false,"producesSortedKeys":false},"spec":{}}},"residual":{}},"errors":[{"code":0,"details":[{}],"message":""}],"metricUpdates":[{"cumulative":false,"distribution":"","gauge":"","internal":"","kind":"","meanCount":"","meanSum":"","name":{"context":{},"name":"","origin":""},"scalar":"","set":"","updateTime":""}],"progress":{"percentComplete":"","position":{"byteOffset":"","concatPosition":{"index":0,"position":""},"end":false,"key":"","recordIndex":"","shufflePosition":""},"remainingTime":""},"reportIndex":"","reportedProgress":{"consumedParallelism":{"isInfinite":false,"value":""},"fractionConsumed":"","position":{},"remainingParallelism":{}},"requestedLeaseDuration":"","sourceFork":{"primary":{"derivationMode":"","source":{}},"primarySource":{},"residual":{},"residualSource":{}},"sourceOperationResponse":{"getMetadata":{"metadata":{}},"split":{"bundles":[{}],"outcome":"","shards":[{}]}},"stopPosition":{},"totalThrottlerWaitTimeSeconds":"","workItemId":""}],"workerId":""}'
};
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "currentWorkerTime": "",\n "location": "",\n "unifiedWorkerRequest": {},\n "workItemStatuses": [\n {\n "completed": false,\n "counterUpdates": [\n {\n "boolean": false,\n "cumulative": false,\n "distribution": {\n "count": {\n "highBits": 0,\n "lowBits": 0\n },\n "histogram": {\n "bucketCounts": [],\n "firstBucketOffset": 0\n },\n "max": {},\n "min": {},\n "sum": {},\n "sumOfSquares": ""\n },\n "floatingPoint": "",\n "floatingPointList": {\n "elements": []\n },\n "floatingPointMean": {\n "count": {},\n "sum": ""\n },\n "integer": {},\n "integerGauge": {\n "timestamp": "",\n "value": {}\n },\n "integerList": {\n "elements": [\n {}\n ]\n },\n "integerMean": {\n "count": {},\n "sum": {}\n },\n "internal": "",\n "nameAndKind": {\n "kind": "",\n "name": ""\n },\n "shortId": "",\n "stringList": {\n "elements": []\n },\n "structuredNameAndMetadata": {\n "metadata": {\n "description": "",\n "kind": "",\n "otherUnits": "",\n "standardUnits": ""\n },\n "name": {\n "componentStepName": "",\n "executionStepName": "",\n "inputIndex": 0,\n "name": "",\n "origin": "",\n "originNamespace": "",\n "originalRequestingStepName": "",\n "originalStepName": "",\n "portion": "",\n "workerId": ""\n }\n }\n }\n ],\n "dynamicSourceSplit": {\n "primary": {\n "derivationMode": "",\n "source": {\n "baseSpecs": [\n {}\n ],\n "codec": {},\n "doesNotNeedSplitting": false,\n "metadata": {\n "estimatedSizeBytes": "",\n "infinite": false,\n "producesSortedKeys": false\n },\n "spec": {}\n }\n },\n "residual": {}\n },\n "errors": [\n {\n "code": 0,\n "details": [\n {}\n ],\n "message": ""\n }\n ],\n "metricUpdates": [\n {\n "cumulative": false,\n "distribution": "",\n "gauge": "",\n "internal": "",\n "kind": "",\n "meanCount": "",\n "meanSum": "",\n "name": {\n "context": {},\n "name": "",\n "origin": ""\n },\n "scalar": "",\n "set": "",\n "updateTime": ""\n }\n ],\n "progress": {\n "percentComplete": "",\n "position": {\n "byteOffset": "",\n "concatPosition": {\n "index": 0,\n "position": ""\n },\n "end": false,\n "key": "",\n "recordIndex": "",\n "shufflePosition": ""\n },\n "remainingTime": ""\n },\n "reportIndex": "",\n "reportedProgress": {\n "consumedParallelism": {\n "isInfinite": false,\n "value": ""\n },\n "fractionConsumed": "",\n "position": {},\n "remainingParallelism": {}\n },\n "requestedLeaseDuration": "",\n "sourceFork": {\n "primary": {\n "derivationMode": "",\n "source": {}\n },\n "primarySource": {},\n "residual": {},\n "residualSource": {}\n },\n "sourceOperationResponse": {\n "getMetadata": {\n "metadata": {}\n },\n "split": {\n "bundles": [\n {}\n ],\n "outcome": "",\n "shards": [\n {}\n ]\n }\n },\n "stopPosition": {},\n "totalThrottlerWaitTimeSeconds": "",\n "workItemId": ""\n }\n ],\n "workerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus")
.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/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus',
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({
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {highBits: 0, lowBits: 0},
histogram: {bucketCounts: [], firstBucketOffset: 0},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {elements: []},
floatingPointMean: {count: {}, sum: ''},
integer: {},
integerGauge: {timestamp: '', value: {}},
integerList: {elements: [{}]},
integerMean: {count: {}, sum: {}},
internal: '',
nameAndKind: {kind: '', name: ''},
shortId: '',
stringList: {elements: []},
structuredNameAndMetadata: {
metadata: {description: '', kind: '', otherUnits: '', standardUnits: ''},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [{}],
codec: {},
doesNotNeedSplitting: false,
metadata: {estimatedSizeBytes: '', infinite: false, producesSortedKeys: false},
spec: {}
}
},
residual: {}
},
errors: [{code: 0, details: [{}], message: ''}],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {context: {}, name: '', origin: ''},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {index: 0, position: ''},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {isInfinite: false, value: ''},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {derivationMode: '', source: {}},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {getMetadata: {metadata: {}}, split: {bundles: [{}], outcome: '', shards: [{}]}},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus',
headers: {'content-type': 'application/json'},
body: {
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {highBits: 0, lowBits: 0},
histogram: {bucketCounts: [], firstBucketOffset: 0},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {elements: []},
floatingPointMean: {count: {}, sum: ''},
integer: {},
integerGauge: {timestamp: '', value: {}},
integerList: {elements: [{}]},
integerMean: {count: {}, sum: {}},
internal: '',
nameAndKind: {kind: '', name: ''},
shortId: '',
stringList: {elements: []},
structuredNameAndMetadata: {
metadata: {description: '', kind: '', otherUnits: '', standardUnits: ''},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [{}],
codec: {},
doesNotNeedSplitting: false,
metadata: {estimatedSizeBytes: '', infinite: false, producesSortedKeys: false},
spec: {}
}
},
residual: {}
},
errors: [{code: 0, details: [{}], message: ''}],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {context: {}, name: '', origin: ''},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {index: 0, position: ''},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {isInfinite: false, value: ''},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {derivationMode: '', source: {}},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {getMetadata: {metadata: {}}, split: {bundles: [{}], outcome: '', shards: [{}]}},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
},
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {
highBits: 0,
lowBits: 0
},
histogram: {
bucketCounts: [],
firstBucketOffset: 0
},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {
elements: []
},
floatingPointMean: {
count: {},
sum: ''
},
integer: {},
integerGauge: {
timestamp: '',
value: {}
},
integerList: {
elements: [
{}
]
},
integerMean: {
count: {},
sum: {}
},
internal: '',
nameAndKind: {
kind: '',
name: ''
},
shortId: '',
stringList: {
elements: []
},
structuredNameAndMetadata: {
metadata: {
description: '',
kind: '',
otherUnits: '',
standardUnits: ''
},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [
{}
],
codec: {},
doesNotNeedSplitting: false,
metadata: {
estimatedSizeBytes: '',
infinite: false,
producesSortedKeys: false
},
spec: {}
}
},
residual: {}
},
errors: [
{
code: 0,
details: [
{}
],
message: ''
}
],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {
context: {},
name: '',
origin: ''
},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {
index: 0,
position: ''
},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {
isInfinite: false,
value: ''
},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {
derivationMode: '',
source: {}
},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {
getMetadata: {
metadata: {}
},
split: {
bundles: [
{}
],
outcome: '',
shards: [
{}
]
}
},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
});
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus',
headers: {'content-type': 'application/json'},
data: {
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {highBits: 0, lowBits: 0},
histogram: {bucketCounts: [], firstBucketOffset: 0},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {elements: []},
floatingPointMean: {count: {}, sum: ''},
integer: {},
integerGauge: {timestamp: '', value: {}},
integerList: {elements: [{}]},
integerMean: {count: {}, sum: {}},
internal: '',
nameAndKind: {kind: '', name: ''},
shortId: '',
stringList: {elements: []},
structuredNameAndMetadata: {
metadata: {description: '', kind: '', otherUnits: '', standardUnits: ''},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [{}],
codec: {},
doesNotNeedSplitting: false,
metadata: {estimatedSizeBytes: '', infinite: false, producesSortedKeys: false},
spec: {}
}
},
residual: {}
},
errors: [{code: 0, details: [{}], message: ''}],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {context: {}, name: '', origin: ''},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {index: 0, position: ''},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {isInfinite: false, value: ''},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {derivationMode: '', source: {}},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {getMetadata: {metadata: {}}, split: {bundles: [{}], outcome: '', shards: [{}]}},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"currentWorkerTime":"","location":"","unifiedWorkerRequest":{},"workItemStatuses":[{"completed":false,"counterUpdates":[{"boolean":false,"cumulative":false,"distribution":{"count":{"highBits":0,"lowBits":0},"histogram":{"bucketCounts":[],"firstBucketOffset":0},"max":{},"min":{},"sum":{},"sumOfSquares":""},"floatingPoint":"","floatingPointList":{"elements":[]},"floatingPointMean":{"count":{},"sum":""},"integer":{},"integerGauge":{"timestamp":"","value":{}},"integerList":{"elements":[{}]},"integerMean":{"count":{},"sum":{}},"internal":"","nameAndKind":{"kind":"","name":""},"shortId":"","stringList":{"elements":[]},"structuredNameAndMetadata":{"metadata":{"description":"","kind":"","otherUnits":"","standardUnits":""},"name":{"componentStepName":"","executionStepName":"","inputIndex":0,"name":"","origin":"","originNamespace":"","originalRequestingStepName":"","originalStepName":"","portion":"","workerId":""}}}],"dynamicSourceSplit":{"primary":{"derivationMode":"","source":{"baseSpecs":[{}],"codec":{},"doesNotNeedSplitting":false,"metadata":{"estimatedSizeBytes":"","infinite":false,"producesSortedKeys":false},"spec":{}}},"residual":{}},"errors":[{"code":0,"details":[{}],"message":""}],"metricUpdates":[{"cumulative":false,"distribution":"","gauge":"","internal":"","kind":"","meanCount":"","meanSum":"","name":{"context":{},"name":"","origin":""},"scalar":"","set":"","updateTime":""}],"progress":{"percentComplete":"","position":{"byteOffset":"","concatPosition":{"index":0,"position":""},"end":false,"key":"","recordIndex":"","shufflePosition":""},"remainingTime":""},"reportIndex":"","reportedProgress":{"consumedParallelism":{"isInfinite":false,"value":""},"fractionConsumed":"","position":{},"remainingParallelism":{}},"requestedLeaseDuration":"","sourceFork":{"primary":{"derivationMode":"","source":{}},"primarySource":{},"residual":{},"residualSource":{}},"sourceOperationResponse":{"getMetadata":{"metadata":{}},"split":{"bundles":[{}],"outcome":"","shards":[{}]}},"stopPosition":{},"totalThrottlerWaitTimeSeconds":"","workItemId":""}],"workerId":""}'
};
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 = @{ @"currentWorkerTime": @"",
@"location": @"",
@"unifiedWorkerRequest": @{ },
@"workItemStatuses": @[ @{ @"completed": @NO, @"counterUpdates": @[ @{ @"boolean": @NO, @"cumulative": @NO, @"distribution": @{ @"count": @{ @"highBits": @0, @"lowBits": @0 }, @"histogram": @{ @"bucketCounts": @[ ], @"firstBucketOffset": @0 }, @"max": @{ }, @"min": @{ }, @"sum": @{ }, @"sumOfSquares": @"" }, @"floatingPoint": @"", @"floatingPointList": @{ @"elements": @[ ] }, @"floatingPointMean": @{ @"count": @{ }, @"sum": @"" }, @"integer": @{ }, @"integerGauge": @{ @"timestamp": @"", @"value": @{ } }, @"integerList": @{ @"elements": @[ @{ } ] }, @"integerMean": @{ @"count": @{ }, @"sum": @{ } }, @"internal": @"", @"nameAndKind": @{ @"kind": @"", @"name": @"" }, @"shortId": @"", @"stringList": @{ @"elements": @[ ] }, @"structuredNameAndMetadata": @{ @"metadata": @{ @"description": @"", @"kind": @"", @"otherUnits": @"", @"standardUnits": @"" }, @"name": @{ @"componentStepName": @"", @"executionStepName": @"", @"inputIndex": @0, @"name": @"", @"origin": @"", @"originNamespace": @"", @"originalRequestingStepName": @"", @"originalStepName": @"", @"portion": @"", @"workerId": @"" } } } ], @"dynamicSourceSplit": @{ @"primary": @{ @"derivationMode": @"", @"source": @{ @"baseSpecs": @[ @{ } ], @"codec": @{ }, @"doesNotNeedSplitting": @NO, @"metadata": @{ @"estimatedSizeBytes": @"", @"infinite": @NO, @"producesSortedKeys": @NO }, @"spec": @{ } } }, @"residual": @{ } }, @"errors": @[ @{ @"code": @0, @"details": @[ @{ } ], @"message": @"" } ], @"metricUpdates": @[ @{ @"cumulative": @NO, @"distribution": @"", @"gauge": @"", @"internal": @"", @"kind": @"", @"meanCount": @"", @"meanSum": @"", @"name": @{ @"context": @{ }, @"name": @"", @"origin": @"" }, @"scalar": @"", @"set": @"", @"updateTime": @"" } ], @"progress": @{ @"percentComplete": @"", @"position": @{ @"byteOffset": @"", @"concatPosition": @{ @"index": @0, @"position": @"" }, @"end": @NO, @"key": @"", @"recordIndex": @"", @"shufflePosition": @"" }, @"remainingTime": @"" }, @"reportIndex": @"", @"reportedProgress": @{ @"consumedParallelism": @{ @"isInfinite": @NO, @"value": @"" }, @"fractionConsumed": @"", @"position": @{ }, @"remainingParallelism": @{ } }, @"requestedLeaseDuration": @"", @"sourceFork": @{ @"primary": @{ @"derivationMode": @"", @"source": @{ } }, @"primarySource": @{ }, @"residual": @{ }, @"residualSource": @{ } }, @"sourceOperationResponse": @{ @"getMetadata": @{ @"metadata": @{ } }, @"split": @{ @"bundles": @[ @{ } ], @"outcome": @"", @"shards": @[ @{ } ] } }, @"stopPosition": @{ }, @"totalThrottlerWaitTimeSeconds": @"", @"workItemId": @"" } ],
@"workerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus"]
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus",
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([
'currentWorkerTime' => '',
'location' => '',
'unifiedWorkerRequest' => [
],
'workItemStatuses' => [
[
'completed' => null,
'counterUpdates' => [
[
'boolean' => null,
'cumulative' => null,
'distribution' => [
'count' => [
'highBits' => 0,
'lowBits' => 0
],
'histogram' => [
'bucketCounts' => [
],
'firstBucketOffset' => 0
],
'max' => [
],
'min' => [
],
'sum' => [
],
'sumOfSquares' => ''
],
'floatingPoint' => '',
'floatingPointList' => [
'elements' => [
]
],
'floatingPointMean' => [
'count' => [
],
'sum' => ''
],
'integer' => [
],
'integerGauge' => [
'timestamp' => '',
'value' => [
]
],
'integerList' => [
'elements' => [
[
]
]
],
'integerMean' => [
'count' => [
],
'sum' => [
]
],
'internal' => '',
'nameAndKind' => [
'kind' => '',
'name' => ''
],
'shortId' => '',
'stringList' => [
'elements' => [
]
],
'structuredNameAndMetadata' => [
'metadata' => [
'description' => '',
'kind' => '',
'otherUnits' => '',
'standardUnits' => ''
],
'name' => [
'componentStepName' => '',
'executionStepName' => '',
'inputIndex' => 0,
'name' => '',
'origin' => '',
'originNamespace' => '',
'originalRequestingStepName' => '',
'originalStepName' => '',
'portion' => '',
'workerId' => ''
]
]
]
],
'dynamicSourceSplit' => [
'primary' => [
'derivationMode' => '',
'source' => [
'baseSpecs' => [
[
]
],
'codec' => [
],
'doesNotNeedSplitting' => null,
'metadata' => [
'estimatedSizeBytes' => '',
'infinite' => null,
'producesSortedKeys' => null
],
'spec' => [
]
]
],
'residual' => [
]
],
'errors' => [
[
'code' => 0,
'details' => [
[
]
],
'message' => ''
]
],
'metricUpdates' => [
[
'cumulative' => null,
'distribution' => '',
'gauge' => '',
'internal' => '',
'kind' => '',
'meanCount' => '',
'meanSum' => '',
'name' => [
'context' => [
],
'name' => '',
'origin' => ''
],
'scalar' => '',
'set' => '',
'updateTime' => ''
]
],
'progress' => [
'percentComplete' => '',
'position' => [
'byteOffset' => '',
'concatPosition' => [
'index' => 0,
'position' => ''
],
'end' => null,
'key' => '',
'recordIndex' => '',
'shufflePosition' => ''
],
'remainingTime' => ''
],
'reportIndex' => '',
'reportedProgress' => [
'consumedParallelism' => [
'isInfinite' => null,
'value' => ''
],
'fractionConsumed' => '',
'position' => [
],
'remainingParallelism' => [
]
],
'requestedLeaseDuration' => '',
'sourceFork' => [
'primary' => [
'derivationMode' => '',
'source' => [
]
],
'primarySource' => [
],
'residual' => [
],
'residualSource' => [
]
],
'sourceOperationResponse' => [
'getMetadata' => [
'metadata' => [
]
],
'split' => [
'bundles' => [
[
]
],
'outcome' => '',
'shards' => [
[
]
]
]
],
'stopPosition' => [
],
'totalThrottlerWaitTimeSeconds' => '',
'workItemId' => ''
]
],
'workerId' => ''
]),
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus', [
'body' => '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currentWorkerTime' => '',
'location' => '',
'unifiedWorkerRequest' => [
],
'workItemStatuses' => [
[
'completed' => null,
'counterUpdates' => [
[
'boolean' => null,
'cumulative' => null,
'distribution' => [
'count' => [
'highBits' => 0,
'lowBits' => 0
],
'histogram' => [
'bucketCounts' => [
],
'firstBucketOffset' => 0
],
'max' => [
],
'min' => [
],
'sum' => [
],
'sumOfSquares' => ''
],
'floatingPoint' => '',
'floatingPointList' => [
'elements' => [
]
],
'floatingPointMean' => [
'count' => [
],
'sum' => ''
],
'integer' => [
],
'integerGauge' => [
'timestamp' => '',
'value' => [
]
],
'integerList' => [
'elements' => [
[
]
]
],
'integerMean' => [
'count' => [
],
'sum' => [
]
],
'internal' => '',
'nameAndKind' => [
'kind' => '',
'name' => ''
],
'shortId' => '',
'stringList' => [
'elements' => [
]
],
'structuredNameAndMetadata' => [
'metadata' => [
'description' => '',
'kind' => '',
'otherUnits' => '',
'standardUnits' => ''
],
'name' => [
'componentStepName' => '',
'executionStepName' => '',
'inputIndex' => 0,
'name' => '',
'origin' => '',
'originNamespace' => '',
'originalRequestingStepName' => '',
'originalStepName' => '',
'portion' => '',
'workerId' => ''
]
]
]
],
'dynamicSourceSplit' => [
'primary' => [
'derivationMode' => '',
'source' => [
'baseSpecs' => [
[
]
],
'codec' => [
],
'doesNotNeedSplitting' => null,
'metadata' => [
'estimatedSizeBytes' => '',
'infinite' => null,
'producesSortedKeys' => null
],
'spec' => [
]
]
],
'residual' => [
]
],
'errors' => [
[
'code' => 0,
'details' => [
[
]
],
'message' => ''
]
],
'metricUpdates' => [
[
'cumulative' => null,
'distribution' => '',
'gauge' => '',
'internal' => '',
'kind' => '',
'meanCount' => '',
'meanSum' => '',
'name' => [
'context' => [
],
'name' => '',
'origin' => ''
],
'scalar' => '',
'set' => '',
'updateTime' => ''
]
],
'progress' => [
'percentComplete' => '',
'position' => [
'byteOffset' => '',
'concatPosition' => [
'index' => 0,
'position' => ''
],
'end' => null,
'key' => '',
'recordIndex' => '',
'shufflePosition' => ''
],
'remainingTime' => ''
],
'reportIndex' => '',
'reportedProgress' => [
'consumedParallelism' => [
'isInfinite' => null,
'value' => ''
],
'fractionConsumed' => '',
'position' => [
],
'remainingParallelism' => [
]
],
'requestedLeaseDuration' => '',
'sourceFork' => [
'primary' => [
'derivationMode' => '',
'source' => [
]
],
'primarySource' => [
],
'residual' => [
],
'residualSource' => [
]
],
'sourceOperationResponse' => [
'getMetadata' => [
'metadata' => [
]
],
'split' => [
'bundles' => [
[
]
],
'outcome' => '',
'shards' => [
[
]
]
]
],
'stopPosition' => [
],
'totalThrottlerWaitTimeSeconds' => '',
'workItemId' => ''
]
],
'workerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currentWorkerTime' => '',
'location' => '',
'unifiedWorkerRequest' => [
],
'workItemStatuses' => [
[
'completed' => null,
'counterUpdates' => [
[
'boolean' => null,
'cumulative' => null,
'distribution' => [
'count' => [
'highBits' => 0,
'lowBits' => 0
],
'histogram' => [
'bucketCounts' => [
],
'firstBucketOffset' => 0
],
'max' => [
],
'min' => [
],
'sum' => [
],
'sumOfSquares' => ''
],
'floatingPoint' => '',
'floatingPointList' => [
'elements' => [
]
],
'floatingPointMean' => [
'count' => [
],
'sum' => ''
],
'integer' => [
],
'integerGauge' => [
'timestamp' => '',
'value' => [
]
],
'integerList' => [
'elements' => [
[
]
]
],
'integerMean' => [
'count' => [
],
'sum' => [
]
],
'internal' => '',
'nameAndKind' => [
'kind' => '',
'name' => ''
],
'shortId' => '',
'stringList' => [
'elements' => [
]
],
'structuredNameAndMetadata' => [
'metadata' => [
'description' => '',
'kind' => '',
'otherUnits' => '',
'standardUnits' => ''
],
'name' => [
'componentStepName' => '',
'executionStepName' => '',
'inputIndex' => 0,
'name' => '',
'origin' => '',
'originNamespace' => '',
'originalRequestingStepName' => '',
'originalStepName' => '',
'portion' => '',
'workerId' => ''
]
]
]
],
'dynamicSourceSplit' => [
'primary' => [
'derivationMode' => '',
'source' => [
'baseSpecs' => [
[
]
],
'codec' => [
],
'doesNotNeedSplitting' => null,
'metadata' => [
'estimatedSizeBytes' => '',
'infinite' => null,
'producesSortedKeys' => null
],
'spec' => [
]
]
],
'residual' => [
]
],
'errors' => [
[
'code' => 0,
'details' => [
[
]
],
'message' => ''
]
],
'metricUpdates' => [
[
'cumulative' => null,
'distribution' => '',
'gauge' => '',
'internal' => '',
'kind' => '',
'meanCount' => '',
'meanSum' => '',
'name' => [
'context' => [
],
'name' => '',
'origin' => ''
],
'scalar' => '',
'set' => '',
'updateTime' => ''
]
],
'progress' => [
'percentComplete' => '',
'position' => [
'byteOffset' => '',
'concatPosition' => [
'index' => 0,
'position' => ''
],
'end' => null,
'key' => '',
'recordIndex' => '',
'shufflePosition' => ''
],
'remainingTime' => ''
],
'reportIndex' => '',
'reportedProgress' => [
'consumedParallelism' => [
'isInfinite' => null,
'value' => ''
],
'fractionConsumed' => '',
'position' => [
],
'remainingParallelism' => [
]
],
'requestedLeaseDuration' => '',
'sourceFork' => [
'primary' => [
'derivationMode' => '',
'source' => [
]
],
'primarySource' => [
],
'residual' => [
],
'residualSource' => [
]
],
'sourceOperationResponse' => [
'getMetadata' => [
'metadata' => [
]
],
'split' => [
'bundles' => [
[
]
],
'outcome' => '',
'shards' => [
[
]
]
]
],
'stopPosition' => [
],
'totalThrottlerWaitTimeSeconds' => '',
'workItemId' => ''
]
],
'workerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus');
$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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus"
payload = {
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": False,
"counterUpdates": [
{
"boolean": False,
"cumulative": False,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": { "elements": [] },
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": { "elements": [{}] },
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": { "elements": [] },
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [{}],
"codec": {},
"doesNotNeedSplitting": False,
"metadata": {
"estimatedSizeBytes": "",
"infinite": False,
"producesSortedKeys": False
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [{}],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": False,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": False,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": False,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": { "metadata": {} },
"split": {
"bundles": [{}],
"outcome": "",
"shards": [{}]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus"
payload <- "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus")
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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus') do |req|
req.body = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus";
let payload = json!({
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": json!({}),
"workItemStatuses": (
json!({
"completed": false,
"counterUpdates": (
json!({
"boolean": false,
"cumulative": false,
"distribution": json!({
"count": json!({
"highBits": 0,
"lowBits": 0
}),
"histogram": json!({
"bucketCounts": (),
"firstBucketOffset": 0
}),
"max": json!({}),
"min": json!({}),
"sum": json!({}),
"sumOfSquares": ""
}),
"floatingPoint": "",
"floatingPointList": json!({"elements": ()}),
"floatingPointMean": json!({
"count": json!({}),
"sum": ""
}),
"integer": json!({}),
"integerGauge": json!({
"timestamp": "",
"value": json!({})
}),
"integerList": json!({"elements": (json!({}))}),
"integerMean": json!({
"count": json!({}),
"sum": json!({})
}),
"internal": "",
"nameAndKind": json!({
"kind": "",
"name": ""
}),
"shortId": "",
"stringList": json!({"elements": ()}),
"structuredNameAndMetadata": json!({
"metadata": json!({
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
}),
"name": json!({
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
})
})
})
),
"dynamicSourceSplit": json!({
"primary": json!({
"derivationMode": "",
"source": json!({
"baseSpecs": (json!({})),
"codec": json!({}),
"doesNotNeedSplitting": false,
"metadata": json!({
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
}),
"spec": json!({})
})
}),
"residual": json!({})
}),
"errors": (
json!({
"code": 0,
"details": (json!({})),
"message": ""
})
),
"metricUpdates": (
json!({
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": json!({
"context": json!({}),
"name": "",
"origin": ""
}),
"scalar": "",
"set": "",
"updateTime": ""
})
),
"progress": json!({
"percentComplete": "",
"position": json!({
"byteOffset": "",
"concatPosition": json!({
"index": 0,
"position": ""
}),
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
}),
"remainingTime": ""
}),
"reportIndex": "",
"reportedProgress": json!({
"consumedParallelism": json!({
"isInfinite": false,
"value": ""
}),
"fractionConsumed": "",
"position": json!({}),
"remainingParallelism": json!({})
}),
"requestedLeaseDuration": "",
"sourceFork": json!({
"primary": json!({
"derivationMode": "",
"source": json!({})
}),
"primarySource": json!({}),
"residual": json!({}),
"residualSource": json!({})
}),
"sourceOperationResponse": json!({
"getMetadata": json!({"metadata": json!({})}),
"split": json!({
"bundles": (json!({})),
"outcome": "",
"shards": (json!({}))
})
}),
"stopPosition": json!({}),
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
})
),
"workerId": ""
});
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}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus \
--header 'content-type: application/json' \
--data '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}'
echo '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "currentWorkerTime": "",\n "location": "",\n "unifiedWorkerRequest": {},\n "workItemStatuses": [\n {\n "completed": false,\n "counterUpdates": [\n {\n "boolean": false,\n "cumulative": false,\n "distribution": {\n "count": {\n "highBits": 0,\n "lowBits": 0\n },\n "histogram": {\n "bucketCounts": [],\n "firstBucketOffset": 0\n },\n "max": {},\n "min": {},\n "sum": {},\n "sumOfSquares": ""\n },\n "floatingPoint": "",\n "floatingPointList": {\n "elements": []\n },\n "floatingPointMean": {\n "count": {},\n "sum": ""\n },\n "integer": {},\n "integerGauge": {\n "timestamp": "",\n "value": {}\n },\n "integerList": {\n "elements": [\n {}\n ]\n },\n "integerMean": {\n "count": {},\n "sum": {}\n },\n "internal": "",\n "nameAndKind": {\n "kind": "",\n "name": ""\n },\n "shortId": "",\n "stringList": {\n "elements": []\n },\n "structuredNameAndMetadata": {\n "metadata": {\n "description": "",\n "kind": "",\n "otherUnits": "",\n "standardUnits": ""\n },\n "name": {\n "componentStepName": "",\n "executionStepName": "",\n "inputIndex": 0,\n "name": "",\n "origin": "",\n "originNamespace": "",\n "originalRequestingStepName": "",\n "originalStepName": "",\n "portion": "",\n "workerId": ""\n }\n }\n }\n ],\n "dynamicSourceSplit": {\n "primary": {\n "derivationMode": "",\n "source": {\n "baseSpecs": [\n {}\n ],\n "codec": {},\n "doesNotNeedSplitting": false,\n "metadata": {\n "estimatedSizeBytes": "",\n "infinite": false,\n "producesSortedKeys": false\n },\n "spec": {}\n }\n },\n "residual": {}\n },\n "errors": [\n {\n "code": 0,\n "details": [\n {}\n ],\n "message": ""\n }\n ],\n "metricUpdates": [\n {\n "cumulative": false,\n "distribution": "",\n "gauge": "",\n "internal": "",\n "kind": "",\n "meanCount": "",\n "meanSum": "",\n "name": {\n "context": {},\n "name": "",\n "origin": ""\n },\n "scalar": "",\n "set": "",\n "updateTime": ""\n }\n ],\n "progress": {\n "percentComplete": "",\n "position": {\n "byteOffset": "",\n "concatPosition": {\n "index": 0,\n "position": ""\n },\n "end": false,\n "key": "",\n "recordIndex": "",\n "shufflePosition": ""\n },\n "remainingTime": ""\n },\n "reportIndex": "",\n "reportedProgress": {\n "consumedParallelism": {\n "isInfinite": false,\n "value": ""\n },\n "fractionConsumed": "",\n "position": {},\n "remainingParallelism": {}\n },\n "requestedLeaseDuration": "",\n "sourceFork": {\n "primary": {\n "derivationMode": "",\n "source": {}\n },\n "primarySource": {},\n "residual": {},\n "residualSource": {}\n },\n "sourceOperationResponse": {\n "getMetadata": {\n "metadata": {}\n },\n "split": {\n "bundles": [\n {}\n ],\n "outcome": "",\n "shards": [\n {}\n ]\n }\n },\n "stopPosition": {},\n "totalThrottlerWaitTimeSeconds": "",\n "workItemId": ""\n }\n ],\n "workerId": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": [],
"workItemStatuses": [
[
"completed": false,
"counterUpdates": [
[
"boolean": false,
"cumulative": false,
"distribution": [
"count": [
"highBits": 0,
"lowBits": 0
],
"histogram": [
"bucketCounts": [],
"firstBucketOffset": 0
],
"max": [],
"min": [],
"sum": [],
"sumOfSquares": ""
],
"floatingPoint": "",
"floatingPointList": ["elements": []],
"floatingPointMean": [
"count": [],
"sum": ""
],
"integer": [],
"integerGauge": [
"timestamp": "",
"value": []
],
"integerList": ["elements": [[]]],
"integerMean": [
"count": [],
"sum": []
],
"internal": "",
"nameAndKind": [
"kind": "",
"name": ""
],
"shortId": "",
"stringList": ["elements": []],
"structuredNameAndMetadata": [
"metadata": [
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
],
"name": [
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
]
]
]
],
"dynamicSourceSplit": [
"primary": [
"derivationMode": "",
"source": [
"baseSpecs": [[]],
"codec": [],
"doesNotNeedSplitting": false,
"metadata": [
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
],
"spec": []
]
],
"residual": []
],
"errors": [
[
"code": 0,
"details": [[]],
"message": ""
]
],
"metricUpdates": [
[
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": [
"context": [],
"name": "",
"origin": ""
],
"scalar": "",
"set": "",
"updateTime": ""
]
],
"progress": [
"percentComplete": "",
"position": [
"byteOffset": "",
"concatPosition": [
"index": 0,
"position": ""
],
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
],
"remainingTime": ""
],
"reportIndex": "",
"reportedProgress": [
"consumedParallelism": [
"isInfinite": false,
"value": ""
],
"fractionConsumed": "",
"position": [],
"remainingParallelism": []
],
"requestedLeaseDuration": "",
"sourceFork": [
"primary": [
"derivationMode": "",
"source": []
],
"primarySource": [],
"residual": [],
"residualSource": []
],
"sourceOperationResponse": [
"getMetadata": ["metadata": []],
"split": [
"bundles": [[]],
"outcome": "",
"shards": [[]]
]
],
"stopPosition": [],
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
]
],
"workerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/jobs/:jobId/workItems:reportStatus")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.locations.flexTemplates.launch
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch
QUERY PARAMS
projectId
location
BODY json
{
"launchParameter": {
"containerSpec": {
"defaultEnvironment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": {
"description": "",
"name": "",
"parameters": [
{
"customMetadata": {},
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
}
]
},
"sdkInfo": {
"language": "",
"version": ""
}
},
"containerSpecGcsPath": "",
"environment": {},
"jobName": "",
"launchOptions": {},
"parameters": {},
"transformNameMappings": {},
"update": false
},
"validateOnly": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch");
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 \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch" {:content-type :json
:form-params {:launchParameter {:containerSpec {:defaultEnvironment {:additionalExperiments []
:additionalUserLabels {}
:autoscalingAlgorithm ""
:diskSizeGb 0
:dumpHeapOnOom false
:enableLauncherVmSerialPortLogging false
:enableStreamingEngine false
:flexrsGoal ""
:ipConfiguration ""
:kmsKeyName ""
:launcherMachineType ""
:machineType ""
:maxWorkers 0
:network ""
:numWorkers 0
:saveHeapDumpsToGcsPath ""
:sdkContainerImage ""
:serviceAccountEmail ""
:stagingLocation ""
:subnetwork ""
:tempLocation ""
:workerRegion ""
:workerZone ""
:zone ""}
:image ""
:imageRepositoryCertPath ""
:imageRepositoryPasswordSecretId ""
:imageRepositoryUsernameSecretId ""
:metadata {:description ""
:name ""
:parameters [{:customMetadata {}
:groupName ""
:helpText ""
:isOptional false
:label ""
:name ""
:paramType ""
:parentName ""
:parentTriggerValues []
:regexes []}]}
:sdkInfo {:language ""
:version ""}}
:containerSpecGcsPath ""
:environment {}
:jobName ""
:launchOptions {}
:parameters {}
:transformNameMappings {}
:update false}
:validateOnly false}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch"),
Content = new StringContent("{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch"
payload := strings.NewReader("{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1b3/projects/:projectId/locations/:location/flexTemplates:launch HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1688
{
"launchParameter": {
"containerSpec": {
"defaultEnvironment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": {
"description": "",
"name": "",
"parameters": [
{
"customMetadata": {},
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
}
]
},
"sdkInfo": {
"language": "",
"version": ""
}
},
"containerSpecGcsPath": "",
"environment": {},
"jobName": "",
"launchOptions": {},
"parameters": {},
"transformNameMappings": {},
"update": false
},
"validateOnly": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch")
.setHeader("content-type", "application/json")
.setBody("{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch")
.header("content-type", "application/json")
.body("{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}")
.asString();
const data = JSON.stringify({
launchParameter: {
containerSpec: {
defaultEnvironment: {
additionalExperiments: [],
additionalUserLabels: {},
autoscalingAlgorithm: '',
diskSizeGb: 0,
dumpHeapOnOom: false,
enableLauncherVmSerialPortLogging: false,
enableStreamingEngine: false,
flexrsGoal: '',
ipConfiguration: '',
kmsKeyName: '',
launcherMachineType: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
saveHeapDumpsToGcsPath: '',
sdkContainerImage: '',
serviceAccountEmail: '',
stagingLocation: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
image: '',
imageRepositoryCertPath: '',
imageRepositoryPasswordSecretId: '',
imageRepositoryUsernameSecretId: '',
metadata: {
description: '',
name: '',
parameters: [
{
customMetadata: {},
groupName: '',
helpText: '',
isOptional: false,
label: '',
name: '',
paramType: '',
parentName: '',
parentTriggerValues: [],
regexes: []
}
]
},
sdkInfo: {
language: '',
version: ''
}
},
containerSpecGcsPath: '',
environment: {},
jobName: '',
launchOptions: {},
parameters: {},
transformNameMappings: {},
update: false
},
validateOnly: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch',
headers: {'content-type': 'application/json'},
data: {
launchParameter: {
containerSpec: {
defaultEnvironment: {
additionalExperiments: [],
additionalUserLabels: {},
autoscalingAlgorithm: '',
diskSizeGb: 0,
dumpHeapOnOom: false,
enableLauncherVmSerialPortLogging: false,
enableStreamingEngine: false,
flexrsGoal: '',
ipConfiguration: '',
kmsKeyName: '',
launcherMachineType: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
saveHeapDumpsToGcsPath: '',
sdkContainerImage: '',
serviceAccountEmail: '',
stagingLocation: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
image: '',
imageRepositoryCertPath: '',
imageRepositoryPasswordSecretId: '',
imageRepositoryUsernameSecretId: '',
metadata: {
description: '',
name: '',
parameters: [
{
customMetadata: {},
groupName: '',
helpText: '',
isOptional: false,
label: '',
name: '',
paramType: '',
parentName: '',
parentTriggerValues: [],
regexes: []
}
]
},
sdkInfo: {language: '', version: ''}
},
containerSpecGcsPath: '',
environment: {},
jobName: '',
launchOptions: {},
parameters: {},
transformNameMappings: {},
update: false
},
validateOnly: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"launchParameter":{"containerSpec":{"defaultEnvironment":{"additionalExperiments":[],"additionalUserLabels":{},"autoscalingAlgorithm":"","diskSizeGb":0,"dumpHeapOnOom":false,"enableLauncherVmSerialPortLogging":false,"enableStreamingEngine":false,"flexrsGoal":"","ipConfiguration":"","kmsKeyName":"","launcherMachineType":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"saveHeapDumpsToGcsPath":"","sdkContainerImage":"","serviceAccountEmail":"","stagingLocation":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"image":"","imageRepositoryCertPath":"","imageRepositoryPasswordSecretId":"","imageRepositoryUsernameSecretId":"","metadata":{"description":"","name":"","parameters":[{"customMetadata":{},"groupName":"","helpText":"","isOptional":false,"label":"","name":"","paramType":"","parentName":"","parentTriggerValues":[],"regexes":[]}]},"sdkInfo":{"language":"","version":""}},"containerSpecGcsPath":"","environment":{},"jobName":"","launchOptions":{},"parameters":{},"transformNameMappings":{},"update":false},"validateOnly":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "launchParameter": {\n "containerSpec": {\n "defaultEnvironment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "autoscalingAlgorithm": "",\n "diskSizeGb": 0,\n "dumpHeapOnOom": false,\n "enableLauncherVmSerialPortLogging": false,\n "enableStreamingEngine": false,\n "flexrsGoal": "",\n "ipConfiguration": "",\n "kmsKeyName": "",\n "launcherMachineType": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "saveHeapDumpsToGcsPath": "",\n "sdkContainerImage": "",\n "serviceAccountEmail": "",\n "stagingLocation": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "image": "",\n "imageRepositoryCertPath": "",\n "imageRepositoryPasswordSecretId": "",\n "imageRepositoryUsernameSecretId": "",\n "metadata": {\n "description": "",\n "name": "",\n "parameters": [\n {\n "customMetadata": {},\n "groupName": "",\n "helpText": "",\n "isOptional": false,\n "label": "",\n "name": "",\n "paramType": "",\n "parentName": "",\n "parentTriggerValues": [],\n "regexes": []\n }\n ]\n },\n "sdkInfo": {\n "language": "",\n "version": ""\n }\n },\n "containerSpecGcsPath": "",\n "environment": {},\n "jobName": "",\n "launchOptions": {},\n "parameters": {},\n "transformNameMappings": {},\n "update": false\n },\n "validateOnly": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch")
.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/v1b3/projects/:projectId/locations/:location/flexTemplates:launch',
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({
launchParameter: {
containerSpec: {
defaultEnvironment: {
additionalExperiments: [],
additionalUserLabels: {},
autoscalingAlgorithm: '',
diskSizeGb: 0,
dumpHeapOnOom: false,
enableLauncherVmSerialPortLogging: false,
enableStreamingEngine: false,
flexrsGoal: '',
ipConfiguration: '',
kmsKeyName: '',
launcherMachineType: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
saveHeapDumpsToGcsPath: '',
sdkContainerImage: '',
serviceAccountEmail: '',
stagingLocation: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
image: '',
imageRepositoryCertPath: '',
imageRepositoryPasswordSecretId: '',
imageRepositoryUsernameSecretId: '',
metadata: {
description: '',
name: '',
parameters: [
{
customMetadata: {},
groupName: '',
helpText: '',
isOptional: false,
label: '',
name: '',
paramType: '',
parentName: '',
parentTriggerValues: [],
regexes: []
}
]
},
sdkInfo: {language: '', version: ''}
},
containerSpecGcsPath: '',
environment: {},
jobName: '',
launchOptions: {},
parameters: {},
transformNameMappings: {},
update: false
},
validateOnly: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch',
headers: {'content-type': 'application/json'},
body: {
launchParameter: {
containerSpec: {
defaultEnvironment: {
additionalExperiments: [],
additionalUserLabels: {},
autoscalingAlgorithm: '',
diskSizeGb: 0,
dumpHeapOnOom: false,
enableLauncherVmSerialPortLogging: false,
enableStreamingEngine: false,
flexrsGoal: '',
ipConfiguration: '',
kmsKeyName: '',
launcherMachineType: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
saveHeapDumpsToGcsPath: '',
sdkContainerImage: '',
serviceAccountEmail: '',
stagingLocation: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
image: '',
imageRepositoryCertPath: '',
imageRepositoryPasswordSecretId: '',
imageRepositoryUsernameSecretId: '',
metadata: {
description: '',
name: '',
parameters: [
{
customMetadata: {},
groupName: '',
helpText: '',
isOptional: false,
label: '',
name: '',
paramType: '',
parentName: '',
parentTriggerValues: [],
regexes: []
}
]
},
sdkInfo: {language: '', version: ''}
},
containerSpecGcsPath: '',
environment: {},
jobName: '',
launchOptions: {},
parameters: {},
transformNameMappings: {},
update: false
},
validateOnly: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
launchParameter: {
containerSpec: {
defaultEnvironment: {
additionalExperiments: [],
additionalUserLabels: {},
autoscalingAlgorithm: '',
diskSizeGb: 0,
dumpHeapOnOom: false,
enableLauncherVmSerialPortLogging: false,
enableStreamingEngine: false,
flexrsGoal: '',
ipConfiguration: '',
kmsKeyName: '',
launcherMachineType: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
saveHeapDumpsToGcsPath: '',
sdkContainerImage: '',
serviceAccountEmail: '',
stagingLocation: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
image: '',
imageRepositoryCertPath: '',
imageRepositoryPasswordSecretId: '',
imageRepositoryUsernameSecretId: '',
metadata: {
description: '',
name: '',
parameters: [
{
customMetadata: {},
groupName: '',
helpText: '',
isOptional: false,
label: '',
name: '',
paramType: '',
parentName: '',
parentTriggerValues: [],
regexes: []
}
]
},
sdkInfo: {
language: '',
version: ''
}
},
containerSpecGcsPath: '',
environment: {},
jobName: '',
launchOptions: {},
parameters: {},
transformNameMappings: {},
update: false
},
validateOnly: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch',
headers: {'content-type': 'application/json'},
data: {
launchParameter: {
containerSpec: {
defaultEnvironment: {
additionalExperiments: [],
additionalUserLabels: {},
autoscalingAlgorithm: '',
diskSizeGb: 0,
dumpHeapOnOom: false,
enableLauncherVmSerialPortLogging: false,
enableStreamingEngine: false,
flexrsGoal: '',
ipConfiguration: '',
kmsKeyName: '',
launcherMachineType: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
saveHeapDumpsToGcsPath: '',
sdkContainerImage: '',
serviceAccountEmail: '',
stagingLocation: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
image: '',
imageRepositoryCertPath: '',
imageRepositoryPasswordSecretId: '',
imageRepositoryUsernameSecretId: '',
metadata: {
description: '',
name: '',
parameters: [
{
customMetadata: {},
groupName: '',
helpText: '',
isOptional: false,
label: '',
name: '',
paramType: '',
parentName: '',
parentTriggerValues: [],
regexes: []
}
]
},
sdkInfo: {language: '', version: ''}
},
containerSpecGcsPath: '',
environment: {},
jobName: '',
launchOptions: {},
parameters: {},
transformNameMappings: {},
update: false
},
validateOnly: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"launchParameter":{"containerSpec":{"defaultEnvironment":{"additionalExperiments":[],"additionalUserLabels":{},"autoscalingAlgorithm":"","diskSizeGb":0,"dumpHeapOnOom":false,"enableLauncherVmSerialPortLogging":false,"enableStreamingEngine":false,"flexrsGoal":"","ipConfiguration":"","kmsKeyName":"","launcherMachineType":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"saveHeapDumpsToGcsPath":"","sdkContainerImage":"","serviceAccountEmail":"","stagingLocation":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"image":"","imageRepositoryCertPath":"","imageRepositoryPasswordSecretId":"","imageRepositoryUsernameSecretId":"","metadata":{"description":"","name":"","parameters":[{"customMetadata":{},"groupName":"","helpText":"","isOptional":false,"label":"","name":"","paramType":"","parentName":"","parentTriggerValues":[],"regexes":[]}]},"sdkInfo":{"language":"","version":""}},"containerSpecGcsPath":"","environment":{},"jobName":"","launchOptions":{},"parameters":{},"transformNameMappings":{},"update":false},"validateOnly":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"launchParameter": @{ @"containerSpec": @{ @"defaultEnvironment": @{ @"additionalExperiments": @[ ], @"additionalUserLabels": @{ }, @"autoscalingAlgorithm": @"", @"diskSizeGb": @0, @"dumpHeapOnOom": @NO, @"enableLauncherVmSerialPortLogging": @NO, @"enableStreamingEngine": @NO, @"flexrsGoal": @"", @"ipConfiguration": @"", @"kmsKeyName": @"", @"launcherMachineType": @"", @"machineType": @"", @"maxWorkers": @0, @"network": @"", @"numWorkers": @0, @"saveHeapDumpsToGcsPath": @"", @"sdkContainerImage": @"", @"serviceAccountEmail": @"", @"stagingLocation": @"", @"subnetwork": @"", @"tempLocation": @"", @"workerRegion": @"", @"workerZone": @"", @"zone": @"" }, @"image": @"", @"imageRepositoryCertPath": @"", @"imageRepositoryPasswordSecretId": @"", @"imageRepositoryUsernameSecretId": @"", @"metadata": @{ @"description": @"", @"name": @"", @"parameters": @[ @{ @"customMetadata": @{ }, @"groupName": @"", @"helpText": @"", @"isOptional": @NO, @"label": @"", @"name": @"", @"paramType": @"", @"parentName": @"", @"parentTriggerValues": @[ ], @"regexes": @[ ] } ] }, @"sdkInfo": @{ @"language": @"", @"version": @"" } }, @"containerSpecGcsPath": @"", @"environment": @{ }, @"jobName": @"", @"launchOptions": @{ }, @"parameters": @{ }, @"transformNameMappings": @{ }, @"update": @NO },
@"validateOnly": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch"]
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}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch",
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([
'launchParameter' => [
'containerSpec' => [
'defaultEnvironment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'autoscalingAlgorithm' => '',
'diskSizeGb' => 0,
'dumpHeapOnOom' => null,
'enableLauncherVmSerialPortLogging' => null,
'enableStreamingEngine' => null,
'flexrsGoal' => '',
'ipConfiguration' => '',
'kmsKeyName' => '',
'launcherMachineType' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'saveHeapDumpsToGcsPath' => '',
'sdkContainerImage' => '',
'serviceAccountEmail' => '',
'stagingLocation' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'image' => '',
'imageRepositoryCertPath' => '',
'imageRepositoryPasswordSecretId' => '',
'imageRepositoryUsernameSecretId' => '',
'metadata' => [
'description' => '',
'name' => '',
'parameters' => [
[
'customMetadata' => [
],
'groupName' => '',
'helpText' => '',
'isOptional' => null,
'label' => '',
'name' => '',
'paramType' => '',
'parentName' => '',
'parentTriggerValues' => [
],
'regexes' => [
]
]
]
],
'sdkInfo' => [
'language' => '',
'version' => ''
]
],
'containerSpecGcsPath' => '',
'environment' => [
],
'jobName' => '',
'launchOptions' => [
],
'parameters' => [
],
'transformNameMappings' => [
],
'update' => null
],
'validateOnly' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch', [
'body' => '{
"launchParameter": {
"containerSpec": {
"defaultEnvironment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": {
"description": "",
"name": "",
"parameters": [
{
"customMetadata": {},
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
}
]
},
"sdkInfo": {
"language": "",
"version": ""
}
},
"containerSpecGcsPath": "",
"environment": {},
"jobName": "",
"launchOptions": {},
"parameters": {},
"transformNameMappings": {},
"update": false
},
"validateOnly": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'launchParameter' => [
'containerSpec' => [
'defaultEnvironment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'autoscalingAlgorithm' => '',
'diskSizeGb' => 0,
'dumpHeapOnOom' => null,
'enableLauncherVmSerialPortLogging' => null,
'enableStreamingEngine' => null,
'flexrsGoal' => '',
'ipConfiguration' => '',
'kmsKeyName' => '',
'launcherMachineType' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'saveHeapDumpsToGcsPath' => '',
'sdkContainerImage' => '',
'serviceAccountEmail' => '',
'stagingLocation' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'image' => '',
'imageRepositoryCertPath' => '',
'imageRepositoryPasswordSecretId' => '',
'imageRepositoryUsernameSecretId' => '',
'metadata' => [
'description' => '',
'name' => '',
'parameters' => [
[
'customMetadata' => [
],
'groupName' => '',
'helpText' => '',
'isOptional' => null,
'label' => '',
'name' => '',
'paramType' => '',
'parentName' => '',
'parentTriggerValues' => [
],
'regexes' => [
]
]
]
],
'sdkInfo' => [
'language' => '',
'version' => ''
]
],
'containerSpecGcsPath' => '',
'environment' => [
],
'jobName' => '',
'launchOptions' => [
],
'parameters' => [
],
'transformNameMappings' => [
],
'update' => null
],
'validateOnly' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'launchParameter' => [
'containerSpec' => [
'defaultEnvironment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'autoscalingAlgorithm' => '',
'diskSizeGb' => 0,
'dumpHeapOnOom' => null,
'enableLauncherVmSerialPortLogging' => null,
'enableStreamingEngine' => null,
'flexrsGoal' => '',
'ipConfiguration' => '',
'kmsKeyName' => '',
'launcherMachineType' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'saveHeapDumpsToGcsPath' => '',
'sdkContainerImage' => '',
'serviceAccountEmail' => '',
'stagingLocation' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'image' => '',
'imageRepositoryCertPath' => '',
'imageRepositoryPasswordSecretId' => '',
'imageRepositoryUsernameSecretId' => '',
'metadata' => [
'description' => '',
'name' => '',
'parameters' => [
[
'customMetadata' => [
],
'groupName' => '',
'helpText' => '',
'isOptional' => null,
'label' => '',
'name' => '',
'paramType' => '',
'parentName' => '',
'parentTriggerValues' => [
],
'regexes' => [
]
]
]
],
'sdkInfo' => [
'language' => '',
'version' => ''
]
],
'containerSpecGcsPath' => '',
'environment' => [
],
'jobName' => '',
'launchOptions' => [
],
'parameters' => [
],
'transformNameMappings' => [
],
'update' => null
],
'validateOnly' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch');
$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}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"launchParameter": {
"containerSpec": {
"defaultEnvironment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": {
"description": "",
"name": "",
"parameters": [
{
"customMetadata": {},
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
}
]
},
"sdkInfo": {
"language": "",
"version": ""
}
},
"containerSpecGcsPath": "",
"environment": {},
"jobName": "",
"launchOptions": {},
"parameters": {},
"transformNameMappings": {},
"update": false
},
"validateOnly": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"launchParameter": {
"containerSpec": {
"defaultEnvironment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": {
"description": "",
"name": "",
"parameters": [
{
"customMetadata": {},
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
}
]
},
"sdkInfo": {
"language": "",
"version": ""
}
},
"containerSpecGcsPath": "",
"environment": {},
"jobName": "",
"launchOptions": {},
"parameters": {},
"transformNameMappings": {},
"update": false
},
"validateOnly": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/flexTemplates:launch", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch"
payload = {
"launchParameter": {
"containerSpec": {
"defaultEnvironment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": False,
"enableLauncherVmSerialPortLogging": False,
"enableStreamingEngine": False,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": {
"description": "",
"name": "",
"parameters": [
{
"customMetadata": {},
"groupName": "",
"helpText": "",
"isOptional": False,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
}
]
},
"sdkInfo": {
"language": "",
"version": ""
}
},
"containerSpecGcsPath": "",
"environment": {},
"jobName": "",
"launchOptions": {},
"parameters": {},
"transformNameMappings": {},
"update": False
},
"validateOnly": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch"
payload <- "{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch")
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 \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1b3/projects/:projectId/locations/:location/flexTemplates:launch') do |req|
req.body = "{\n \"launchParameter\": {\n \"containerSpec\": {\n \"defaultEnvironment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"autoscalingAlgorithm\": \"\",\n \"diskSizeGb\": 0,\n \"dumpHeapOnOom\": false,\n \"enableLauncherVmSerialPortLogging\": false,\n \"enableStreamingEngine\": false,\n \"flexrsGoal\": \"\",\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"launcherMachineType\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"saveHeapDumpsToGcsPath\": \"\",\n \"sdkContainerImage\": \"\",\n \"serviceAccountEmail\": \"\",\n \"stagingLocation\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"image\": \"\",\n \"imageRepositoryCertPath\": \"\",\n \"imageRepositoryPasswordSecretId\": \"\",\n \"imageRepositoryUsernameSecretId\": \"\",\n \"metadata\": {\n \"description\": \"\",\n \"name\": \"\",\n \"parameters\": [\n {\n \"customMetadata\": {},\n \"groupName\": \"\",\n \"helpText\": \"\",\n \"isOptional\": false,\n \"label\": \"\",\n \"name\": \"\",\n \"paramType\": \"\",\n \"parentName\": \"\",\n \"parentTriggerValues\": [],\n \"regexes\": []\n }\n ]\n },\n \"sdkInfo\": {\n \"language\": \"\",\n \"version\": \"\"\n }\n },\n \"containerSpecGcsPath\": \"\",\n \"environment\": {},\n \"jobName\": \"\",\n \"launchOptions\": {},\n \"parameters\": {},\n \"transformNameMappings\": {},\n \"update\": false\n },\n \"validateOnly\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch";
let payload = json!({
"launchParameter": json!({
"containerSpec": json!({
"defaultEnvironment": json!({
"additionalExperiments": (),
"additionalUserLabels": json!({}),
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
}),
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": json!({
"description": "",
"name": "",
"parameters": (
json!({
"customMetadata": json!({}),
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": (),
"regexes": ()
})
)
}),
"sdkInfo": json!({
"language": "",
"version": ""
})
}),
"containerSpecGcsPath": "",
"environment": json!({}),
"jobName": "",
"launchOptions": json!({}),
"parameters": json!({}),
"transformNameMappings": json!({}),
"update": false
}),
"validateOnly": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch \
--header 'content-type: application/json' \
--data '{
"launchParameter": {
"containerSpec": {
"defaultEnvironment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": {
"description": "",
"name": "",
"parameters": [
{
"customMetadata": {},
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
}
]
},
"sdkInfo": {
"language": "",
"version": ""
}
},
"containerSpecGcsPath": "",
"environment": {},
"jobName": "",
"launchOptions": {},
"parameters": {},
"transformNameMappings": {},
"update": false
},
"validateOnly": false
}'
echo '{
"launchParameter": {
"containerSpec": {
"defaultEnvironment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": {
"description": "",
"name": "",
"parameters": [
{
"customMetadata": {},
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
}
]
},
"sdkInfo": {
"language": "",
"version": ""
}
},
"containerSpecGcsPath": "",
"environment": {},
"jobName": "",
"launchOptions": {},
"parameters": {},
"transformNameMappings": {},
"update": false
},
"validateOnly": false
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "launchParameter": {\n "containerSpec": {\n "defaultEnvironment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "autoscalingAlgorithm": "",\n "diskSizeGb": 0,\n "dumpHeapOnOom": false,\n "enableLauncherVmSerialPortLogging": false,\n "enableStreamingEngine": false,\n "flexrsGoal": "",\n "ipConfiguration": "",\n "kmsKeyName": "",\n "launcherMachineType": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "saveHeapDumpsToGcsPath": "",\n "sdkContainerImage": "",\n "serviceAccountEmail": "",\n "stagingLocation": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "image": "",\n "imageRepositoryCertPath": "",\n "imageRepositoryPasswordSecretId": "",\n "imageRepositoryUsernameSecretId": "",\n "metadata": {\n "description": "",\n "name": "",\n "parameters": [\n {\n "customMetadata": {},\n "groupName": "",\n "helpText": "",\n "isOptional": false,\n "label": "",\n "name": "",\n "paramType": "",\n "parentName": "",\n "parentTriggerValues": [],\n "regexes": []\n }\n ]\n },\n "sdkInfo": {\n "language": "",\n "version": ""\n }\n },\n "containerSpecGcsPath": "",\n "environment": {},\n "jobName": "",\n "launchOptions": {},\n "parameters": {},\n "transformNameMappings": {},\n "update": false\n },\n "validateOnly": false\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"launchParameter": [
"containerSpec": [
"defaultEnvironment": [
"additionalExperiments": [],
"additionalUserLabels": [],
"autoscalingAlgorithm": "",
"diskSizeGb": 0,
"dumpHeapOnOom": false,
"enableLauncherVmSerialPortLogging": false,
"enableStreamingEngine": false,
"flexrsGoal": "",
"ipConfiguration": "",
"kmsKeyName": "",
"launcherMachineType": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"saveHeapDumpsToGcsPath": "",
"sdkContainerImage": "",
"serviceAccountEmail": "",
"stagingLocation": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
],
"image": "",
"imageRepositoryCertPath": "",
"imageRepositoryPasswordSecretId": "",
"imageRepositoryUsernameSecretId": "",
"metadata": [
"description": "",
"name": "",
"parameters": [
[
"customMetadata": [],
"groupName": "",
"helpText": "",
"isOptional": false,
"label": "",
"name": "",
"paramType": "",
"parentName": "",
"parentTriggerValues": [],
"regexes": []
]
]
],
"sdkInfo": [
"language": "",
"version": ""
]
],
"containerSpecGcsPath": "",
"environment": [],
"jobName": "",
"launchOptions": [],
"parameters": [],
"transformNameMappings": [],
"update": false
],
"validateOnly": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/flexTemplates:launch")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.locations.jobs.create
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs
QUERY PARAMS
projectId
location
BODY json
{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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 \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs" {:content-type :json
:form-params {:clientRequestId ""
:createTime ""
:createdFromSnapshotId ""
:currentState ""
:currentStateTime ""
:environment {:clusterManagerApiService ""
:dataset ""
:debugOptions {:enableHotKeyLogging false}
:experiments []
:flexResourceSchedulingGoal ""
:internalExperiments {}
:sdkPipelineOptions {}
:serviceAccountEmail ""
:serviceKmsKeyName ""
:serviceOptions []
:shuffleMode ""
:tempStoragePrefix ""
:userAgent {}
:version {}
:workerPools [{:autoscalingSettings {:algorithm ""
:maxNumWorkers 0}
:dataDisks [{:diskType ""
:mountPoint ""
:sizeGb 0}]
:defaultPackageSet ""
:diskSizeGb 0
:diskSourceImage ""
:diskType ""
:ipConfiguration ""
:kind ""
:machineType ""
:metadata {}
:network ""
:numThreadsPerWorker 0
:numWorkers 0
:onHostMaintenance ""
:packages [{:location ""
:name ""}]
:poolArgs {}
:sdkHarnessContainerImages [{:capabilities []
:containerImage ""
:environmentId ""
:useSingleCorePerContainer false}]
:subnetwork ""
:taskrunnerSettings {:alsologtostderr false
:baseTaskDir ""
:baseUrl ""
:commandlinesFileName ""
:continueOnException false
:dataflowApiVersion ""
:harnessCommand ""
:languageHint ""
:logDir ""
:logToSerialconsole false
:logUploadLocation ""
:oauthScopes []
:parallelWorkerSettings {:baseUrl ""
:reportingEnabled false
:servicePath ""
:shuffleServicePath ""
:tempStoragePrefix ""
:workerId ""}
:streamingWorkerMainClass ""
:taskGroup ""
:taskUser ""
:tempStoragePrefix ""
:vmId ""
:workflowFileName ""}
:teardownPolicy ""
:workerHarnessContainerImage ""
:zone ""}]
:workerRegion ""
:workerZone ""}
:executionInfo {:stages {}}
:id ""
:jobMetadata {:bigTableDetails [{:instanceId ""
:projectId ""
:tableId ""}]
:bigqueryDetails [{:dataset ""
:projectId ""
:query ""
:table ""}]
:datastoreDetails [{:namespace ""
:projectId ""}]
:fileDetails [{:filePattern ""}]
:pubsubDetails [{:subscription ""
:topic ""}]
:sdkVersion {:sdkSupportStatus ""
:version ""
:versionDisplayName ""}
:spannerDetails [{:databaseId ""
:instanceId ""
:projectId ""}]
:userDisplayProperties {}}
:labels {}
:location ""
:name ""
:pipelineDescription {:displayData [{:boolValue false
:durationValue ""
:floatValue ""
:int64Value ""
:javaClassValue ""
:key ""
:label ""
:namespace ""
:shortStrValue ""
:strValue ""
:timestampValue ""
:url ""}]
:executionPipelineStage [{:componentSource [{:name ""
:originalTransformOrCollection ""
:userName ""}]
:componentTransform [{:name ""
:originalTransform ""
:userName ""}]
:id ""
:inputSource [{:name ""
:originalTransformOrCollection ""
:sizeBytes ""
:userName ""}]
:kind ""
:name ""
:outputSource [{}]
:prerequisiteStage []}]
:originalPipelineTransform [{:displayData [{}]
:id ""
:inputCollectionName []
:kind ""
:name ""
:outputCollectionName []}]
:stepNamesHash ""}
:projectId ""
:replaceJobId ""
:replacedByJobId ""
:requestedState ""
:satisfiesPzs false
:stageStates [{:currentStateTime ""
:executionStageName ""
:executionStageState ""}]
:startTime ""
:steps [{:kind ""
:name ""
:properties {}}]
:stepsLocation ""
:tempFiles []
:transformNameMapping {}
:type ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs"),
Content = new StringContent("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs"
payload := strings.NewReader("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1b3/projects/:projectId/locations/:location/jobs HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5262
{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs")
.header("content-type", "application/json")
.body("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {
enableHotKeyLogging: false
},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {
algorithm: '',
maxNumWorkers: 0
},
dataDisks: [
{
diskType: '',
mountPoint: '',
sizeGb: 0
}
],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [
{
location: '',
name: ''
}
],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {
stages: {}
},
id: '',
jobMetadata: {
bigTableDetails: [
{
instanceId: '',
projectId: '',
tableId: ''
}
],
bigqueryDetails: [
{
dataset: '',
projectId: '',
query: '',
table: ''
}
],
datastoreDetails: [
{
namespace: '',
projectId: ''
}
],
fileDetails: [
{
filePattern: ''
}
],
pubsubDetails: [
{
subscription: '',
topic: ''
}
],
sdkVersion: {
sdkSupportStatus: '',
version: '',
versionDisplayName: ''
},
spannerDetails: [
{
databaseId: '',
instanceId: '',
projectId: ''
}
],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [
{
name: '',
originalTransformOrCollection: '',
userName: ''
}
],
componentTransform: [
{
name: '',
originalTransform: '',
userName: ''
}
],
id: '',
inputSource: [
{
name: '',
originalTransformOrCollection: '',
sizeBytes: '',
userName: ''
}
],
kind: '',
name: '',
outputSource: [
{}
],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [
{}
],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [
{
currentStateTime: '',
executionStageName: '',
executionStageState: ''
}
],
startTime: '',
steps: [
{
kind: '',
name: '',
properties: {}
}
],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs',
headers: {'content-type': 'application/json'},
data: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientRequestId":"","createTime":"","createdFromSnapshotId":"","currentState":"","currentStateTime":"","environment":{"clusterManagerApiService":"","dataset":"","debugOptions":{"enableHotKeyLogging":false},"experiments":[],"flexResourceSchedulingGoal":"","internalExperiments":{},"sdkPipelineOptions":{},"serviceAccountEmail":"","serviceKmsKeyName":"","serviceOptions":[],"shuffleMode":"","tempStoragePrefix":"","userAgent":{},"version":{},"workerPools":[{"autoscalingSettings":{"algorithm":"","maxNumWorkers":0},"dataDisks":[{"diskType":"","mountPoint":"","sizeGb":0}],"defaultPackageSet":"","diskSizeGb":0,"diskSourceImage":"","diskType":"","ipConfiguration":"","kind":"","machineType":"","metadata":{},"network":"","numThreadsPerWorker":0,"numWorkers":0,"onHostMaintenance":"","packages":[{"location":"","name":""}],"poolArgs":{},"sdkHarnessContainerImages":[{"capabilities":[],"containerImage":"","environmentId":"","useSingleCorePerContainer":false}],"subnetwork":"","taskrunnerSettings":{"alsologtostderr":false,"baseTaskDir":"","baseUrl":"","commandlinesFileName":"","continueOnException":false,"dataflowApiVersion":"","harnessCommand":"","languageHint":"","logDir":"","logToSerialconsole":false,"logUploadLocation":"","oauthScopes":[],"parallelWorkerSettings":{"baseUrl":"","reportingEnabled":false,"servicePath":"","shuffleServicePath":"","tempStoragePrefix":"","workerId":""},"streamingWorkerMainClass":"","taskGroup":"","taskUser":"","tempStoragePrefix":"","vmId":"","workflowFileName":""},"teardownPolicy":"","workerHarnessContainerImage":"","zone":""}],"workerRegion":"","workerZone":""},"executionInfo":{"stages":{}},"id":"","jobMetadata":{"bigTableDetails":[{"instanceId":"","projectId":"","tableId":""}],"bigqueryDetails":[{"dataset":"","projectId":"","query":"","table":""}],"datastoreDetails":[{"namespace":"","projectId":""}],"fileDetails":[{"filePattern":""}],"pubsubDetails":[{"subscription":"","topic":""}],"sdkVersion":{"sdkSupportStatus":"","version":"","versionDisplayName":""},"spannerDetails":[{"databaseId":"","instanceId":"","projectId":""}],"userDisplayProperties":{}},"labels":{},"location":"","name":"","pipelineDescription":{"displayData":[{"boolValue":false,"durationValue":"","floatValue":"","int64Value":"","javaClassValue":"","key":"","label":"","namespace":"","shortStrValue":"","strValue":"","timestampValue":"","url":""}],"executionPipelineStage":[{"componentSource":[{"name":"","originalTransformOrCollection":"","userName":""}],"componentTransform":[{"name":"","originalTransform":"","userName":""}],"id":"","inputSource":[{"name":"","originalTransformOrCollection":"","sizeBytes":"","userName":""}],"kind":"","name":"","outputSource":[{}],"prerequisiteStage":[]}],"originalPipelineTransform":[{"displayData":[{}],"id":"","inputCollectionName":[],"kind":"","name":"","outputCollectionName":[]}],"stepNamesHash":""},"projectId":"","replaceJobId":"","replacedByJobId":"","requestedState":"","satisfiesPzs":false,"stageStates":[{"currentStateTime":"","executionStageName":"","executionStageState":""}],"startTime":"","steps":[{"kind":"","name":"","properties":{}}],"stepsLocation":"","tempFiles":[],"transformNameMapping":{},"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientRequestId": "",\n "createTime": "",\n "createdFromSnapshotId": "",\n "currentState": "",\n "currentStateTime": "",\n "environment": {\n "clusterManagerApiService": "",\n "dataset": "",\n "debugOptions": {\n "enableHotKeyLogging": false\n },\n "experiments": [],\n "flexResourceSchedulingGoal": "",\n "internalExperiments": {},\n "sdkPipelineOptions": {},\n "serviceAccountEmail": "",\n "serviceKmsKeyName": "",\n "serviceOptions": [],\n "shuffleMode": "",\n "tempStoragePrefix": "",\n "userAgent": {},\n "version": {},\n "workerPools": [\n {\n "autoscalingSettings": {\n "algorithm": "",\n "maxNumWorkers": 0\n },\n "dataDisks": [\n {\n "diskType": "",\n "mountPoint": "",\n "sizeGb": 0\n }\n ],\n "defaultPackageSet": "",\n "diskSizeGb": 0,\n "diskSourceImage": "",\n "diskType": "",\n "ipConfiguration": "",\n "kind": "",\n "machineType": "",\n "metadata": {},\n "network": "",\n "numThreadsPerWorker": 0,\n "numWorkers": 0,\n "onHostMaintenance": "",\n "packages": [\n {\n "location": "",\n "name": ""\n }\n ],\n "poolArgs": {},\n "sdkHarnessContainerImages": [\n {\n "capabilities": [],\n "containerImage": "",\n "environmentId": "",\n "useSingleCorePerContainer": false\n }\n ],\n "subnetwork": "",\n "taskrunnerSettings": {\n "alsologtostderr": false,\n "baseTaskDir": "",\n "baseUrl": "",\n "commandlinesFileName": "",\n "continueOnException": false,\n "dataflowApiVersion": "",\n "harnessCommand": "",\n "languageHint": "",\n "logDir": "",\n "logToSerialconsole": false,\n "logUploadLocation": "",\n "oauthScopes": [],\n "parallelWorkerSettings": {\n "baseUrl": "",\n "reportingEnabled": false,\n "servicePath": "",\n "shuffleServicePath": "",\n "tempStoragePrefix": "",\n "workerId": ""\n },\n "streamingWorkerMainClass": "",\n "taskGroup": "",\n "taskUser": "",\n "tempStoragePrefix": "",\n "vmId": "",\n "workflowFileName": ""\n },\n "teardownPolicy": "",\n "workerHarnessContainerImage": "",\n "zone": ""\n }\n ],\n "workerRegion": "",\n "workerZone": ""\n },\n "executionInfo": {\n "stages": {}\n },\n "id": "",\n "jobMetadata": {\n "bigTableDetails": [\n {\n "instanceId": "",\n "projectId": "",\n "tableId": ""\n }\n ],\n "bigqueryDetails": [\n {\n "dataset": "",\n "projectId": "",\n "query": "",\n "table": ""\n }\n ],\n "datastoreDetails": [\n {\n "namespace": "",\n "projectId": ""\n }\n ],\n "fileDetails": [\n {\n "filePattern": ""\n }\n ],\n "pubsubDetails": [\n {\n "subscription": "",\n "topic": ""\n }\n ],\n "sdkVersion": {\n "sdkSupportStatus": "",\n "version": "",\n "versionDisplayName": ""\n },\n "spannerDetails": [\n {\n "databaseId": "",\n "instanceId": "",\n "projectId": ""\n }\n ],\n "userDisplayProperties": {}\n },\n "labels": {},\n "location": "",\n "name": "",\n "pipelineDescription": {\n "displayData": [\n {\n "boolValue": false,\n "durationValue": "",\n "floatValue": "",\n "int64Value": "",\n "javaClassValue": "",\n "key": "",\n "label": "",\n "namespace": "",\n "shortStrValue": "",\n "strValue": "",\n "timestampValue": "",\n "url": ""\n }\n ],\n "executionPipelineStage": [\n {\n "componentSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "userName": ""\n }\n ],\n "componentTransform": [\n {\n "name": "",\n "originalTransform": "",\n "userName": ""\n }\n ],\n "id": "",\n "inputSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "sizeBytes": "",\n "userName": ""\n }\n ],\n "kind": "",\n "name": "",\n "outputSource": [\n {}\n ],\n "prerequisiteStage": []\n }\n ],\n "originalPipelineTransform": [\n {\n "displayData": [\n {}\n ],\n "id": "",\n "inputCollectionName": [],\n "kind": "",\n "name": "",\n "outputCollectionName": []\n }\n ],\n "stepNamesHash": ""\n },\n "projectId": "",\n "replaceJobId": "",\n "replacedByJobId": "",\n "requestedState": "",\n "satisfiesPzs": false,\n "stageStates": [\n {\n "currentStateTime": "",\n "executionStageName": "",\n "executionStageState": ""\n }\n ],\n "startTime": "",\n "steps": [\n {\n "kind": "",\n "name": "",\n "properties": {}\n }\n ],\n "stepsLocation": "",\n "tempFiles": [],\n "transformNameMapping": {},\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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/v1b3/projects/:projectId/locations/:location/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({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs',
headers: {'content-type': 'application/json'},
body: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {
enableHotKeyLogging: false
},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {
algorithm: '',
maxNumWorkers: 0
},
dataDisks: [
{
diskType: '',
mountPoint: '',
sizeGb: 0
}
],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [
{
location: '',
name: ''
}
],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {
stages: {}
},
id: '',
jobMetadata: {
bigTableDetails: [
{
instanceId: '',
projectId: '',
tableId: ''
}
],
bigqueryDetails: [
{
dataset: '',
projectId: '',
query: '',
table: ''
}
],
datastoreDetails: [
{
namespace: '',
projectId: ''
}
],
fileDetails: [
{
filePattern: ''
}
],
pubsubDetails: [
{
subscription: '',
topic: ''
}
],
sdkVersion: {
sdkSupportStatus: '',
version: '',
versionDisplayName: ''
},
spannerDetails: [
{
databaseId: '',
instanceId: '',
projectId: ''
}
],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [
{
name: '',
originalTransformOrCollection: '',
userName: ''
}
],
componentTransform: [
{
name: '',
originalTransform: '',
userName: ''
}
],
id: '',
inputSource: [
{
name: '',
originalTransformOrCollection: '',
sizeBytes: '',
userName: ''
}
],
kind: '',
name: '',
outputSource: [
{}
],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [
{}
],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [
{
currentStateTime: '',
executionStageName: '',
executionStageState: ''
}
],
startTime: '',
steps: [
{
kind: '',
name: '',
properties: {}
}
],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs',
headers: {'content-type': 'application/json'},
data: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clientRequestId":"","createTime":"","createdFromSnapshotId":"","currentState":"","currentStateTime":"","environment":{"clusterManagerApiService":"","dataset":"","debugOptions":{"enableHotKeyLogging":false},"experiments":[],"flexResourceSchedulingGoal":"","internalExperiments":{},"sdkPipelineOptions":{},"serviceAccountEmail":"","serviceKmsKeyName":"","serviceOptions":[],"shuffleMode":"","tempStoragePrefix":"","userAgent":{},"version":{},"workerPools":[{"autoscalingSettings":{"algorithm":"","maxNumWorkers":0},"dataDisks":[{"diskType":"","mountPoint":"","sizeGb":0}],"defaultPackageSet":"","diskSizeGb":0,"diskSourceImage":"","diskType":"","ipConfiguration":"","kind":"","machineType":"","metadata":{},"network":"","numThreadsPerWorker":0,"numWorkers":0,"onHostMaintenance":"","packages":[{"location":"","name":""}],"poolArgs":{},"sdkHarnessContainerImages":[{"capabilities":[],"containerImage":"","environmentId":"","useSingleCorePerContainer":false}],"subnetwork":"","taskrunnerSettings":{"alsologtostderr":false,"baseTaskDir":"","baseUrl":"","commandlinesFileName":"","continueOnException":false,"dataflowApiVersion":"","harnessCommand":"","languageHint":"","logDir":"","logToSerialconsole":false,"logUploadLocation":"","oauthScopes":[],"parallelWorkerSettings":{"baseUrl":"","reportingEnabled":false,"servicePath":"","shuffleServicePath":"","tempStoragePrefix":"","workerId":""},"streamingWorkerMainClass":"","taskGroup":"","taskUser":"","tempStoragePrefix":"","vmId":"","workflowFileName":""},"teardownPolicy":"","workerHarnessContainerImage":"","zone":""}],"workerRegion":"","workerZone":""},"executionInfo":{"stages":{}},"id":"","jobMetadata":{"bigTableDetails":[{"instanceId":"","projectId":"","tableId":""}],"bigqueryDetails":[{"dataset":"","projectId":"","query":"","table":""}],"datastoreDetails":[{"namespace":"","projectId":""}],"fileDetails":[{"filePattern":""}],"pubsubDetails":[{"subscription":"","topic":""}],"sdkVersion":{"sdkSupportStatus":"","version":"","versionDisplayName":""},"spannerDetails":[{"databaseId":"","instanceId":"","projectId":""}],"userDisplayProperties":{}},"labels":{},"location":"","name":"","pipelineDescription":{"displayData":[{"boolValue":false,"durationValue":"","floatValue":"","int64Value":"","javaClassValue":"","key":"","label":"","namespace":"","shortStrValue":"","strValue":"","timestampValue":"","url":""}],"executionPipelineStage":[{"componentSource":[{"name":"","originalTransformOrCollection":"","userName":""}],"componentTransform":[{"name":"","originalTransform":"","userName":""}],"id":"","inputSource":[{"name":"","originalTransformOrCollection":"","sizeBytes":"","userName":""}],"kind":"","name":"","outputSource":[{}],"prerequisiteStage":[]}],"originalPipelineTransform":[{"displayData":[{}],"id":"","inputCollectionName":[],"kind":"","name":"","outputCollectionName":[]}],"stepNamesHash":""},"projectId":"","replaceJobId":"","replacedByJobId":"","requestedState":"","satisfiesPzs":false,"stageStates":[{"currentStateTime":"","executionStageName":"","executionStageState":""}],"startTime":"","steps":[{"kind":"","name":"","properties":{}}],"stepsLocation":"","tempFiles":[],"transformNameMapping":{},"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientRequestId": @"",
@"createTime": @"",
@"createdFromSnapshotId": @"",
@"currentState": @"",
@"currentStateTime": @"",
@"environment": @{ @"clusterManagerApiService": @"", @"dataset": @"", @"debugOptions": @{ @"enableHotKeyLogging": @NO }, @"experiments": @[ ], @"flexResourceSchedulingGoal": @"", @"internalExperiments": @{ }, @"sdkPipelineOptions": @{ }, @"serviceAccountEmail": @"", @"serviceKmsKeyName": @"", @"serviceOptions": @[ ], @"shuffleMode": @"", @"tempStoragePrefix": @"", @"userAgent": @{ }, @"version": @{ }, @"workerPools": @[ @{ @"autoscalingSettings": @{ @"algorithm": @"", @"maxNumWorkers": @0 }, @"dataDisks": @[ @{ @"diskType": @"", @"mountPoint": @"", @"sizeGb": @0 } ], @"defaultPackageSet": @"", @"diskSizeGb": @0, @"diskSourceImage": @"", @"diskType": @"", @"ipConfiguration": @"", @"kind": @"", @"machineType": @"", @"metadata": @{ }, @"network": @"", @"numThreadsPerWorker": @0, @"numWorkers": @0, @"onHostMaintenance": @"", @"packages": @[ @{ @"location": @"", @"name": @"" } ], @"poolArgs": @{ }, @"sdkHarnessContainerImages": @[ @{ @"capabilities": @[ ], @"containerImage": @"", @"environmentId": @"", @"useSingleCorePerContainer": @NO } ], @"subnetwork": @"", @"taskrunnerSettings": @{ @"alsologtostderr": @NO, @"baseTaskDir": @"", @"baseUrl": @"", @"commandlinesFileName": @"", @"continueOnException": @NO, @"dataflowApiVersion": @"", @"harnessCommand": @"", @"languageHint": @"", @"logDir": @"", @"logToSerialconsole": @NO, @"logUploadLocation": @"", @"oauthScopes": @[ ], @"parallelWorkerSettings": @{ @"baseUrl": @"", @"reportingEnabled": @NO, @"servicePath": @"", @"shuffleServicePath": @"", @"tempStoragePrefix": @"", @"workerId": @"" }, @"streamingWorkerMainClass": @"", @"taskGroup": @"", @"taskUser": @"", @"tempStoragePrefix": @"", @"vmId": @"", @"workflowFileName": @"" }, @"teardownPolicy": @"", @"workerHarnessContainerImage": @"", @"zone": @"" } ], @"workerRegion": @"", @"workerZone": @"" },
@"executionInfo": @{ @"stages": @{ } },
@"id": @"",
@"jobMetadata": @{ @"bigTableDetails": @[ @{ @"instanceId": @"", @"projectId": @"", @"tableId": @"" } ], @"bigqueryDetails": @[ @{ @"dataset": @"", @"projectId": @"", @"query": @"", @"table": @"" } ], @"datastoreDetails": @[ @{ @"namespace": @"", @"projectId": @"" } ], @"fileDetails": @[ @{ @"filePattern": @"" } ], @"pubsubDetails": @[ @{ @"subscription": @"", @"topic": @"" } ], @"sdkVersion": @{ @"sdkSupportStatus": @"", @"version": @"", @"versionDisplayName": @"" }, @"spannerDetails": @[ @{ @"databaseId": @"", @"instanceId": @"", @"projectId": @"" } ], @"userDisplayProperties": @{ } },
@"labels": @{ },
@"location": @"",
@"name": @"",
@"pipelineDescription": @{ @"displayData": @[ @{ @"boolValue": @NO, @"durationValue": @"", @"floatValue": @"", @"int64Value": @"", @"javaClassValue": @"", @"key": @"", @"label": @"", @"namespace": @"", @"shortStrValue": @"", @"strValue": @"", @"timestampValue": @"", @"url": @"" } ], @"executionPipelineStage": @[ @{ @"componentSource": @[ @{ @"name": @"", @"originalTransformOrCollection": @"", @"userName": @"" } ], @"componentTransform": @[ @{ @"name": @"", @"originalTransform": @"", @"userName": @"" } ], @"id": @"", @"inputSource": @[ @{ @"name": @"", @"originalTransformOrCollection": @"", @"sizeBytes": @"", @"userName": @"" } ], @"kind": @"", @"name": @"", @"outputSource": @[ @{ } ], @"prerequisiteStage": @[ ] } ], @"originalPipelineTransform": @[ @{ @"displayData": @[ @{ } ], @"id": @"", @"inputCollectionName": @[ ], @"kind": @"", @"name": @"", @"outputCollectionName": @[ ] } ], @"stepNamesHash": @"" },
@"projectId": @"",
@"replaceJobId": @"",
@"replacedByJobId": @"",
@"requestedState": @"",
@"satisfiesPzs": @NO,
@"stageStates": @[ @{ @"currentStateTime": @"", @"executionStageName": @"", @"executionStageState": @"" } ],
@"startTime": @"",
@"steps": @[ @{ @"kind": @"", @"name": @"", @"properties": @{ } } ],
@"stepsLocation": @"",
@"tempFiles": @[ ],
@"transformNameMapping": @{ },
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs', [
'body' => '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs"
payload = {
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": { "enableHotKeyLogging": False },
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": False
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": False,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": False,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": False,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": False,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": { "stages": {} },
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [{ "filePattern": "" }],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": False,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [{}],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [{}],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": False,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs"
payload <- "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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 \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1b3/projects/:projectId/locations/:location/jobs') do |req|
req.body = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs";
let payload = json!({
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": json!({
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": json!({"enableHotKeyLogging": false}),
"experiments": (),
"flexResourceSchedulingGoal": "",
"internalExperiments": json!({}),
"sdkPipelineOptions": json!({}),
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": (),
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": json!({}),
"version": json!({}),
"workerPools": (
json!({
"autoscalingSettings": json!({
"algorithm": "",
"maxNumWorkers": 0
}),
"dataDisks": (
json!({
"diskType": "",
"mountPoint": "",
"sizeGb": 0
})
),
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": json!({}),
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": (
json!({
"location": "",
"name": ""
})
),
"poolArgs": json!({}),
"sdkHarnessContainerImages": (
json!({
"capabilities": (),
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
})
),
"subnetwork": "",
"taskrunnerSettings": json!({
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": (),
"parallelWorkerSettings": json!({
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
}),
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
}),
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
})
),
"workerRegion": "",
"workerZone": ""
}),
"executionInfo": json!({"stages": json!({})}),
"id": "",
"jobMetadata": json!({
"bigTableDetails": (
json!({
"instanceId": "",
"projectId": "",
"tableId": ""
})
),
"bigqueryDetails": (
json!({
"dataset": "",
"projectId": "",
"query": "",
"table": ""
})
),
"datastoreDetails": (
json!({
"namespace": "",
"projectId": ""
})
),
"fileDetails": (json!({"filePattern": ""})),
"pubsubDetails": (
json!({
"subscription": "",
"topic": ""
})
),
"sdkVersion": json!({
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
}),
"spannerDetails": (
json!({
"databaseId": "",
"instanceId": "",
"projectId": ""
})
),
"userDisplayProperties": json!({})
}),
"labels": json!({}),
"location": "",
"name": "",
"pipelineDescription": json!({
"displayData": (
json!({
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
})
),
"executionPipelineStage": (
json!({
"componentSource": (
json!({
"name": "",
"originalTransformOrCollection": "",
"userName": ""
})
),
"componentTransform": (
json!({
"name": "",
"originalTransform": "",
"userName": ""
})
),
"id": "",
"inputSource": (
json!({
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
})
),
"kind": "",
"name": "",
"outputSource": (json!({})),
"prerequisiteStage": ()
})
),
"originalPipelineTransform": (
json!({
"displayData": (json!({})),
"id": "",
"inputCollectionName": (),
"kind": "",
"name": "",
"outputCollectionName": ()
})
),
"stepNamesHash": ""
}),
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": (
json!({
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
})
),
"startTime": "",
"steps": (
json!({
"kind": "",
"name": "",
"properties": json!({})
})
),
"stepsLocation": "",
"tempFiles": (),
"transformNameMapping": json!({}),
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs \
--header 'content-type: application/json' \
--data '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
echo '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clientRequestId": "",\n "createTime": "",\n "createdFromSnapshotId": "",\n "currentState": "",\n "currentStateTime": "",\n "environment": {\n "clusterManagerApiService": "",\n "dataset": "",\n "debugOptions": {\n "enableHotKeyLogging": false\n },\n "experiments": [],\n "flexResourceSchedulingGoal": "",\n "internalExperiments": {},\n "sdkPipelineOptions": {},\n "serviceAccountEmail": "",\n "serviceKmsKeyName": "",\n "serviceOptions": [],\n "shuffleMode": "",\n "tempStoragePrefix": "",\n "userAgent": {},\n "version": {},\n "workerPools": [\n {\n "autoscalingSettings": {\n "algorithm": "",\n "maxNumWorkers": 0\n },\n "dataDisks": [\n {\n "diskType": "",\n "mountPoint": "",\n "sizeGb": 0\n }\n ],\n "defaultPackageSet": "",\n "diskSizeGb": 0,\n "diskSourceImage": "",\n "diskType": "",\n "ipConfiguration": "",\n "kind": "",\n "machineType": "",\n "metadata": {},\n "network": "",\n "numThreadsPerWorker": 0,\n "numWorkers": 0,\n "onHostMaintenance": "",\n "packages": [\n {\n "location": "",\n "name": ""\n }\n ],\n "poolArgs": {},\n "sdkHarnessContainerImages": [\n {\n "capabilities": [],\n "containerImage": "",\n "environmentId": "",\n "useSingleCorePerContainer": false\n }\n ],\n "subnetwork": "",\n "taskrunnerSettings": {\n "alsologtostderr": false,\n "baseTaskDir": "",\n "baseUrl": "",\n "commandlinesFileName": "",\n "continueOnException": false,\n "dataflowApiVersion": "",\n "harnessCommand": "",\n "languageHint": "",\n "logDir": "",\n "logToSerialconsole": false,\n "logUploadLocation": "",\n "oauthScopes": [],\n "parallelWorkerSettings": {\n "baseUrl": "",\n "reportingEnabled": false,\n "servicePath": "",\n "shuffleServicePath": "",\n "tempStoragePrefix": "",\n "workerId": ""\n },\n "streamingWorkerMainClass": "",\n "taskGroup": "",\n "taskUser": "",\n "tempStoragePrefix": "",\n "vmId": "",\n "workflowFileName": ""\n },\n "teardownPolicy": "",\n "workerHarnessContainerImage": "",\n "zone": ""\n }\n ],\n "workerRegion": "",\n "workerZone": ""\n },\n "executionInfo": {\n "stages": {}\n },\n "id": "",\n "jobMetadata": {\n "bigTableDetails": [\n {\n "instanceId": "",\n "projectId": "",\n "tableId": ""\n }\n ],\n "bigqueryDetails": [\n {\n "dataset": "",\n "projectId": "",\n "query": "",\n "table": ""\n }\n ],\n "datastoreDetails": [\n {\n "namespace": "",\n "projectId": ""\n }\n ],\n "fileDetails": [\n {\n "filePattern": ""\n }\n ],\n "pubsubDetails": [\n {\n "subscription": "",\n "topic": ""\n }\n ],\n "sdkVersion": {\n "sdkSupportStatus": "",\n "version": "",\n "versionDisplayName": ""\n },\n "spannerDetails": [\n {\n "databaseId": "",\n "instanceId": "",\n "projectId": ""\n }\n ],\n "userDisplayProperties": {}\n },\n "labels": {},\n "location": "",\n "name": "",\n "pipelineDescription": {\n "displayData": [\n {\n "boolValue": false,\n "durationValue": "",\n "floatValue": "",\n "int64Value": "",\n "javaClassValue": "",\n "key": "",\n "label": "",\n "namespace": "",\n "shortStrValue": "",\n "strValue": "",\n "timestampValue": "",\n "url": ""\n }\n ],\n "executionPipelineStage": [\n {\n "componentSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "userName": ""\n }\n ],\n "componentTransform": [\n {\n "name": "",\n "originalTransform": "",\n "userName": ""\n }\n ],\n "id": "",\n "inputSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "sizeBytes": "",\n "userName": ""\n }\n ],\n "kind": "",\n "name": "",\n "outputSource": [\n {}\n ],\n "prerequisiteStage": []\n }\n ],\n "originalPipelineTransform": [\n {\n "displayData": [\n {}\n ],\n "id": "",\n "inputCollectionName": [],\n "kind": "",\n "name": "",\n "outputCollectionName": []\n }\n ],\n "stepNamesHash": ""\n },\n "projectId": "",\n "replaceJobId": "",\n "replacedByJobId": "",\n "requestedState": "",\n "satisfiesPzs": false,\n "stageStates": [\n {\n "currentStateTime": "",\n "executionStageName": "",\n "executionStageState": ""\n }\n ],\n "startTime": "",\n "steps": [\n {\n "kind": "",\n "name": "",\n "properties": {}\n }\n ],\n "stepsLocation": "",\n "tempFiles": [],\n "transformNameMapping": {},\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": [
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": ["enableHotKeyLogging": false],
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": [],
"sdkPipelineOptions": [],
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": [],
"version": [],
"workerPools": [
[
"autoscalingSettings": [
"algorithm": "",
"maxNumWorkers": 0
],
"dataDisks": [
[
"diskType": "",
"mountPoint": "",
"sizeGb": 0
]
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": [],
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
[
"location": "",
"name": ""
]
],
"poolArgs": [],
"sdkHarnessContainerImages": [
[
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
]
],
"subnetwork": "",
"taskrunnerSettings": [
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": [
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
],
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
],
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
]
],
"workerRegion": "",
"workerZone": ""
],
"executionInfo": ["stages": []],
"id": "",
"jobMetadata": [
"bigTableDetails": [
[
"instanceId": "",
"projectId": "",
"tableId": ""
]
],
"bigqueryDetails": [
[
"dataset": "",
"projectId": "",
"query": "",
"table": ""
]
],
"datastoreDetails": [
[
"namespace": "",
"projectId": ""
]
],
"fileDetails": [["filePattern": ""]],
"pubsubDetails": [
[
"subscription": "",
"topic": ""
]
],
"sdkVersion": [
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
],
"spannerDetails": [
[
"databaseId": "",
"instanceId": "",
"projectId": ""
]
],
"userDisplayProperties": []
],
"labels": [],
"location": "",
"name": "",
"pipelineDescription": [
"displayData": [
[
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
]
],
"executionPipelineStage": [
[
"componentSource": [
[
"name": "",
"originalTransformOrCollection": "",
"userName": ""
]
],
"componentTransform": [
[
"name": "",
"originalTransform": "",
"userName": ""
]
],
"id": "",
"inputSource": [
[
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
]
],
"kind": "",
"name": "",
"outputSource": [[]],
"prerequisiteStage": []
]
],
"originalPipelineTransform": [
[
"displayData": [[]],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
]
],
"stepNamesHash": ""
],
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
[
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
]
],
"startTime": "",
"steps": [
[
"kind": "",
"name": "",
"properties": []
]
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": [],
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.locations.jobs.debug.getConfig
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig
QUERY PARAMS
projectId
location
jobId
BODY json
{
"componentId": "",
"location": "",
"workerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig");
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 \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig" {:content-type :json
:form-params {:componentId ""
:location ""
:workerId ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig"),
Content = new StringContent("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig"
payload := strings.NewReader("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"componentId": "",
"location": "",
"workerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig")
.setHeader("content-type", "application/json")
.setBody("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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 \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig")
.header("content-type", "application/json")
.body("{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
componentId: '',
location: '',
workerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig',
headers: {'content-type': 'application/json'},
data: {componentId: '', location: '', workerId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"componentId":"","location":"","workerId":""}'
};
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "componentId": "",\n "location": "",\n "workerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig")
.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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig',
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({componentId: '', location: '', workerId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig',
headers: {'content-type': 'application/json'},
body: {componentId: '', location: '', workerId: ''},
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
componentId: '',
location: '',
workerId: ''
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig',
headers: {'content-type': 'application/json'},
data: {componentId: '', location: '', workerId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"componentId":"","location":"","workerId":""}'
};
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 = @{ @"componentId": @"",
@"location": @"",
@"workerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig",
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([
'componentId' => '',
'location' => '',
'workerId' => ''
]),
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig', [
'body' => '{
"componentId": "",
"location": "",
"workerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'componentId' => '',
'location' => '',
'workerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'componentId' => '',
'location' => '',
'workerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig');
$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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"componentId": "",
"location": "",
"workerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"componentId": "",
"location": "",
"workerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig"
payload = {
"componentId": "",
"location": "",
"workerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig"
payload <- "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig")
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 \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig') do |req|
req.body = "{\n \"componentId\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig";
let payload = json!({
"componentId": "",
"location": "",
"workerId": ""
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig \
--header 'content-type: application/json' \
--data '{
"componentId": "",
"location": "",
"workerId": ""
}'
echo '{
"componentId": "",
"location": "",
"workerId": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "componentId": "",\n "location": "",\n "workerId": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"componentId": "",
"location": "",
"workerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/getConfig")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.locations.jobs.debug.sendCapture
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture
QUERY PARAMS
projectId
location
jobId
BODY json
{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture");
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 \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture" {:content-type :json
:form-params {:componentId ""
:data ""
:dataFormat ""
:location ""
:workerId ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture"),
Content = new StringContent("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture"
payload := strings.NewReader("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 93
{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture")
.setHeader("content-type", "application/json")
.setBody("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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 \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture")
.header("content-type", "application/json")
.body("{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
componentId: '',
data: '',
dataFormat: '',
location: '',
workerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture',
headers: {'content-type': 'application/json'},
data: {componentId: '', data: '', dataFormat: '', location: '', workerId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"componentId":"","data":"","dataFormat":"","location":"","workerId":""}'
};
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "componentId": "",\n "data": "",\n "dataFormat": "",\n "location": "",\n "workerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture")
.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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture',
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({componentId: '', data: '', dataFormat: '', location: '', workerId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture',
headers: {'content-type': 'application/json'},
body: {componentId: '', data: '', dataFormat: '', location: '', workerId: ''},
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
componentId: '',
data: '',
dataFormat: '',
location: '',
workerId: ''
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture',
headers: {'content-type': 'application/json'},
data: {componentId: '', data: '', dataFormat: '', location: '', workerId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"componentId":"","data":"","dataFormat":"","location":"","workerId":""}'
};
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 = @{ @"componentId": @"",
@"data": @"",
@"dataFormat": @"",
@"location": @"",
@"workerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture",
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([
'componentId' => '',
'data' => '',
'dataFormat' => '',
'location' => '',
'workerId' => ''
]),
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture', [
'body' => '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'componentId' => '',
'data' => '',
'dataFormat' => '',
'location' => '',
'workerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'componentId' => '',
'data' => '',
'dataFormat' => '',
'location' => '',
'workerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture');
$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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture"
payload = {
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture"
payload <- "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture")
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 \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture') do |req|
req.body = "{\n \"componentId\": \"\",\n \"data\": \"\",\n \"dataFormat\": \"\",\n \"location\": \"\",\n \"workerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture";
let payload = json!({
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture \
--header 'content-type: application/json' \
--data '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}'
echo '{
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "componentId": "",\n "data": "",\n "dataFormat": "",\n "location": "",\n "workerId": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"componentId": "",
"data": "",
"dataFormat": "",
"location": "",
"workerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/debug/sendCapture")! 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
dataflow.projects.locations.jobs.get
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId
QUERY PARAMS
projectId
location
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"))
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId',
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId",
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId";
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")! 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
dataflow.projects.locations.jobs.getExecutionDetails
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails
QUERY PARAMS
projectId
location
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails"
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails"
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails"))
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails")
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails',
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails');
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails",
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails")
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails";
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/executionDetails")! 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
dataflow.projects.locations.jobs.getMetrics
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics
QUERY PARAMS
projectId
location
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics"
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics"
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics"))
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics")
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics',
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics');
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics",
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics")
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics";
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/metrics")! 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
dataflow.projects.locations.jobs.list
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs
QUERY PARAMS
projectId
location
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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/v1b3/projects/:projectId/locations/:location/jobs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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/v1b3/projects/:projectId/locations/:location/jobs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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}}/v1b3/projects/:projectId/locations/:location/jobs
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/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()
GET
dataflow.projects.locations.jobs.messages.list
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages
QUERY PARAMS
projectId
location
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages"
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages"
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages"))
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages")
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages',
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages');
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages",
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages")
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages";
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/messages")! 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
dataflow.projects.locations.jobs.snapshot
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot
QUERY PARAMS
projectId
location
jobId
BODY json
{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot" {:content-type :json
:form-params {:description ""
:location ""
:snapshotSources false
:ttl ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot"),
Content = new StringContent("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot"
payload := strings.NewReader("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 82
{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
location: '',
snapshotSources: false,
ttl: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot',
headers: {'content-type': 'application/json'},
data: {description: '', location: '', snapshotSources: false, ttl: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","location":"","snapshotSources":false,"ttl":""}'
};
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "location": "",\n "snapshotSources": false,\n "ttl": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot")
.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/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({description: '', location: '', snapshotSources: false, ttl: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot',
headers: {'content-type': 'application/json'},
body: {description: '', location: '', snapshotSources: false, ttl: ''},
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
location: '',
snapshotSources: false,
ttl: ''
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot',
headers: {'content-type': 'application/json'},
data: {description: '', location: '', snapshotSources: false, ttl: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"description":"","location":"","snapshotSources":false,"ttl":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"location": @"",
@"snapshotSources": @NO,
@"ttl": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'location' => '',
'snapshotSources' => null,
'ttl' => ''
]),
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot', [
'body' => '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'location' => '',
'snapshotSources' => null,
'ttl' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'location' => '',
'snapshotSources' => null,
'ttl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot');
$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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot"
payload = {
"description": "",
"location": "",
"snapshotSources": False,
"ttl": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot"
payload <- "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot') do |req|
req.body = "{\n \"description\": \"\",\n \"location\": \"\",\n \"snapshotSources\": false,\n \"ttl\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot";
let payload = json!({
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot \
--header 'content-type: application/json' \
--data '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}'
echo '{
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "location": "",\n "snapshotSources": false,\n "ttl": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"description": "",
"location": "",
"snapshotSources": false,
"ttl": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId:snapshot")! 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
dataflow.projects.locations.jobs.snapshots.list
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots
QUERY PARAMS
projectId
location
jobId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots"
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots"
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots"))
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots")
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots',
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots');
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots",
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots")
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots";
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/snapshots")! 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
dataflow.projects.locations.jobs.stages.getExecutionDetails
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails
QUERY PARAMS
projectId
location
jobId
stageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails"
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails"
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails"))
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails")
.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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails',
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails');
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails';
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails",
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails")
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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails";
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/stages/:stageId/executionDetails")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
dataflow.projects.locations.jobs.update
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId
QUERY PARAMS
projectId
location
jobId
BODY json
{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId");
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 \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId" {:content-type :json
:form-params {:clientRequestId ""
:createTime ""
:createdFromSnapshotId ""
:currentState ""
:currentStateTime ""
:environment {:clusterManagerApiService ""
:dataset ""
:debugOptions {:enableHotKeyLogging false}
:experiments []
:flexResourceSchedulingGoal ""
:internalExperiments {}
:sdkPipelineOptions {}
:serviceAccountEmail ""
:serviceKmsKeyName ""
:serviceOptions []
:shuffleMode ""
:tempStoragePrefix ""
:userAgent {}
:version {}
:workerPools [{:autoscalingSettings {:algorithm ""
:maxNumWorkers 0}
:dataDisks [{:diskType ""
:mountPoint ""
:sizeGb 0}]
:defaultPackageSet ""
:diskSizeGb 0
:diskSourceImage ""
:diskType ""
:ipConfiguration ""
:kind ""
:machineType ""
:metadata {}
:network ""
:numThreadsPerWorker 0
:numWorkers 0
:onHostMaintenance ""
:packages [{:location ""
:name ""}]
:poolArgs {}
:sdkHarnessContainerImages [{:capabilities []
:containerImage ""
:environmentId ""
:useSingleCorePerContainer false}]
:subnetwork ""
:taskrunnerSettings {:alsologtostderr false
:baseTaskDir ""
:baseUrl ""
:commandlinesFileName ""
:continueOnException false
:dataflowApiVersion ""
:harnessCommand ""
:languageHint ""
:logDir ""
:logToSerialconsole false
:logUploadLocation ""
:oauthScopes []
:parallelWorkerSettings {:baseUrl ""
:reportingEnabled false
:servicePath ""
:shuffleServicePath ""
:tempStoragePrefix ""
:workerId ""}
:streamingWorkerMainClass ""
:taskGroup ""
:taskUser ""
:tempStoragePrefix ""
:vmId ""
:workflowFileName ""}
:teardownPolicy ""
:workerHarnessContainerImage ""
:zone ""}]
:workerRegion ""
:workerZone ""}
:executionInfo {:stages {}}
:id ""
:jobMetadata {:bigTableDetails [{:instanceId ""
:projectId ""
:tableId ""}]
:bigqueryDetails [{:dataset ""
:projectId ""
:query ""
:table ""}]
:datastoreDetails [{:namespace ""
:projectId ""}]
:fileDetails [{:filePattern ""}]
:pubsubDetails [{:subscription ""
:topic ""}]
:sdkVersion {:sdkSupportStatus ""
:version ""
:versionDisplayName ""}
:spannerDetails [{:databaseId ""
:instanceId ""
:projectId ""}]
:userDisplayProperties {}}
:labels {}
:location ""
:name ""
:pipelineDescription {:displayData [{:boolValue false
:durationValue ""
:floatValue ""
:int64Value ""
:javaClassValue ""
:key ""
:label ""
:namespace ""
:shortStrValue ""
:strValue ""
:timestampValue ""
:url ""}]
:executionPipelineStage [{:componentSource [{:name ""
:originalTransformOrCollection ""
:userName ""}]
:componentTransform [{:name ""
:originalTransform ""
:userName ""}]
:id ""
:inputSource [{:name ""
:originalTransformOrCollection ""
:sizeBytes ""
:userName ""}]
:kind ""
:name ""
:outputSource [{}]
:prerequisiteStage []}]
:originalPipelineTransform [{:displayData [{}]
:id ""
:inputCollectionName []
:kind ""
:name ""
:outputCollectionName []}]
:stepNamesHash ""}
:projectId ""
:replaceJobId ""
:replacedByJobId ""
:requestedState ""
:satisfiesPzs false
:stageStates [{:currentStateTime ""
:executionStageName ""
:executionStageState ""}]
:startTime ""
:steps [{:kind ""
:name ""
:properties {}}]
:stepsLocation ""
:tempFiles []
:transformNameMapping {}
:type ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"),
Content = new StringContent("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"
payload := strings.NewReader("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5262
{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
.setHeader("content-type", "application/json")
.setBody("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
.header("content-type", "application/json")
.body("{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {
enableHotKeyLogging: false
},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {
algorithm: '',
maxNumWorkers: 0
},
dataDisks: [
{
diskType: '',
mountPoint: '',
sizeGb: 0
}
],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [
{
location: '',
name: ''
}
],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {
stages: {}
},
id: '',
jobMetadata: {
bigTableDetails: [
{
instanceId: '',
projectId: '',
tableId: ''
}
],
bigqueryDetails: [
{
dataset: '',
projectId: '',
query: '',
table: ''
}
],
datastoreDetails: [
{
namespace: '',
projectId: ''
}
],
fileDetails: [
{
filePattern: ''
}
],
pubsubDetails: [
{
subscription: '',
topic: ''
}
],
sdkVersion: {
sdkSupportStatus: '',
version: '',
versionDisplayName: ''
},
spannerDetails: [
{
databaseId: '',
instanceId: '',
projectId: ''
}
],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [
{
name: '',
originalTransformOrCollection: '',
userName: ''
}
],
componentTransform: [
{
name: '',
originalTransform: '',
userName: ''
}
],
id: '',
inputSource: [
{
name: '',
originalTransformOrCollection: '',
sizeBytes: '',
userName: ''
}
],
kind: '',
name: '',
outputSource: [
{}
],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [
{}
],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [
{
currentStateTime: '',
executionStageName: '',
executionStageState: ''
}
],
startTime: '',
steps: [
{
kind: '',
name: '',
properties: {}
}
],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId',
headers: {'content-type': 'application/json'},
data: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"clientRequestId":"","createTime":"","createdFromSnapshotId":"","currentState":"","currentStateTime":"","environment":{"clusterManagerApiService":"","dataset":"","debugOptions":{"enableHotKeyLogging":false},"experiments":[],"flexResourceSchedulingGoal":"","internalExperiments":{},"sdkPipelineOptions":{},"serviceAccountEmail":"","serviceKmsKeyName":"","serviceOptions":[],"shuffleMode":"","tempStoragePrefix":"","userAgent":{},"version":{},"workerPools":[{"autoscalingSettings":{"algorithm":"","maxNumWorkers":0},"dataDisks":[{"diskType":"","mountPoint":"","sizeGb":0}],"defaultPackageSet":"","diskSizeGb":0,"diskSourceImage":"","diskType":"","ipConfiguration":"","kind":"","machineType":"","metadata":{},"network":"","numThreadsPerWorker":0,"numWorkers":0,"onHostMaintenance":"","packages":[{"location":"","name":""}],"poolArgs":{},"sdkHarnessContainerImages":[{"capabilities":[],"containerImage":"","environmentId":"","useSingleCorePerContainer":false}],"subnetwork":"","taskrunnerSettings":{"alsologtostderr":false,"baseTaskDir":"","baseUrl":"","commandlinesFileName":"","continueOnException":false,"dataflowApiVersion":"","harnessCommand":"","languageHint":"","logDir":"","logToSerialconsole":false,"logUploadLocation":"","oauthScopes":[],"parallelWorkerSettings":{"baseUrl":"","reportingEnabled":false,"servicePath":"","shuffleServicePath":"","tempStoragePrefix":"","workerId":""},"streamingWorkerMainClass":"","taskGroup":"","taskUser":"","tempStoragePrefix":"","vmId":"","workflowFileName":""},"teardownPolicy":"","workerHarnessContainerImage":"","zone":""}],"workerRegion":"","workerZone":""},"executionInfo":{"stages":{}},"id":"","jobMetadata":{"bigTableDetails":[{"instanceId":"","projectId":"","tableId":""}],"bigqueryDetails":[{"dataset":"","projectId":"","query":"","table":""}],"datastoreDetails":[{"namespace":"","projectId":""}],"fileDetails":[{"filePattern":""}],"pubsubDetails":[{"subscription":"","topic":""}],"sdkVersion":{"sdkSupportStatus":"","version":"","versionDisplayName":""},"spannerDetails":[{"databaseId":"","instanceId":"","projectId":""}],"userDisplayProperties":{}},"labels":{},"location":"","name":"","pipelineDescription":{"displayData":[{"boolValue":false,"durationValue":"","floatValue":"","int64Value":"","javaClassValue":"","key":"","label":"","namespace":"","shortStrValue":"","strValue":"","timestampValue":"","url":""}],"executionPipelineStage":[{"componentSource":[{"name":"","originalTransformOrCollection":"","userName":""}],"componentTransform":[{"name":"","originalTransform":"","userName":""}],"id":"","inputSource":[{"name":"","originalTransformOrCollection":"","sizeBytes":"","userName":""}],"kind":"","name":"","outputSource":[{}],"prerequisiteStage":[]}],"originalPipelineTransform":[{"displayData":[{}],"id":"","inputCollectionName":[],"kind":"","name":"","outputCollectionName":[]}],"stepNamesHash":""},"projectId":"","replaceJobId":"","replacedByJobId":"","requestedState":"","satisfiesPzs":false,"stageStates":[{"currentStateTime":"","executionStageName":"","executionStageState":""}],"startTime":"","steps":[{"kind":"","name":"","properties":{}}],"stepsLocation":"","tempFiles":[],"transformNameMapping":{},"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clientRequestId": "",\n "createTime": "",\n "createdFromSnapshotId": "",\n "currentState": "",\n "currentStateTime": "",\n "environment": {\n "clusterManagerApiService": "",\n "dataset": "",\n "debugOptions": {\n "enableHotKeyLogging": false\n },\n "experiments": [],\n "flexResourceSchedulingGoal": "",\n "internalExperiments": {},\n "sdkPipelineOptions": {},\n "serviceAccountEmail": "",\n "serviceKmsKeyName": "",\n "serviceOptions": [],\n "shuffleMode": "",\n "tempStoragePrefix": "",\n "userAgent": {},\n "version": {},\n "workerPools": [\n {\n "autoscalingSettings": {\n "algorithm": "",\n "maxNumWorkers": 0\n },\n "dataDisks": [\n {\n "diskType": "",\n "mountPoint": "",\n "sizeGb": 0\n }\n ],\n "defaultPackageSet": "",\n "diskSizeGb": 0,\n "diskSourceImage": "",\n "diskType": "",\n "ipConfiguration": "",\n "kind": "",\n "machineType": "",\n "metadata": {},\n "network": "",\n "numThreadsPerWorker": 0,\n "numWorkers": 0,\n "onHostMaintenance": "",\n "packages": [\n {\n "location": "",\n "name": ""\n }\n ],\n "poolArgs": {},\n "sdkHarnessContainerImages": [\n {\n "capabilities": [],\n "containerImage": "",\n "environmentId": "",\n "useSingleCorePerContainer": false\n }\n ],\n "subnetwork": "",\n "taskrunnerSettings": {\n "alsologtostderr": false,\n "baseTaskDir": "",\n "baseUrl": "",\n "commandlinesFileName": "",\n "continueOnException": false,\n "dataflowApiVersion": "",\n "harnessCommand": "",\n "languageHint": "",\n "logDir": "",\n "logToSerialconsole": false,\n "logUploadLocation": "",\n "oauthScopes": [],\n "parallelWorkerSettings": {\n "baseUrl": "",\n "reportingEnabled": false,\n "servicePath": "",\n "shuffleServicePath": "",\n "tempStoragePrefix": "",\n "workerId": ""\n },\n "streamingWorkerMainClass": "",\n "taskGroup": "",\n "taskUser": "",\n "tempStoragePrefix": "",\n "vmId": "",\n "workflowFileName": ""\n },\n "teardownPolicy": "",\n "workerHarnessContainerImage": "",\n "zone": ""\n }\n ],\n "workerRegion": "",\n "workerZone": ""\n },\n "executionInfo": {\n "stages": {}\n },\n "id": "",\n "jobMetadata": {\n "bigTableDetails": [\n {\n "instanceId": "",\n "projectId": "",\n "tableId": ""\n }\n ],\n "bigqueryDetails": [\n {\n "dataset": "",\n "projectId": "",\n "query": "",\n "table": ""\n }\n ],\n "datastoreDetails": [\n {\n "namespace": "",\n "projectId": ""\n }\n ],\n "fileDetails": [\n {\n "filePattern": ""\n }\n ],\n "pubsubDetails": [\n {\n "subscription": "",\n "topic": ""\n }\n ],\n "sdkVersion": {\n "sdkSupportStatus": "",\n "version": "",\n "versionDisplayName": ""\n },\n "spannerDetails": [\n {\n "databaseId": "",\n "instanceId": "",\n "projectId": ""\n }\n ],\n "userDisplayProperties": {}\n },\n "labels": {},\n "location": "",\n "name": "",\n "pipelineDescription": {\n "displayData": [\n {\n "boolValue": false,\n "durationValue": "",\n "floatValue": "",\n "int64Value": "",\n "javaClassValue": "",\n "key": "",\n "label": "",\n "namespace": "",\n "shortStrValue": "",\n "strValue": "",\n "timestampValue": "",\n "url": ""\n }\n ],\n "executionPipelineStage": [\n {\n "componentSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "userName": ""\n }\n ],\n "componentTransform": [\n {\n "name": "",\n "originalTransform": "",\n "userName": ""\n }\n ],\n "id": "",\n "inputSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "sizeBytes": "",\n "userName": ""\n }\n ],\n "kind": "",\n "name": "",\n "outputSource": [\n {}\n ],\n "prerequisiteStage": []\n }\n ],\n "originalPipelineTransform": [\n {\n "displayData": [\n {}\n ],\n "id": "",\n "inputCollectionName": [],\n "kind": "",\n "name": "",\n "outputCollectionName": []\n }\n ],\n "stepNamesHash": ""\n },\n "projectId": "",\n "replaceJobId": "",\n "replacedByJobId": "",\n "requestedState": "",\n "satisfiesPzs": false,\n "stageStates": [\n {\n "currentStateTime": "",\n "executionStageName": "",\n "executionStageState": ""\n }\n ],\n "startTime": "",\n "steps": [\n {\n "kind": "",\n "name": "",\n "properties": {}\n }\n ],\n "stepsLocation": "",\n "tempFiles": [],\n "transformNameMapping": {},\n "type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId',
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({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId',
headers: {'content-type': 'application/json'},
body: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {
enableHotKeyLogging: false
},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {
algorithm: '',
maxNumWorkers: 0
},
dataDisks: [
{
diskType: '',
mountPoint: '',
sizeGb: 0
}
],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [
{
location: '',
name: ''
}
],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {
stages: {}
},
id: '',
jobMetadata: {
bigTableDetails: [
{
instanceId: '',
projectId: '',
tableId: ''
}
],
bigqueryDetails: [
{
dataset: '',
projectId: '',
query: '',
table: ''
}
],
datastoreDetails: [
{
namespace: '',
projectId: ''
}
],
fileDetails: [
{
filePattern: ''
}
],
pubsubDetails: [
{
subscription: '',
topic: ''
}
],
sdkVersion: {
sdkSupportStatus: '',
version: '',
versionDisplayName: ''
},
spannerDetails: [
{
databaseId: '',
instanceId: '',
projectId: ''
}
],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [
{
name: '',
originalTransformOrCollection: '',
userName: ''
}
],
componentTransform: [
{
name: '',
originalTransform: '',
userName: ''
}
],
id: '',
inputSource: [
{
name: '',
originalTransformOrCollection: '',
sizeBytes: '',
userName: ''
}
],
kind: '',
name: '',
outputSource: [
{}
],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [
{}
],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [
{
currentStateTime: '',
executionStageName: '',
executionStageState: ''
}
],
startTime: '',
steps: [
{
kind: '',
name: '',
properties: {}
}
],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId',
headers: {'content-type': 'application/json'},
data: {
clientRequestId: '',
createTime: '',
createdFromSnapshotId: '',
currentState: '',
currentStateTime: '',
environment: {
clusterManagerApiService: '',
dataset: '',
debugOptions: {enableHotKeyLogging: false},
experiments: [],
flexResourceSchedulingGoal: '',
internalExperiments: {},
sdkPipelineOptions: {},
serviceAccountEmail: '',
serviceKmsKeyName: '',
serviceOptions: [],
shuffleMode: '',
tempStoragePrefix: '',
userAgent: {},
version: {},
workerPools: [
{
autoscalingSettings: {algorithm: '', maxNumWorkers: 0},
dataDisks: [{diskType: '', mountPoint: '', sizeGb: 0}],
defaultPackageSet: '',
diskSizeGb: 0,
diskSourceImage: '',
diskType: '',
ipConfiguration: '',
kind: '',
machineType: '',
metadata: {},
network: '',
numThreadsPerWorker: 0,
numWorkers: 0,
onHostMaintenance: '',
packages: [{location: '', name: ''}],
poolArgs: {},
sdkHarnessContainerImages: [
{
capabilities: [],
containerImage: '',
environmentId: '',
useSingleCorePerContainer: false
}
],
subnetwork: '',
taskrunnerSettings: {
alsologtostderr: false,
baseTaskDir: '',
baseUrl: '',
commandlinesFileName: '',
continueOnException: false,
dataflowApiVersion: '',
harnessCommand: '',
languageHint: '',
logDir: '',
logToSerialconsole: false,
logUploadLocation: '',
oauthScopes: [],
parallelWorkerSettings: {
baseUrl: '',
reportingEnabled: false,
servicePath: '',
shuffleServicePath: '',
tempStoragePrefix: '',
workerId: ''
},
streamingWorkerMainClass: '',
taskGroup: '',
taskUser: '',
tempStoragePrefix: '',
vmId: '',
workflowFileName: ''
},
teardownPolicy: '',
workerHarnessContainerImage: '',
zone: ''
}
],
workerRegion: '',
workerZone: ''
},
executionInfo: {stages: {}},
id: '',
jobMetadata: {
bigTableDetails: [{instanceId: '', projectId: '', tableId: ''}],
bigqueryDetails: [{dataset: '', projectId: '', query: '', table: ''}],
datastoreDetails: [{namespace: '', projectId: ''}],
fileDetails: [{filePattern: ''}],
pubsubDetails: [{subscription: '', topic: ''}],
sdkVersion: {sdkSupportStatus: '', version: '', versionDisplayName: ''},
spannerDetails: [{databaseId: '', instanceId: '', projectId: ''}],
userDisplayProperties: {}
},
labels: {},
location: '',
name: '',
pipelineDescription: {
displayData: [
{
boolValue: false,
durationValue: '',
floatValue: '',
int64Value: '',
javaClassValue: '',
key: '',
label: '',
namespace: '',
shortStrValue: '',
strValue: '',
timestampValue: '',
url: ''
}
],
executionPipelineStage: [
{
componentSource: [{name: '', originalTransformOrCollection: '', userName: ''}],
componentTransform: [{name: '', originalTransform: '', userName: ''}],
id: '',
inputSource: [{name: '', originalTransformOrCollection: '', sizeBytes: '', userName: ''}],
kind: '',
name: '',
outputSource: [{}],
prerequisiteStage: []
}
],
originalPipelineTransform: [
{
displayData: [{}],
id: '',
inputCollectionName: [],
kind: '',
name: '',
outputCollectionName: []
}
],
stepNamesHash: ''
},
projectId: '',
replaceJobId: '',
replacedByJobId: '',
requestedState: '',
satisfiesPzs: false,
stageStates: [{currentStateTime: '', executionStageName: '', executionStageState: ''}],
startTime: '',
steps: [{kind: '', name: '', properties: {}}],
stepsLocation: '',
tempFiles: [],
transformNameMapping: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"clientRequestId":"","createTime":"","createdFromSnapshotId":"","currentState":"","currentStateTime":"","environment":{"clusterManagerApiService":"","dataset":"","debugOptions":{"enableHotKeyLogging":false},"experiments":[],"flexResourceSchedulingGoal":"","internalExperiments":{},"sdkPipelineOptions":{},"serviceAccountEmail":"","serviceKmsKeyName":"","serviceOptions":[],"shuffleMode":"","tempStoragePrefix":"","userAgent":{},"version":{},"workerPools":[{"autoscalingSettings":{"algorithm":"","maxNumWorkers":0},"dataDisks":[{"diskType":"","mountPoint":"","sizeGb":0}],"defaultPackageSet":"","diskSizeGb":0,"diskSourceImage":"","diskType":"","ipConfiguration":"","kind":"","machineType":"","metadata":{},"network":"","numThreadsPerWorker":0,"numWorkers":0,"onHostMaintenance":"","packages":[{"location":"","name":""}],"poolArgs":{},"sdkHarnessContainerImages":[{"capabilities":[],"containerImage":"","environmentId":"","useSingleCorePerContainer":false}],"subnetwork":"","taskrunnerSettings":{"alsologtostderr":false,"baseTaskDir":"","baseUrl":"","commandlinesFileName":"","continueOnException":false,"dataflowApiVersion":"","harnessCommand":"","languageHint":"","logDir":"","logToSerialconsole":false,"logUploadLocation":"","oauthScopes":[],"parallelWorkerSettings":{"baseUrl":"","reportingEnabled":false,"servicePath":"","shuffleServicePath":"","tempStoragePrefix":"","workerId":""},"streamingWorkerMainClass":"","taskGroup":"","taskUser":"","tempStoragePrefix":"","vmId":"","workflowFileName":""},"teardownPolicy":"","workerHarnessContainerImage":"","zone":""}],"workerRegion":"","workerZone":""},"executionInfo":{"stages":{}},"id":"","jobMetadata":{"bigTableDetails":[{"instanceId":"","projectId":"","tableId":""}],"bigqueryDetails":[{"dataset":"","projectId":"","query":"","table":""}],"datastoreDetails":[{"namespace":"","projectId":""}],"fileDetails":[{"filePattern":""}],"pubsubDetails":[{"subscription":"","topic":""}],"sdkVersion":{"sdkSupportStatus":"","version":"","versionDisplayName":""},"spannerDetails":[{"databaseId":"","instanceId":"","projectId":""}],"userDisplayProperties":{}},"labels":{},"location":"","name":"","pipelineDescription":{"displayData":[{"boolValue":false,"durationValue":"","floatValue":"","int64Value":"","javaClassValue":"","key":"","label":"","namespace":"","shortStrValue":"","strValue":"","timestampValue":"","url":""}],"executionPipelineStage":[{"componentSource":[{"name":"","originalTransformOrCollection":"","userName":""}],"componentTransform":[{"name":"","originalTransform":"","userName":""}],"id":"","inputSource":[{"name":"","originalTransformOrCollection":"","sizeBytes":"","userName":""}],"kind":"","name":"","outputSource":[{}],"prerequisiteStage":[]}],"originalPipelineTransform":[{"displayData":[{}],"id":"","inputCollectionName":[],"kind":"","name":"","outputCollectionName":[]}],"stepNamesHash":""},"projectId":"","replaceJobId":"","replacedByJobId":"","requestedState":"","satisfiesPzs":false,"stageStates":[{"currentStateTime":"","executionStageName":"","executionStageState":""}],"startTime":"","steps":[{"kind":"","name":"","properties":{}}],"stepsLocation":"","tempFiles":[],"transformNameMapping":{},"type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clientRequestId": @"",
@"createTime": @"",
@"createdFromSnapshotId": @"",
@"currentState": @"",
@"currentStateTime": @"",
@"environment": @{ @"clusterManagerApiService": @"", @"dataset": @"", @"debugOptions": @{ @"enableHotKeyLogging": @NO }, @"experiments": @[ ], @"flexResourceSchedulingGoal": @"", @"internalExperiments": @{ }, @"sdkPipelineOptions": @{ }, @"serviceAccountEmail": @"", @"serviceKmsKeyName": @"", @"serviceOptions": @[ ], @"shuffleMode": @"", @"tempStoragePrefix": @"", @"userAgent": @{ }, @"version": @{ }, @"workerPools": @[ @{ @"autoscalingSettings": @{ @"algorithm": @"", @"maxNumWorkers": @0 }, @"dataDisks": @[ @{ @"diskType": @"", @"mountPoint": @"", @"sizeGb": @0 } ], @"defaultPackageSet": @"", @"diskSizeGb": @0, @"diskSourceImage": @"", @"diskType": @"", @"ipConfiguration": @"", @"kind": @"", @"machineType": @"", @"metadata": @{ }, @"network": @"", @"numThreadsPerWorker": @0, @"numWorkers": @0, @"onHostMaintenance": @"", @"packages": @[ @{ @"location": @"", @"name": @"" } ], @"poolArgs": @{ }, @"sdkHarnessContainerImages": @[ @{ @"capabilities": @[ ], @"containerImage": @"", @"environmentId": @"", @"useSingleCorePerContainer": @NO } ], @"subnetwork": @"", @"taskrunnerSettings": @{ @"alsologtostderr": @NO, @"baseTaskDir": @"", @"baseUrl": @"", @"commandlinesFileName": @"", @"continueOnException": @NO, @"dataflowApiVersion": @"", @"harnessCommand": @"", @"languageHint": @"", @"logDir": @"", @"logToSerialconsole": @NO, @"logUploadLocation": @"", @"oauthScopes": @[ ], @"parallelWorkerSettings": @{ @"baseUrl": @"", @"reportingEnabled": @NO, @"servicePath": @"", @"shuffleServicePath": @"", @"tempStoragePrefix": @"", @"workerId": @"" }, @"streamingWorkerMainClass": @"", @"taskGroup": @"", @"taskUser": @"", @"tempStoragePrefix": @"", @"vmId": @"", @"workflowFileName": @"" }, @"teardownPolicy": @"", @"workerHarnessContainerImage": @"", @"zone": @"" } ], @"workerRegion": @"", @"workerZone": @"" },
@"executionInfo": @{ @"stages": @{ } },
@"id": @"",
@"jobMetadata": @{ @"bigTableDetails": @[ @{ @"instanceId": @"", @"projectId": @"", @"tableId": @"" } ], @"bigqueryDetails": @[ @{ @"dataset": @"", @"projectId": @"", @"query": @"", @"table": @"" } ], @"datastoreDetails": @[ @{ @"namespace": @"", @"projectId": @"" } ], @"fileDetails": @[ @{ @"filePattern": @"" } ], @"pubsubDetails": @[ @{ @"subscription": @"", @"topic": @"" } ], @"sdkVersion": @{ @"sdkSupportStatus": @"", @"version": @"", @"versionDisplayName": @"" }, @"spannerDetails": @[ @{ @"databaseId": @"", @"instanceId": @"", @"projectId": @"" } ], @"userDisplayProperties": @{ } },
@"labels": @{ },
@"location": @"",
@"name": @"",
@"pipelineDescription": @{ @"displayData": @[ @{ @"boolValue": @NO, @"durationValue": @"", @"floatValue": @"", @"int64Value": @"", @"javaClassValue": @"", @"key": @"", @"label": @"", @"namespace": @"", @"shortStrValue": @"", @"strValue": @"", @"timestampValue": @"", @"url": @"" } ], @"executionPipelineStage": @[ @{ @"componentSource": @[ @{ @"name": @"", @"originalTransformOrCollection": @"", @"userName": @"" } ], @"componentTransform": @[ @{ @"name": @"", @"originalTransform": @"", @"userName": @"" } ], @"id": @"", @"inputSource": @[ @{ @"name": @"", @"originalTransformOrCollection": @"", @"sizeBytes": @"", @"userName": @"" } ], @"kind": @"", @"name": @"", @"outputSource": @[ @{ } ], @"prerequisiteStage": @[ ] } ], @"originalPipelineTransform": @[ @{ @"displayData": @[ @{ } ], @"id": @"", @"inputCollectionName": @[ ], @"kind": @"", @"name": @"", @"outputCollectionName": @[ ] } ], @"stepNamesHash": @"" },
@"projectId": @"",
@"replaceJobId": @"",
@"replacedByJobId": @"",
@"requestedState": @"",
@"satisfiesPzs": @NO,
@"stageStates": @[ @{ @"currentStateTime": @"", @"executionStageName": @"", @"executionStageState": @"" } ],
@"startTime": @"",
@"steps": @[ @{ @"kind": @"", @"name": @"", @"properties": @{ } } ],
@"stepsLocation": @"",
@"tempFiles": @[ ],
@"transformNameMapping": @{ },
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId', [
'body' => '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clientRequestId' => '',
'createTime' => '',
'createdFromSnapshotId' => '',
'currentState' => '',
'currentStateTime' => '',
'environment' => [
'clusterManagerApiService' => '',
'dataset' => '',
'debugOptions' => [
'enableHotKeyLogging' => null
],
'experiments' => [
],
'flexResourceSchedulingGoal' => '',
'internalExperiments' => [
],
'sdkPipelineOptions' => [
],
'serviceAccountEmail' => '',
'serviceKmsKeyName' => '',
'serviceOptions' => [
],
'shuffleMode' => '',
'tempStoragePrefix' => '',
'userAgent' => [
],
'version' => [
],
'workerPools' => [
[
'autoscalingSettings' => [
'algorithm' => '',
'maxNumWorkers' => 0
],
'dataDisks' => [
[
'diskType' => '',
'mountPoint' => '',
'sizeGb' => 0
]
],
'defaultPackageSet' => '',
'diskSizeGb' => 0,
'diskSourceImage' => '',
'diskType' => '',
'ipConfiguration' => '',
'kind' => '',
'machineType' => '',
'metadata' => [
],
'network' => '',
'numThreadsPerWorker' => 0,
'numWorkers' => 0,
'onHostMaintenance' => '',
'packages' => [
[
'location' => '',
'name' => ''
]
],
'poolArgs' => [
],
'sdkHarnessContainerImages' => [
[
'capabilities' => [
],
'containerImage' => '',
'environmentId' => '',
'useSingleCorePerContainer' => null
]
],
'subnetwork' => '',
'taskrunnerSettings' => [
'alsologtostderr' => null,
'baseTaskDir' => '',
'baseUrl' => '',
'commandlinesFileName' => '',
'continueOnException' => null,
'dataflowApiVersion' => '',
'harnessCommand' => '',
'languageHint' => '',
'logDir' => '',
'logToSerialconsole' => null,
'logUploadLocation' => '',
'oauthScopes' => [
],
'parallelWorkerSettings' => [
'baseUrl' => '',
'reportingEnabled' => null,
'servicePath' => '',
'shuffleServicePath' => '',
'tempStoragePrefix' => '',
'workerId' => ''
],
'streamingWorkerMainClass' => '',
'taskGroup' => '',
'taskUser' => '',
'tempStoragePrefix' => '',
'vmId' => '',
'workflowFileName' => ''
],
'teardownPolicy' => '',
'workerHarnessContainerImage' => '',
'zone' => ''
]
],
'workerRegion' => '',
'workerZone' => ''
],
'executionInfo' => [
'stages' => [
]
],
'id' => '',
'jobMetadata' => [
'bigTableDetails' => [
[
'instanceId' => '',
'projectId' => '',
'tableId' => ''
]
],
'bigqueryDetails' => [
[
'dataset' => '',
'projectId' => '',
'query' => '',
'table' => ''
]
],
'datastoreDetails' => [
[
'namespace' => '',
'projectId' => ''
]
],
'fileDetails' => [
[
'filePattern' => ''
]
],
'pubsubDetails' => [
[
'subscription' => '',
'topic' => ''
]
],
'sdkVersion' => [
'sdkSupportStatus' => '',
'version' => '',
'versionDisplayName' => ''
],
'spannerDetails' => [
[
'databaseId' => '',
'instanceId' => '',
'projectId' => ''
]
],
'userDisplayProperties' => [
]
],
'labels' => [
],
'location' => '',
'name' => '',
'pipelineDescription' => [
'displayData' => [
[
'boolValue' => null,
'durationValue' => '',
'floatValue' => '',
'int64Value' => '',
'javaClassValue' => '',
'key' => '',
'label' => '',
'namespace' => '',
'shortStrValue' => '',
'strValue' => '',
'timestampValue' => '',
'url' => ''
]
],
'executionPipelineStage' => [
[
'componentSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'userName' => ''
]
],
'componentTransform' => [
[
'name' => '',
'originalTransform' => '',
'userName' => ''
]
],
'id' => '',
'inputSource' => [
[
'name' => '',
'originalTransformOrCollection' => '',
'sizeBytes' => '',
'userName' => ''
]
],
'kind' => '',
'name' => '',
'outputSource' => [
[
]
],
'prerequisiteStage' => [
]
]
],
'originalPipelineTransform' => [
[
'displayData' => [
[
]
],
'id' => '',
'inputCollectionName' => [
],
'kind' => '',
'name' => '',
'outputCollectionName' => [
]
]
],
'stepNamesHash' => ''
],
'projectId' => '',
'replaceJobId' => '',
'replacedByJobId' => '',
'requestedState' => '',
'satisfiesPzs' => null,
'stageStates' => [
[
'currentStateTime' => '',
'executionStageName' => '',
'executionStageState' => ''
]
],
'startTime' => '',
'steps' => [
[
'kind' => '',
'name' => '',
'properties' => [
]
]
],
'stepsLocation' => '',
'tempFiles' => [
],
'transformNameMapping' => [
],
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"
payload = {
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": { "enableHotKeyLogging": False },
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": False
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": False,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": False,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": False,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": False,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": { "stages": {} },
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [{ "filePattern": "" }],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": False,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [{}],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [{}],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": False,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId"
payload <- "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId') do |req|
req.body = "{\n \"clientRequestId\": \"\",\n \"createTime\": \"\",\n \"createdFromSnapshotId\": \"\",\n \"currentState\": \"\",\n \"currentStateTime\": \"\",\n \"environment\": {\n \"clusterManagerApiService\": \"\",\n \"dataset\": \"\",\n \"debugOptions\": {\n \"enableHotKeyLogging\": false\n },\n \"experiments\": [],\n \"flexResourceSchedulingGoal\": \"\",\n \"internalExperiments\": {},\n \"sdkPipelineOptions\": {},\n \"serviceAccountEmail\": \"\",\n \"serviceKmsKeyName\": \"\",\n \"serviceOptions\": [],\n \"shuffleMode\": \"\",\n \"tempStoragePrefix\": \"\",\n \"userAgent\": {},\n \"version\": {},\n \"workerPools\": [\n {\n \"autoscalingSettings\": {\n \"algorithm\": \"\",\n \"maxNumWorkers\": 0\n },\n \"dataDisks\": [\n {\n \"diskType\": \"\",\n \"mountPoint\": \"\",\n \"sizeGb\": 0\n }\n ],\n \"defaultPackageSet\": \"\",\n \"diskSizeGb\": 0,\n \"diskSourceImage\": \"\",\n \"diskType\": \"\",\n \"ipConfiguration\": \"\",\n \"kind\": \"\",\n \"machineType\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"numThreadsPerWorker\": 0,\n \"numWorkers\": 0,\n \"onHostMaintenance\": \"\",\n \"packages\": [\n {\n \"location\": \"\",\n \"name\": \"\"\n }\n ],\n \"poolArgs\": {},\n \"sdkHarnessContainerImages\": [\n {\n \"capabilities\": [],\n \"containerImage\": \"\",\n \"environmentId\": \"\",\n \"useSingleCorePerContainer\": false\n }\n ],\n \"subnetwork\": \"\",\n \"taskrunnerSettings\": {\n \"alsologtostderr\": false,\n \"baseTaskDir\": \"\",\n \"baseUrl\": \"\",\n \"commandlinesFileName\": \"\",\n \"continueOnException\": false,\n \"dataflowApiVersion\": \"\",\n \"harnessCommand\": \"\",\n \"languageHint\": \"\",\n \"logDir\": \"\",\n \"logToSerialconsole\": false,\n \"logUploadLocation\": \"\",\n \"oauthScopes\": [],\n \"parallelWorkerSettings\": {\n \"baseUrl\": \"\",\n \"reportingEnabled\": false,\n \"servicePath\": \"\",\n \"shuffleServicePath\": \"\",\n \"tempStoragePrefix\": \"\",\n \"workerId\": \"\"\n },\n \"streamingWorkerMainClass\": \"\",\n \"taskGroup\": \"\",\n \"taskUser\": \"\",\n \"tempStoragePrefix\": \"\",\n \"vmId\": \"\",\n \"workflowFileName\": \"\"\n },\n \"teardownPolicy\": \"\",\n \"workerHarnessContainerImage\": \"\",\n \"zone\": \"\"\n }\n ],\n \"workerRegion\": \"\",\n \"workerZone\": \"\"\n },\n \"executionInfo\": {\n \"stages\": {}\n },\n \"id\": \"\",\n \"jobMetadata\": {\n \"bigTableDetails\": [\n {\n \"instanceId\": \"\",\n \"projectId\": \"\",\n \"tableId\": \"\"\n }\n ],\n \"bigqueryDetails\": [\n {\n \"dataset\": \"\",\n \"projectId\": \"\",\n \"query\": \"\",\n \"table\": \"\"\n }\n ],\n \"datastoreDetails\": [\n {\n \"namespace\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"fileDetails\": [\n {\n \"filePattern\": \"\"\n }\n ],\n \"pubsubDetails\": [\n {\n \"subscription\": \"\",\n \"topic\": \"\"\n }\n ],\n \"sdkVersion\": {\n \"sdkSupportStatus\": \"\",\n \"version\": \"\",\n \"versionDisplayName\": \"\"\n },\n \"spannerDetails\": [\n {\n \"databaseId\": \"\",\n \"instanceId\": \"\",\n \"projectId\": \"\"\n }\n ],\n \"userDisplayProperties\": {}\n },\n \"labels\": {},\n \"location\": \"\",\n \"name\": \"\",\n \"pipelineDescription\": {\n \"displayData\": [\n {\n \"boolValue\": false,\n \"durationValue\": \"\",\n \"floatValue\": \"\",\n \"int64Value\": \"\",\n \"javaClassValue\": \"\",\n \"key\": \"\",\n \"label\": \"\",\n \"namespace\": \"\",\n \"shortStrValue\": \"\",\n \"strValue\": \"\",\n \"timestampValue\": \"\",\n \"url\": \"\"\n }\n ],\n \"executionPipelineStage\": [\n {\n \"componentSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"userName\": \"\"\n }\n ],\n \"componentTransform\": [\n {\n \"name\": \"\",\n \"originalTransform\": \"\",\n \"userName\": \"\"\n }\n ],\n \"id\": \"\",\n \"inputSource\": [\n {\n \"name\": \"\",\n \"originalTransformOrCollection\": \"\",\n \"sizeBytes\": \"\",\n \"userName\": \"\"\n }\n ],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputSource\": [\n {}\n ],\n \"prerequisiteStage\": []\n }\n ],\n \"originalPipelineTransform\": [\n {\n \"displayData\": [\n {}\n ],\n \"id\": \"\",\n \"inputCollectionName\": [],\n \"kind\": \"\",\n \"name\": \"\",\n \"outputCollectionName\": []\n }\n ],\n \"stepNamesHash\": \"\"\n },\n \"projectId\": \"\",\n \"replaceJobId\": \"\",\n \"replacedByJobId\": \"\",\n \"requestedState\": \"\",\n \"satisfiesPzs\": false,\n \"stageStates\": [\n {\n \"currentStateTime\": \"\",\n \"executionStageName\": \"\",\n \"executionStageState\": \"\"\n }\n ],\n \"startTime\": \"\",\n \"steps\": [\n {\n \"kind\": \"\",\n \"name\": \"\",\n \"properties\": {}\n }\n ],\n \"stepsLocation\": \"\",\n \"tempFiles\": [],\n \"transformNameMapping\": {},\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId";
let payload = json!({
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": json!({
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": json!({"enableHotKeyLogging": false}),
"experiments": (),
"flexResourceSchedulingGoal": "",
"internalExperiments": json!({}),
"sdkPipelineOptions": json!({}),
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": (),
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": json!({}),
"version": json!({}),
"workerPools": (
json!({
"autoscalingSettings": json!({
"algorithm": "",
"maxNumWorkers": 0
}),
"dataDisks": (
json!({
"diskType": "",
"mountPoint": "",
"sizeGb": 0
})
),
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": json!({}),
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": (
json!({
"location": "",
"name": ""
})
),
"poolArgs": json!({}),
"sdkHarnessContainerImages": (
json!({
"capabilities": (),
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
})
),
"subnetwork": "",
"taskrunnerSettings": json!({
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": (),
"parallelWorkerSettings": json!({
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
}),
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
}),
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
})
),
"workerRegion": "",
"workerZone": ""
}),
"executionInfo": json!({"stages": json!({})}),
"id": "",
"jobMetadata": json!({
"bigTableDetails": (
json!({
"instanceId": "",
"projectId": "",
"tableId": ""
})
),
"bigqueryDetails": (
json!({
"dataset": "",
"projectId": "",
"query": "",
"table": ""
})
),
"datastoreDetails": (
json!({
"namespace": "",
"projectId": ""
})
),
"fileDetails": (json!({"filePattern": ""})),
"pubsubDetails": (
json!({
"subscription": "",
"topic": ""
})
),
"sdkVersion": json!({
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
}),
"spannerDetails": (
json!({
"databaseId": "",
"instanceId": "",
"projectId": ""
})
),
"userDisplayProperties": json!({})
}),
"labels": json!({}),
"location": "",
"name": "",
"pipelineDescription": json!({
"displayData": (
json!({
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
})
),
"executionPipelineStage": (
json!({
"componentSource": (
json!({
"name": "",
"originalTransformOrCollection": "",
"userName": ""
})
),
"componentTransform": (
json!({
"name": "",
"originalTransform": "",
"userName": ""
})
),
"id": "",
"inputSource": (
json!({
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
})
),
"kind": "",
"name": "",
"outputSource": (json!({})),
"prerequisiteStage": ()
})
),
"originalPipelineTransform": (
json!({
"displayData": (json!({})),
"id": "",
"inputCollectionName": (),
"kind": "",
"name": "",
"outputCollectionName": ()
})
),
"stepNamesHash": ""
}),
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": (
json!({
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
})
),
"startTime": "",
"steps": (
json!({
"kind": "",
"name": "",
"properties": json!({})
})
),
"stepsLocation": "",
"tempFiles": (),
"transformNameMapping": json!({}),
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId \
--header 'content-type: application/json' \
--data '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}'
echo '{
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": {
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": {
"enableHotKeyLogging": false
},
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": {},
"sdkPipelineOptions": {},
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": {},
"version": {},
"workerPools": [
{
"autoscalingSettings": {
"algorithm": "",
"maxNumWorkers": 0
},
"dataDisks": [
{
"diskType": "",
"mountPoint": "",
"sizeGb": 0
}
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": {},
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
{
"location": "",
"name": ""
}
],
"poolArgs": {},
"sdkHarnessContainerImages": [
{
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
}
],
"subnetwork": "",
"taskrunnerSettings": {
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": {
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
},
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
},
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
}
],
"workerRegion": "",
"workerZone": ""
},
"executionInfo": {
"stages": {}
},
"id": "",
"jobMetadata": {
"bigTableDetails": [
{
"instanceId": "",
"projectId": "",
"tableId": ""
}
],
"bigqueryDetails": [
{
"dataset": "",
"projectId": "",
"query": "",
"table": ""
}
],
"datastoreDetails": [
{
"namespace": "",
"projectId": ""
}
],
"fileDetails": [
{
"filePattern": ""
}
],
"pubsubDetails": [
{
"subscription": "",
"topic": ""
}
],
"sdkVersion": {
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
},
"spannerDetails": [
{
"databaseId": "",
"instanceId": "",
"projectId": ""
}
],
"userDisplayProperties": {}
},
"labels": {},
"location": "",
"name": "",
"pipelineDescription": {
"displayData": [
{
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
}
],
"executionPipelineStage": [
{
"componentSource": [
{
"name": "",
"originalTransformOrCollection": "",
"userName": ""
}
],
"componentTransform": [
{
"name": "",
"originalTransform": "",
"userName": ""
}
],
"id": "",
"inputSource": [
{
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
}
],
"kind": "",
"name": "",
"outputSource": [
{}
],
"prerequisiteStage": []
}
],
"originalPipelineTransform": [
{
"displayData": [
{}
],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
}
],
"stepNamesHash": ""
},
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
{
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
}
],
"startTime": "",
"steps": [
{
"kind": "",
"name": "",
"properties": {}
}
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": {},
"type": ""
}' | \
http PUT {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "clientRequestId": "",\n "createTime": "",\n "createdFromSnapshotId": "",\n "currentState": "",\n "currentStateTime": "",\n "environment": {\n "clusterManagerApiService": "",\n "dataset": "",\n "debugOptions": {\n "enableHotKeyLogging": false\n },\n "experiments": [],\n "flexResourceSchedulingGoal": "",\n "internalExperiments": {},\n "sdkPipelineOptions": {},\n "serviceAccountEmail": "",\n "serviceKmsKeyName": "",\n "serviceOptions": [],\n "shuffleMode": "",\n "tempStoragePrefix": "",\n "userAgent": {},\n "version": {},\n "workerPools": [\n {\n "autoscalingSettings": {\n "algorithm": "",\n "maxNumWorkers": 0\n },\n "dataDisks": [\n {\n "diskType": "",\n "mountPoint": "",\n "sizeGb": 0\n }\n ],\n "defaultPackageSet": "",\n "diskSizeGb": 0,\n "diskSourceImage": "",\n "diskType": "",\n "ipConfiguration": "",\n "kind": "",\n "machineType": "",\n "metadata": {},\n "network": "",\n "numThreadsPerWorker": 0,\n "numWorkers": 0,\n "onHostMaintenance": "",\n "packages": [\n {\n "location": "",\n "name": ""\n }\n ],\n "poolArgs": {},\n "sdkHarnessContainerImages": [\n {\n "capabilities": [],\n "containerImage": "",\n "environmentId": "",\n "useSingleCorePerContainer": false\n }\n ],\n "subnetwork": "",\n "taskrunnerSettings": {\n "alsologtostderr": false,\n "baseTaskDir": "",\n "baseUrl": "",\n "commandlinesFileName": "",\n "continueOnException": false,\n "dataflowApiVersion": "",\n "harnessCommand": "",\n "languageHint": "",\n "logDir": "",\n "logToSerialconsole": false,\n "logUploadLocation": "",\n "oauthScopes": [],\n "parallelWorkerSettings": {\n "baseUrl": "",\n "reportingEnabled": false,\n "servicePath": "",\n "shuffleServicePath": "",\n "tempStoragePrefix": "",\n "workerId": ""\n },\n "streamingWorkerMainClass": "",\n "taskGroup": "",\n "taskUser": "",\n "tempStoragePrefix": "",\n "vmId": "",\n "workflowFileName": ""\n },\n "teardownPolicy": "",\n "workerHarnessContainerImage": "",\n "zone": ""\n }\n ],\n "workerRegion": "",\n "workerZone": ""\n },\n "executionInfo": {\n "stages": {}\n },\n "id": "",\n "jobMetadata": {\n "bigTableDetails": [\n {\n "instanceId": "",\n "projectId": "",\n "tableId": ""\n }\n ],\n "bigqueryDetails": [\n {\n "dataset": "",\n "projectId": "",\n "query": "",\n "table": ""\n }\n ],\n "datastoreDetails": [\n {\n "namespace": "",\n "projectId": ""\n }\n ],\n "fileDetails": [\n {\n "filePattern": ""\n }\n ],\n "pubsubDetails": [\n {\n "subscription": "",\n "topic": ""\n }\n ],\n "sdkVersion": {\n "sdkSupportStatus": "",\n "version": "",\n "versionDisplayName": ""\n },\n "spannerDetails": [\n {\n "databaseId": "",\n "instanceId": "",\n "projectId": ""\n }\n ],\n "userDisplayProperties": {}\n },\n "labels": {},\n "location": "",\n "name": "",\n "pipelineDescription": {\n "displayData": [\n {\n "boolValue": false,\n "durationValue": "",\n "floatValue": "",\n "int64Value": "",\n "javaClassValue": "",\n "key": "",\n "label": "",\n "namespace": "",\n "shortStrValue": "",\n "strValue": "",\n "timestampValue": "",\n "url": ""\n }\n ],\n "executionPipelineStage": [\n {\n "componentSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "userName": ""\n }\n ],\n "componentTransform": [\n {\n "name": "",\n "originalTransform": "",\n "userName": ""\n }\n ],\n "id": "",\n "inputSource": [\n {\n "name": "",\n "originalTransformOrCollection": "",\n "sizeBytes": "",\n "userName": ""\n }\n ],\n "kind": "",\n "name": "",\n "outputSource": [\n {}\n ],\n "prerequisiteStage": []\n }\n ],\n "originalPipelineTransform": [\n {\n "displayData": [\n {}\n ],\n "id": "",\n "inputCollectionName": [],\n "kind": "",\n "name": "",\n "outputCollectionName": []\n }\n ],\n "stepNamesHash": ""\n },\n "projectId": "",\n "replaceJobId": "",\n "replacedByJobId": "",\n "requestedState": "",\n "satisfiesPzs": false,\n "stageStates": [\n {\n "currentStateTime": "",\n "executionStageName": "",\n "executionStageState": ""\n }\n ],\n "startTime": "",\n "steps": [\n {\n "kind": "",\n "name": "",\n "properties": {}\n }\n ],\n "stepsLocation": "",\n "tempFiles": [],\n "transformNameMapping": {},\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"clientRequestId": "",
"createTime": "",
"createdFromSnapshotId": "",
"currentState": "",
"currentStateTime": "",
"environment": [
"clusterManagerApiService": "",
"dataset": "",
"debugOptions": ["enableHotKeyLogging": false],
"experiments": [],
"flexResourceSchedulingGoal": "",
"internalExperiments": [],
"sdkPipelineOptions": [],
"serviceAccountEmail": "",
"serviceKmsKeyName": "",
"serviceOptions": [],
"shuffleMode": "",
"tempStoragePrefix": "",
"userAgent": [],
"version": [],
"workerPools": [
[
"autoscalingSettings": [
"algorithm": "",
"maxNumWorkers": 0
],
"dataDisks": [
[
"diskType": "",
"mountPoint": "",
"sizeGb": 0
]
],
"defaultPackageSet": "",
"diskSizeGb": 0,
"diskSourceImage": "",
"diskType": "",
"ipConfiguration": "",
"kind": "",
"machineType": "",
"metadata": [],
"network": "",
"numThreadsPerWorker": 0,
"numWorkers": 0,
"onHostMaintenance": "",
"packages": [
[
"location": "",
"name": ""
]
],
"poolArgs": [],
"sdkHarnessContainerImages": [
[
"capabilities": [],
"containerImage": "",
"environmentId": "",
"useSingleCorePerContainer": false
]
],
"subnetwork": "",
"taskrunnerSettings": [
"alsologtostderr": false,
"baseTaskDir": "",
"baseUrl": "",
"commandlinesFileName": "",
"continueOnException": false,
"dataflowApiVersion": "",
"harnessCommand": "",
"languageHint": "",
"logDir": "",
"logToSerialconsole": false,
"logUploadLocation": "",
"oauthScopes": [],
"parallelWorkerSettings": [
"baseUrl": "",
"reportingEnabled": false,
"servicePath": "",
"shuffleServicePath": "",
"tempStoragePrefix": "",
"workerId": ""
],
"streamingWorkerMainClass": "",
"taskGroup": "",
"taskUser": "",
"tempStoragePrefix": "",
"vmId": "",
"workflowFileName": ""
],
"teardownPolicy": "",
"workerHarnessContainerImage": "",
"zone": ""
]
],
"workerRegion": "",
"workerZone": ""
],
"executionInfo": ["stages": []],
"id": "",
"jobMetadata": [
"bigTableDetails": [
[
"instanceId": "",
"projectId": "",
"tableId": ""
]
],
"bigqueryDetails": [
[
"dataset": "",
"projectId": "",
"query": "",
"table": ""
]
],
"datastoreDetails": [
[
"namespace": "",
"projectId": ""
]
],
"fileDetails": [["filePattern": ""]],
"pubsubDetails": [
[
"subscription": "",
"topic": ""
]
],
"sdkVersion": [
"sdkSupportStatus": "",
"version": "",
"versionDisplayName": ""
],
"spannerDetails": [
[
"databaseId": "",
"instanceId": "",
"projectId": ""
]
],
"userDisplayProperties": []
],
"labels": [],
"location": "",
"name": "",
"pipelineDescription": [
"displayData": [
[
"boolValue": false,
"durationValue": "",
"floatValue": "",
"int64Value": "",
"javaClassValue": "",
"key": "",
"label": "",
"namespace": "",
"shortStrValue": "",
"strValue": "",
"timestampValue": "",
"url": ""
]
],
"executionPipelineStage": [
[
"componentSource": [
[
"name": "",
"originalTransformOrCollection": "",
"userName": ""
]
],
"componentTransform": [
[
"name": "",
"originalTransform": "",
"userName": ""
]
],
"id": "",
"inputSource": [
[
"name": "",
"originalTransformOrCollection": "",
"sizeBytes": "",
"userName": ""
]
],
"kind": "",
"name": "",
"outputSource": [[]],
"prerequisiteStage": []
]
],
"originalPipelineTransform": [
[
"displayData": [[]],
"id": "",
"inputCollectionName": [],
"kind": "",
"name": "",
"outputCollectionName": []
]
],
"stepNamesHash": ""
],
"projectId": "",
"replaceJobId": "",
"replacedByJobId": "",
"requestedState": "",
"satisfiesPzs": false,
"stageStates": [
[
"currentStateTime": "",
"executionStageName": "",
"executionStageState": ""
]
],
"startTime": "",
"steps": [
[
"kind": "",
"name": "",
"properties": []
]
],
"stepsLocation": "",
"tempFiles": [],
"transformNameMapping": [],
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.locations.jobs.workItems.lease
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease
QUERY PARAMS
projectId
location
jobId
BODY json
{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease");
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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease" {:content-type :json
:form-params {:currentWorkerTime ""
:location ""
:requestedLeaseDuration ""
:unifiedWorkerRequest {}
:workItemTypes []
:workerCapabilities []
:workerId ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease"),
Content = new StringContent("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease"
payload := strings.NewReader("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 178
{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease")
.setHeader("content-type", "application/json")
.setBody("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease")
.header("content-type", "application/json")
.body("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease',
headers: {'content-type': 'application/json'},
data: {
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"currentWorkerTime":"","location":"","requestedLeaseDuration":"","unifiedWorkerRequest":{},"workItemTypes":[],"workerCapabilities":[],"workerId":""}'
};
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "currentWorkerTime": "",\n "location": "",\n "requestedLeaseDuration": "",\n "unifiedWorkerRequest": {},\n "workItemTypes": [],\n "workerCapabilities": [],\n "workerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease")
.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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease',
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({
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease',
headers: {'content-type': 'application/json'},
body: {
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
},
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease',
headers: {'content-type': 'application/json'},
data: {
currentWorkerTime: '',
location: '',
requestedLeaseDuration: '',
unifiedWorkerRequest: {},
workItemTypes: [],
workerCapabilities: [],
workerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"currentWorkerTime":"","location":"","requestedLeaseDuration":"","unifiedWorkerRequest":{},"workItemTypes":[],"workerCapabilities":[],"workerId":""}'
};
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 = @{ @"currentWorkerTime": @"",
@"location": @"",
@"requestedLeaseDuration": @"",
@"unifiedWorkerRequest": @{ },
@"workItemTypes": @[ ],
@"workerCapabilities": @[ ],
@"workerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease",
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([
'currentWorkerTime' => '',
'location' => '',
'requestedLeaseDuration' => '',
'unifiedWorkerRequest' => [
],
'workItemTypes' => [
],
'workerCapabilities' => [
],
'workerId' => ''
]),
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease', [
'body' => '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currentWorkerTime' => '',
'location' => '',
'requestedLeaseDuration' => '',
'unifiedWorkerRequest' => [
],
'workItemTypes' => [
],
'workerCapabilities' => [
],
'workerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currentWorkerTime' => '',
'location' => '',
'requestedLeaseDuration' => '',
'unifiedWorkerRequest' => [
],
'workItemTypes' => [
],
'workerCapabilities' => [
],
'workerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease');
$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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease"
payload = {
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease"
payload <- "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease")
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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease') do |req|
req.body = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"requestedLeaseDuration\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemTypes\": [],\n \"workerCapabilities\": [],\n \"workerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease";
let payload = json!({
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": json!({}),
"workItemTypes": (),
"workerCapabilities": (),
"workerId": ""
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease \
--header 'content-type: application/json' \
--data '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}'
echo '{
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": {},
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "currentWorkerTime": "",\n "location": "",\n "requestedLeaseDuration": "",\n "unifiedWorkerRequest": {},\n "workItemTypes": [],\n "workerCapabilities": [],\n "workerId": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"currentWorkerTime": "",
"location": "",
"requestedLeaseDuration": "",
"unifiedWorkerRequest": [],
"workItemTypes": [],
"workerCapabilities": [],
"workerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:lease")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.locations.jobs.workItems.reportStatus
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus
QUERY PARAMS
projectId
location
jobId
BODY json
{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus");
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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus" {:content-type :json
:form-params {:currentWorkerTime ""
:location ""
:unifiedWorkerRequest {}
:workItemStatuses [{:completed false
:counterUpdates [{:boolean false
:cumulative false
:distribution {:count {:highBits 0
:lowBits 0}
:histogram {:bucketCounts []
:firstBucketOffset 0}
:max {}
:min {}
:sum {}
:sumOfSquares ""}
:floatingPoint ""
:floatingPointList {:elements []}
:floatingPointMean {:count {}
:sum ""}
:integer {}
:integerGauge {:timestamp ""
:value {}}
:integerList {:elements [{}]}
:integerMean {:count {}
:sum {}}
:internal ""
:nameAndKind {:kind ""
:name ""}
:shortId ""
:stringList {:elements []}
:structuredNameAndMetadata {:metadata {:description ""
:kind ""
:otherUnits ""
:standardUnits ""}
:name {:componentStepName ""
:executionStepName ""
:inputIndex 0
:name ""
:origin ""
:originNamespace ""
:originalRequestingStepName ""
:originalStepName ""
:portion ""
:workerId ""}}}]
:dynamicSourceSplit {:primary {:derivationMode ""
:source {:baseSpecs [{}]
:codec {}
:doesNotNeedSplitting false
:metadata {:estimatedSizeBytes ""
:infinite false
:producesSortedKeys false}
:spec {}}}
:residual {}}
:errors [{:code 0
:details [{}]
:message ""}]
:metricUpdates [{:cumulative false
:distribution ""
:gauge ""
:internal ""
:kind ""
:meanCount ""
:meanSum ""
:name {:context {}
:name ""
:origin ""}
:scalar ""
:set ""
:updateTime ""}]
:progress {:percentComplete ""
:position {:byteOffset ""
:concatPosition {:index 0
:position ""}
:end false
:key ""
:recordIndex ""
:shufflePosition ""}
:remainingTime ""}
:reportIndex ""
:reportedProgress {:consumedParallelism {:isInfinite false
:value ""}
:fractionConsumed ""
:position {}
:remainingParallelism {}}
:requestedLeaseDuration ""
:sourceFork {:primary {:derivationMode ""
:source {}}
:primarySource {}
:residual {}
:residualSource {}}
:sourceOperationResponse {:getMetadata {:metadata {}}
:split {:bundles [{}]
:outcome ""
:shards [{}]}}
:stopPosition {}
:totalThrottlerWaitTimeSeconds ""
:workItemId ""}]
:workerId ""}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus"),
Content = new StringContent("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus"
payload := strings.NewReader("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4141
{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus")
.setHeader("content-type", "application/json")
.setBody("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus")
.header("content-type", "application/json")
.body("{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}")
.asString();
const data = JSON.stringify({
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {
highBits: 0,
lowBits: 0
},
histogram: {
bucketCounts: [],
firstBucketOffset: 0
},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {
elements: []
},
floatingPointMean: {
count: {},
sum: ''
},
integer: {},
integerGauge: {
timestamp: '',
value: {}
},
integerList: {
elements: [
{}
]
},
integerMean: {
count: {},
sum: {}
},
internal: '',
nameAndKind: {
kind: '',
name: ''
},
shortId: '',
stringList: {
elements: []
},
structuredNameAndMetadata: {
metadata: {
description: '',
kind: '',
otherUnits: '',
standardUnits: ''
},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [
{}
],
codec: {},
doesNotNeedSplitting: false,
metadata: {
estimatedSizeBytes: '',
infinite: false,
producesSortedKeys: false
},
spec: {}
}
},
residual: {}
},
errors: [
{
code: 0,
details: [
{}
],
message: ''
}
],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {
context: {},
name: '',
origin: ''
},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {
index: 0,
position: ''
},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {
isInfinite: false,
value: ''
},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {
derivationMode: '',
source: {}
},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {
getMetadata: {
metadata: {}
},
split: {
bundles: [
{}
],
outcome: '',
shards: [
{}
]
}
},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus',
headers: {'content-type': 'application/json'},
data: {
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {highBits: 0, lowBits: 0},
histogram: {bucketCounts: [], firstBucketOffset: 0},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {elements: []},
floatingPointMean: {count: {}, sum: ''},
integer: {},
integerGauge: {timestamp: '', value: {}},
integerList: {elements: [{}]},
integerMean: {count: {}, sum: {}},
internal: '',
nameAndKind: {kind: '', name: ''},
shortId: '',
stringList: {elements: []},
structuredNameAndMetadata: {
metadata: {description: '', kind: '', otherUnits: '', standardUnits: ''},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [{}],
codec: {},
doesNotNeedSplitting: false,
metadata: {estimatedSizeBytes: '', infinite: false, producesSortedKeys: false},
spec: {}
}
},
residual: {}
},
errors: [{code: 0, details: [{}], message: ''}],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {context: {}, name: '', origin: ''},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {index: 0, position: ''},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {isInfinite: false, value: ''},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {derivationMode: '', source: {}},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {getMetadata: {metadata: {}}, split: {bundles: [{}], outcome: '', shards: [{}]}},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"currentWorkerTime":"","location":"","unifiedWorkerRequest":{},"workItemStatuses":[{"completed":false,"counterUpdates":[{"boolean":false,"cumulative":false,"distribution":{"count":{"highBits":0,"lowBits":0},"histogram":{"bucketCounts":[],"firstBucketOffset":0},"max":{},"min":{},"sum":{},"sumOfSquares":""},"floatingPoint":"","floatingPointList":{"elements":[]},"floatingPointMean":{"count":{},"sum":""},"integer":{},"integerGauge":{"timestamp":"","value":{}},"integerList":{"elements":[{}]},"integerMean":{"count":{},"sum":{}},"internal":"","nameAndKind":{"kind":"","name":""},"shortId":"","stringList":{"elements":[]},"structuredNameAndMetadata":{"metadata":{"description":"","kind":"","otherUnits":"","standardUnits":""},"name":{"componentStepName":"","executionStepName":"","inputIndex":0,"name":"","origin":"","originNamespace":"","originalRequestingStepName":"","originalStepName":"","portion":"","workerId":""}}}],"dynamicSourceSplit":{"primary":{"derivationMode":"","source":{"baseSpecs":[{}],"codec":{},"doesNotNeedSplitting":false,"metadata":{"estimatedSizeBytes":"","infinite":false,"producesSortedKeys":false},"spec":{}}},"residual":{}},"errors":[{"code":0,"details":[{}],"message":""}],"metricUpdates":[{"cumulative":false,"distribution":"","gauge":"","internal":"","kind":"","meanCount":"","meanSum":"","name":{"context":{},"name":"","origin":""},"scalar":"","set":"","updateTime":""}],"progress":{"percentComplete":"","position":{"byteOffset":"","concatPosition":{"index":0,"position":""},"end":false,"key":"","recordIndex":"","shufflePosition":""},"remainingTime":""},"reportIndex":"","reportedProgress":{"consumedParallelism":{"isInfinite":false,"value":""},"fractionConsumed":"","position":{},"remainingParallelism":{}},"requestedLeaseDuration":"","sourceFork":{"primary":{"derivationMode":"","source":{}},"primarySource":{},"residual":{},"residualSource":{}},"sourceOperationResponse":{"getMetadata":{"metadata":{}},"split":{"bundles":[{}],"outcome":"","shards":[{}]}},"stopPosition":{},"totalThrottlerWaitTimeSeconds":"","workItemId":""}],"workerId":""}'
};
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "currentWorkerTime": "",\n "location": "",\n "unifiedWorkerRequest": {},\n "workItemStatuses": [\n {\n "completed": false,\n "counterUpdates": [\n {\n "boolean": false,\n "cumulative": false,\n "distribution": {\n "count": {\n "highBits": 0,\n "lowBits": 0\n },\n "histogram": {\n "bucketCounts": [],\n "firstBucketOffset": 0\n },\n "max": {},\n "min": {},\n "sum": {},\n "sumOfSquares": ""\n },\n "floatingPoint": "",\n "floatingPointList": {\n "elements": []\n },\n "floatingPointMean": {\n "count": {},\n "sum": ""\n },\n "integer": {},\n "integerGauge": {\n "timestamp": "",\n "value": {}\n },\n "integerList": {\n "elements": [\n {}\n ]\n },\n "integerMean": {\n "count": {},\n "sum": {}\n },\n "internal": "",\n "nameAndKind": {\n "kind": "",\n "name": ""\n },\n "shortId": "",\n "stringList": {\n "elements": []\n },\n "structuredNameAndMetadata": {\n "metadata": {\n "description": "",\n "kind": "",\n "otherUnits": "",\n "standardUnits": ""\n },\n "name": {\n "componentStepName": "",\n "executionStepName": "",\n "inputIndex": 0,\n "name": "",\n "origin": "",\n "originNamespace": "",\n "originalRequestingStepName": "",\n "originalStepName": "",\n "portion": "",\n "workerId": ""\n }\n }\n }\n ],\n "dynamicSourceSplit": {\n "primary": {\n "derivationMode": "",\n "source": {\n "baseSpecs": [\n {}\n ],\n "codec": {},\n "doesNotNeedSplitting": false,\n "metadata": {\n "estimatedSizeBytes": "",\n "infinite": false,\n "producesSortedKeys": false\n },\n "spec": {}\n }\n },\n "residual": {}\n },\n "errors": [\n {\n "code": 0,\n "details": [\n {}\n ],\n "message": ""\n }\n ],\n "metricUpdates": [\n {\n "cumulative": false,\n "distribution": "",\n "gauge": "",\n "internal": "",\n "kind": "",\n "meanCount": "",\n "meanSum": "",\n "name": {\n "context": {},\n "name": "",\n "origin": ""\n },\n "scalar": "",\n "set": "",\n "updateTime": ""\n }\n ],\n "progress": {\n "percentComplete": "",\n "position": {\n "byteOffset": "",\n "concatPosition": {\n "index": 0,\n "position": ""\n },\n "end": false,\n "key": "",\n "recordIndex": "",\n "shufflePosition": ""\n },\n "remainingTime": ""\n },\n "reportIndex": "",\n "reportedProgress": {\n "consumedParallelism": {\n "isInfinite": false,\n "value": ""\n },\n "fractionConsumed": "",\n "position": {},\n "remainingParallelism": {}\n },\n "requestedLeaseDuration": "",\n "sourceFork": {\n "primary": {\n "derivationMode": "",\n "source": {}\n },\n "primarySource": {},\n "residual": {},\n "residualSource": {}\n },\n "sourceOperationResponse": {\n "getMetadata": {\n "metadata": {}\n },\n "split": {\n "bundles": [\n {}\n ],\n "outcome": "",\n "shards": [\n {}\n ]\n }\n },\n "stopPosition": {},\n "totalThrottlerWaitTimeSeconds": "",\n "workItemId": ""\n }\n ],\n "workerId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus")
.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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus',
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({
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {highBits: 0, lowBits: 0},
histogram: {bucketCounts: [], firstBucketOffset: 0},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {elements: []},
floatingPointMean: {count: {}, sum: ''},
integer: {},
integerGauge: {timestamp: '', value: {}},
integerList: {elements: [{}]},
integerMean: {count: {}, sum: {}},
internal: '',
nameAndKind: {kind: '', name: ''},
shortId: '',
stringList: {elements: []},
structuredNameAndMetadata: {
metadata: {description: '', kind: '', otherUnits: '', standardUnits: ''},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [{}],
codec: {},
doesNotNeedSplitting: false,
metadata: {estimatedSizeBytes: '', infinite: false, producesSortedKeys: false},
spec: {}
}
},
residual: {}
},
errors: [{code: 0, details: [{}], message: ''}],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {context: {}, name: '', origin: ''},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {index: 0, position: ''},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {isInfinite: false, value: ''},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {derivationMode: '', source: {}},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {getMetadata: {metadata: {}}, split: {bundles: [{}], outcome: '', shards: [{}]}},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus',
headers: {'content-type': 'application/json'},
body: {
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {highBits: 0, lowBits: 0},
histogram: {bucketCounts: [], firstBucketOffset: 0},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {elements: []},
floatingPointMean: {count: {}, sum: ''},
integer: {},
integerGauge: {timestamp: '', value: {}},
integerList: {elements: [{}]},
integerMean: {count: {}, sum: {}},
internal: '',
nameAndKind: {kind: '', name: ''},
shortId: '',
stringList: {elements: []},
structuredNameAndMetadata: {
metadata: {description: '', kind: '', otherUnits: '', standardUnits: ''},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [{}],
codec: {},
doesNotNeedSplitting: false,
metadata: {estimatedSizeBytes: '', infinite: false, producesSortedKeys: false},
spec: {}
}
},
residual: {}
},
errors: [{code: 0, details: [{}], message: ''}],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {context: {}, name: '', origin: ''},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {index: 0, position: ''},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {isInfinite: false, value: ''},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {derivationMode: '', source: {}},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {getMetadata: {metadata: {}}, split: {bundles: [{}], outcome: '', shards: [{}]}},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
},
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {
highBits: 0,
lowBits: 0
},
histogram: {
bucketCounts: [],
firstBucketOffset: 0
},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {
elements: []
},
floatingPointMean: {
count: {},
sum: ''
},
integer: {},
integerGauge: {
timestamp: '',
value: {}
},
integerList: {
elements: [
{}
]
},
integerMean: {
count: {},
sum: {}
},
internal: '',
nameAndKind: {
kind: '',
name: ''
},
shortId: '',
stringList: {
elements: []
},
structuredNameAndMetadata: {
metadata: {
description: '',
kind: '',
otherUnits: '',
standardUnits: ''
},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [
{}
],
codec: {},
doesNotNeedSplitting: false,
metadata: {
estimatedSizeBytes: '',
infinite: false,
producesSortedKeys: false
},
spec: {}
}
},
residual: {}
},
errors: [
{
code: 0,
details: [
{}
],
message: ''
}
],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {
context: {},
name: '',
origin: ''
},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {
index: 0,
position: ''
},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {
isInfinite: false,
value: ''
},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {
derivationMode: '',
source: {}
},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {
getMetadata: {
metadata: {}
},
split: {
bundles: [
{}
],
outcome: '',
shards: [
{}
]
}
},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus',
headers: {'content-type': 'application/json'},
data: {
currentWorkerTime: '',
location: '',
unifiedWorkerRequest: {},
workItemStatuses: [
{
completed: false,
counterUpdates: [
{
boolean: false,
cumulative: false,
distribution: {
count: {highBits: 0, lowBits: 0},
histogram: {bucketCounts: [], firstBucketOffset: 0},
max: {},
min: {},
sum: {},
sumOfSquares: ''
},
floatingPoint: '',
floatingPointList: {elements: []},
floatingPointMean: {count: {}, sum: ''},
integer: {},
integerGauge: {timestamp: '', value: {}},
integerList: {elements: [{}]},
integerMean: {count: {}, sum: {}},
internal: '',
nameAndKind: {kind: '', name: ''},
shortId: '',
stringList: {elements: []},
structuredNameAndMetadata: {
metadata: {description: '', kind: '', otherUnits: '', standardUnits: ''},
name: {
componentStepName: '',
executionStepName: '',
inputIndex: 0,
name: '',
origin: '',
originNamespace: '',
originalRequestingStepName: '',
originalStepName: '',
portion: '',
workerId: ''
}
}
}
],
dynamicSourceSplit: {
primary: {
derivationMode: '',
source: {
baseSpecs: [{}],
codec: {},
doesNotNeedSplitting: false,
metadata: {estimatedSizeBytes: '', infinite: false, producesSortedKeys: false},
spec: {}
}
},
residual: {}
},
errors: [{code: 0, details: [{}], message: ''}],
metricUpdates: [
{
cumulative: false,
distribution: '',
gauge: '',
internal: '',
kind: '',
meanCount: '',
meanSum: '',
name: {context: {}, name: '', origin: ''},
scalar: '',
set: '',
updateTime: ''
}
],
progress: {
percentComplete: '',
position: {
byteOffset: '',
concatPosition: {index: 0, position: ''},
end: false,
key: '',
recordIndex: '',
shufflePosition: ''
},
remainingTime: ''
},
reportIndex: '',
reportedProgress: {
consumedParallelism: {isInfinite: false, value: ''},
fractionConsumed: '',
position: {},
remainingParallelism: {}
},
requestedLeaseDuration: '',
sourceFork: {
primary: {derivationMode: '', source: {}},
primarySource: {},
residual: {},
residualSource: {}
},
sourceOperationResponse: {getMetadata: {metadata: {}}, split: {bundles: [{}], outcome: '', shards: [{}]}},
stopPosition: {},
totalThrottlerWaitTimeSeconds: '',
workItemId: ''
}
],
workerId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"currentWorkerTime":"","location":"","unifiedWorkerRequest":{},"workItemStatuses":[{"completed":false,"counterUpdates":[{"boolean":false,"cumulative":false,"distribution":{"count":{"highBits":0,"lowBits":0},"histogram":{"bucketCounts":[],"firstBucketOffset":0},"max":{},"min":{},"sum":{},"sumOfSquares":""},"floatingPoint":"","floatingPointList":{"elements":[]},"floatingPointMean":{"count":{},"sum":""},"integer":{},"integerGauge":{"timestamp":"","value":{}},"integerList":{"elements":[{}]},"integerMean":{"count":{},"sum":{}},"internal":"","nameAndKind":{"kind":"","name":""},"shortId":"","stringList":{"elements":[]},"structuredNameAndMetadata":{"metadata":{"description":"","kind":"","otherUnits":"","standardUnits":""},"name":{"componentStepName":"","executionStepName":"","inputIndex":0,"name":"","origin":"","originNamespace":"","originalRequestingStepName":"","originalStepName":"","portion":"","workerId":""}}}],"dynamicSourceSplit":{"primary":{"derivationMode":"","source":{"baseSpecs":[{}],"codec":{},"doesNotNeedSplitting":false,"metadata":{"estimatedSizeBytes":"","infinite":false,"producesSortedKeys":false},"spec":{}}},"residual":{}},"errors":[{"code":0,"details":[{}],"message":""}],"metricUpdates":[{"cumulative":false,"distribution":"","gauge":"","internal":"","kind":"","meanCount":"","meanSum":"","name":{"context":{},"name":"","origin":""},"scalar":"","set":"","updateTime":""}],"progress":{"percentComplete":"","position":{"byteOffset":"","concatPosition":{"index":0,"position":""},"end":false,"key":"","recordIndex":"","shufflePosition":""},"remainingTime":""},"reportIndex":"","reportedProgress":{"consumedParallelism":{"isInfinite":false,"value":""},"fractionConsumed":"","position":{},"remainingParallelism":{}},"requestedLeaseDuration":"","sourceFork":{"primary":{"derivationMode":"","source":{}},"primarySource":{},"residual":{},"residualSource":{}},"sourceOperationResponse":{"getMetadata":{"metadata":{}},"split":{"bundles":[{}],"outcome":"","shards":[{}]}},"stopPosition":{},"totalThrottlerWaitTimeSeconds":"","workItemId":""}],"workerId":""}'
};
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 = @{ @"currentWorkerTime": @"",
@"location": @"",
@"unifiedWorkerRequest": @{ },
@"workItemStatuses": @[ @{ @"completed": @NO, @"counterUpdates": @[ @{ @"boolean": @NO, @"cumulative": @NO, @"distribution": @{ @"count": @{ @"highBits": @0, @"lowBits": @0 }, @"histogram": @{ @"bucketCounts": @[ ], @"firstBucketOffset": @0 }, @"max": @{ }, @"min": @{ }, @"sum": @{ }, @"sumOfSquares": @"" }, @"floatingPoint": @"", @"floatingPointList": @{ @"elements": @[ ] }, @"floatingPointMean": @{ @"count": @{ }, @"sum": @"" }, @"integer": @{ }, @"integerGauge": @{ @"timestamp": @"", @"value": @{ } }, @"integerList": @{ @"elements": @[ @{ } ] }, @"integerMean": @{ @"count": @{ }, @"sum": @{ } }, @"internal": @"", @"nameAndKind": @{ @"kind": @"", @"name": @"" }, @"shortId": @"", @"stringList": @{ @"elements": @[ ] }, @"structuredNameAndMetadata": @{ @"metadata": @{ @"description": @"", @"kind": @"", @"otherUnits": @"", @"standardUnits": @"" }, @"name": @{ @"componentStepName": @"", @"executionStepName": @"", @"inputIndex": @0, @"name": @"", @"origin": @"", @"originNamespace": @"", @"originalRequestingStepName": @"", @"originalStepName": @"", @"portion": @"", @"workerId": @"" } } } ], @"dynamicSourceSplit": @{ @"primary": @{ @"derivationMode": @"", @"source": @{ @"baseSpecs": @[ @{ } ], @"codec": @{ }, @"doesNotNeedSplitting": @NO, @"metadata": @{ @"estimatedSizeBytes": @"", @"infinite": @NO, @"producesSortedKeys": @NO }, @"spec": @{ } } }, @"residual": @{ } }, @"errors": @[ @{ @"code": @0, @"details": @[ @{ } ], @"message": @"" } ], @"metricUpdates": @[ @{ @"cumulative": @NO, @"distribution": @"", @"gauge": @"", @"internal": @"", @"kind": @"", @"meanCount": @"", @"meanSum": @"", @"name": @{ @"context": @{ }, @"name": @"", @"origin": @"" }, @"scalar": @"", @"set": @"", @"updateTime": @"" } ], @"progress": @{ @"percentComplete": @"", @"position": @{ @"byteOffset": @"", @"concatPosition": @{ @"index": @0, @"position": @"" }, @"end": @NO, @"key": @"", @"recordIndex": @"", @"shufflePosition": @"" }, @"remainingTime": @"" }, @"reportIndex": @"", @"reportedProgress": @{ @"consumedParallelism": @{ @"isInfinite": @NO, @"value": @"" }, @"fractionConsumed": @"", @"position": @{ }, @"remainingParallelism": @{ } }, @"requestedLeaseDuration": @"", @"sourceFork": @{ @"primary": @{ @"derivationMode": @"", @"source": @{ } }, @"primarySource": @{ }, @"residual": @{ }, @"residualSource": @{ } }, @"sourceOperationResponse": @{ @"getMetadata": @{ @"metadata": @{ } }, @"split": @{ @"bundles": @[ @{ } ], @"outcome": @"", @"shards": @[ @{ } ] } }, @"stopPosition": @{ }, @"totalThrottlerWaitTimeSeconds": @"", @"workItemId": @"" } ],
@"workerId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus"]
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus",
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([
'currentWorkerTime' => '',
'location' => '',
'unifiedWorkerRequest' => [
],
'workItemStatuses' => [
[
'completed' => null,
'counterUpdates' => [
[
'boolean' => null,
'cumulative' => null,
'distribution' => [
'count' => [
'highBits' => 0,
'lowBits' => 0
],
'histogram' => [
'bucketCounts' => [
],
'firstBucketOffset' => 0
],
'max' => [
],
'min' => [
],
'sum' => [
],
'sumOfSquares' => ''
],
'floatingPoint' => '',
'floatingPointList' => [
'elements' => [
]
],
'floatingPointMean' => [
'count' => [
],
'sum' => ''
],
'integer' => [
],
'integerGauge' => [
'timestamp' => '',
'value' => [
]
],
'integerList' => [
'elements' => [
[
]
]
],
'integerMean' => [
'count' => [
],
'sum' => [
]
],
'internal' => '',
'nameAndKind' => [
'kind' => '',
'name' => ''
],
'shortId' => '',
'stringList' => [
'elements' => [
]
],
'structuredNameAndMetadata' => [
'metadata' => [
'description' => '',
'kind' => '',
'otherUnits' => '',
'standardUnits' => ''
],
'name' => [
'componentStepName' => '',
'executionStepName' => '',
'inputIndex' => 0,
'name' => '',
'origin' => '',
'originNamespace' => '',
'originalRequestingStepName' => '',
'originalStepName' => '',
'portion' => '',
'workerId' => ''
]
]
]
],
'dynamicSourceSplit' => [
'primary' => [
'derivationMode' => '',
'source' => [
'baseSpecs' => [
[
]
],
'codec' => [
],
'doesNotNeedSplitting' => null,
'metadata' => [
'estimatedSizeBytes' => '',
'infinite' => null,
'producesSortedKeys' => null
],
'spec' => [
]
]
],
'residual' => [
]
],
'errors' => [
[
'code' => 0,
'details' => [
[
]
],
'message' => ''
]
],
'metricUpdates' => [
[
'cumulative' => null,
'distribution' => '',
'gauge' => '',
'internal' => '',
'kind' => '',
'meanCount' => '',
'meanSum' => '',
'name' => [
'context' => [
],
'name' => '',
'origin' => ''
],
'scalar' => '',
'set' => '',
'updateTime' => ''
]
],
'progress' => [
'percentComplete' => '',
'position' => [
'byteOffset' => '',
'concatPosition' => [
'index' => 0,
'position' => ''
],
'end' => null,
'key' => '',
'recordIndex' => '',
'shufflePosition' => ''
],
'remainingTime' => ''
],
'reportIndex' => '',
'reportedProgress' => [
'consumedParallelism' => [
'isInfinite' => null,
'value' => ''
],
'fractionConsumed' => '',
'position' => [
],
'remainingParallelism' => [
]
],
'requestedLeaseDuration' => '',
'sourceFork' => [
'primary' => [
'derivationMode' => '',
'source' => [
]
],
'primarySource' => [
],
'residual' => [
],
'residualSource' => [
]
],
'sourceOperationResponse' => [
'getMetadata' => [
'metadata' => [
]
],
'split' => [
'bundles' => [
[
]
],
'outcome' => '',
'shards' => [
[
]
]
]
],
'stopPosition' => [
],
'totalThrottlerWaitTimeSeconds' => '',
'workItemId' => ''
]
],
'workerId' => ''
]),
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus', [
'body' => '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'currentWorkerTime' => '',
'location' => '',
'unifiedWorkerRequest' => [
],
'workItemStatuses' => [
[
'completed' => null,
'counterUpdates' => [
[
'boolean' => null,
'cumulative' => null,
'distribution' => [
'count' => [
'highBits' => 0,
'lowBits' => 0
],
'histogram' => [
'bucketCounts' => [
],
'firstBucketOffset' => 0
],
'max' => [
],
'min' => [
],
'sum' => [
],
'sumOfSquares' => ''
],
'floatingPoint' => '',
'floatingPointList' => [
'elements' => [
]
],
'floatingPointMean' => [
'count' => [
],
'sum' => ''
],
'integer' => [
],
'integerGauge' => [
'timestamp' => '',
'value' => [
]
],
'integerList' => [
'elements' => [
[
]
]
],
'integerMean' => [
'count' => [
],
'sum' => [
]
],
'internal' => '',
'nameAndKind' => [
'kind' => '',
'name' => ''
],
'shortId' => '',
'stringList' => [
'elements' => [
]
],
'structuredNameAndMetadata' => [
'metadata' => [
'description' => '',
'kind' => '',
'otherUnits' => '',
'standardUnits' => ''
],
'name' => [
'componentStepName' => '',
'executionStepName' => '',
'inputIndex' => 0,
'name' => '',
'origin' => '',
'originNamespace' => '',
'originalRequestingStepName' => '',
'originalStepName' => '',
'portion' => '',
'workerId' => ''
]
]
]
],
'dynamicSourceSplit' => [
'primary' => [
'derivationMode' => '',
'source' => [
'baseSpecs' => [
[
]
],
'codec' => [
],
'doesNotNeedSplitting' => null,
'metadata' => [
'estimatedSizeBytes' => '',
'infinite' => null,
'producesSortedKeys' => null
],
'spec' => [
]
]
],
'residual' => [
]
],
'errors' => [
[
'code' => 0,
'details' => [
[
]
],
'message' => ''
]
],
'metricUpdates' => [
[
'cumulative' => null,
'distribution' => '',
'gauge' => '',
'internal' => '',
'kind' => '',
'meanCount' => '',
'meanSum' => '',
'name' => [
'context' => [
],
'name' => '',
'origin' => ''
],
'scalar' => '',
'set' => '',
'updateTime' => ''
]
],
'progress' => [
'percentComplete' => '',
'position' => [
'byteOffset' => '',
'concatPosition' => [
'index' => 0,
'position' => ''
],
'end' => null,
'key' => '',
'recordIndex' => '',
'shufflePosition' => ''
],
'remainingTime' => ''
],
'reportIndex' => '',
'reportedProgress' => [
'consumedParallelism' => [
'isInfinite' => null,
'value' => ''
],
'fractionConsumed' => '',
'position' => [
],
'remainingParallelism' => [
]
],
'requestedLeaseDuration' => '',
'sourceFork' => [
'primary' => [
'derivationMode' => '',
'source' => [
]
],
'primarySource' => [
],
'residual' => [
],
'residualSource' => [
]
],
'sourceOperationResponse' => [
'getMetadata' => [
'metadata' => [
]
],
'split' => [
'bundles' => [
[
]
],
'outcome' => '',
'shards' => [
[
]
]
]
],
'stopPosition' => [
],
'totalThrottlerWaitTimeSeconds' => '',
'workItemId' => ''
]
],
'workerId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'currentWorkerTime' => '',
'location' => '',
'unifiedWorkerRequest' => [
],
'workItemStatuses' => [
[
'completed' => null,
'counterUpdates' => [
[
'boolean' => null,
'cumulative' => null,
'distribution' => [
'count' => [
'highBits' => 0,
'lowBits' => 0
],
'histogram' => [
'bucketCounts' => [
],
'firstBucketOffset' => 0
],
'max' => [
],
'min' => [
],
'sum' => [
],
'sumOfSquares' => ''
],
'floatingPoint' => '',
'floatingPointList' => [
'elements' => [
]
],
'floatingPointMean' => [
'count' => [
],
'sum' => ''
],
'integer' => [
],
'integerGauge' => [
'timestamp' => '',
'value' => [
]
],
'integerList' => [
'elements' => [
[
]
]
],
'integerMean' => [
'count' => [
],
'sum' => [
]
],
'internal' => '',
'nameAndKind' => [
'kind' => '',
'name' => ''
],
'shortId' => '',
'stringList' => [
'elements' => [
]
],
'structuredNameAndMetadata' => [
'metadata' => [
'description' => '',
'kind' => '',
'otherUnits' => '',
'standardUnits' => ''
],
'name' => [
'componentStepName' => '',
'executionStepName' => '',
'inputIndex' => 0,
'name' => '',
'origin' => '',
'originNamespace' => '',
'originalRequestingStepName' => '',
'originalStepName' => '',
'portion' => '',
'workerId' => ''
]
]
]
],
'dynamicSourceSplit' => [
'primary' => [
'derivationMode' => '',
'source' => [
'baseSpecs' => [
[
]
],
'codec' => [
],
'doesNotNeedSplitting' => null,
'metadata' => [
'estimatedSizeBytes' => '',
'infinite' => null,
'producesSortedKeys' => null
],
'spec' => [
]
]
],
'residual' => [
]
],
'errors' => [
[
'code' => 0,
'details' => [
[
]
],
'message' => ''
]
],
'metricUpdates' => [
[
'cumulative' => null,
'distribution' => '',
'gauge' => '',
'internal' => '',
'kind' => '',
'meanCount' => '',
'meanSum' => '',
'name' => [
'context' => [
],
'name' => '',
'origin' => ''
],
'scalar' => '',
'set' => '',
'updateTime' => ''
]
],
'progress' => [
'percentComplete' => '',
'position' => [
'byteOffset' => '',
'concatPosition' => [
'index' => 0,
'position' => ''
],
'end' => null,
'key' => '',
'recordIndex' => '',
'shufflePosition' => ''
],
'remainingTime' => ''
],
'reportIndex' => '',
'reportedProgress' => [
'consumedParallelism' => [
'isInfinite' => null,
'value' => ''
],
'fractionConsumed' => '',
'position' => [
],
'remainingParallelism' => [
]
],
'requestedLeaseDuration' => '',
'sourceFork' => [
'primary' => [
'derivationMode' => '',
'source' => [
]
],
'primarySource' => [
],
'residual' => [
],
'residualSource' => [
]
],
'sourceOperationResponse' => [
'getMetadata' => [
'metadata' => [
]
],
'split' => [
'bundles' => [
[
]
],
'outcome' => '',
'shards' => [
[
]
]
]
],
'stopPosition' => [
],
'totalThrottlerWaitTimeSeconds' => '',
'workItemId' => ''
]
],
'workerId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus');
$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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus"
payload = {
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": False,
"counterUpdates": [
{
"boolean": False,
"cumulative": False,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": { "elements": [] },
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": { "elements": [{}] },
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": { "elements": [] },
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [{}],
"codec": {},
"doesNotNeedSplitting": False,
"metadata": {
"estimatedSizeBytes": "",
"infinite": False,
"producesSortedKeys": False
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [{}],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": False,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": False,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": False,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": { "metadata": {} },
"split": {
"bundles": [{}],
"outcome": "",
"shards": [{}]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus"
payload <- "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus")
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 \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\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/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus') do |req|
req.body = "{\n \"currentWorkerTime\": \"\",\n \"location\": \"\",\n \"unifiedWorkerRequest\": {},\n \"workItemStatuses\": [\n {\n \"completed\": false,\n \"counterUpdates\": [\n {\n \"boolean\": false,\n \"cumulative\": false,\n \"distribution\": {\n \"count\": {\n \"highBits\": 0,\n \"lowBits\": 0\n },\n \"histogram\": {\n \"bucketCounts\": [],\n \"firstBucketOffset\": 0\n },\n \"max\": {},\n \"min\": {},\n \"sum\": {},\n \"sumOfSquares\": \"\"\n },\n \"floatingPoint\": \"\",\n \"floatingPointList\": {\n \"elements\": []\n },\n \"floatingPointMean\": {\n \"count\": {},\n \"sum\": \"\"\n },\n \"integer\": {},\n \"integerGauge\": {\n \"timestamp\": \"\",\n \"value\": {}\n },\n \"integerList\": {\n \"elements\": [\n {}\n ]\n },\n \"integerMean\": {\n \"count\": {},\n \"sum\": {}\n },\n \"internal\": \"\",\n \"nameAndKind\": {\n \"kind\": \"\",\n \"name\": \"\"\n },\n \"shortId\": \"\",\n \"stringList\": {\n \"elements\": []\n },\n \"structuredNameAndMetadata\": {\n \"metadata\": {\n \"description\": \"\",\n \"kind\": \"\",\n \"otherUnits\": \"\",\n \"standardUnits\": \"\"\n },\n \"name\": {\n \"componentStepName\": \"\",\n \"executionStepName\": \"\",\n \"inputIndex\": 0,\n \"name\": \"\",\n \"origin\": \"\",\n \"originNamespace\": \"\",\n \"originalRequestingStepName\": \"\",\n \"originalStepName\": \"\",\n \"portion\": \"\",\n \"workerId\": \"\"\n }\n }\n }\n ],\n \"dynamicSourceSplit\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {\n \"baseSpecs\": [\n {}\n ],\n \"codec\": {},\n \"doesNotNeedSplitting\": false,\n \"metadata\": {\n \"estimatedSizeBytes\": \"\",\n \"infinite\": false,\n \"producesSortedKeys\": false\n },\n \"spec\": {}\n }\n },\n \"residual\": {}\n },\n \"errors\": [\n {\n \"code\": 0,\n \"details\": [\n {}\n ],\n \"message\": \"\"\n }\n ],\n \"metricUpdates\": [\n {\n \"cumulative\": false,\n \"distribution\": \"\",\n \"gauge\": \"\",\n \"internal\": \"\",\n \"kind\": \"\",\n \"meanCount\": \"\",\n \"meanSum\": \"\",\n \"name\": {\n \"context\": {},\n \"name\": \"\",\n \"origin\": \"\"\n },\n \"scalar\": \"\",\n \"set\": \"\",\n \"updateTime\": \"\"\n }\n ],\n \"progress\": {\n \"percentComplete\": \"\",\n \"position\": {\n \"byteOffset\": \"\",\n \"concatPosition\": {\n \"index\": 0,\n \"position\": \"\"\n },\n \"end\": false,\n \"key\": \"\",\n \"recordIndex\": \"\",\n \"shufflePosition\": \"\"\n },\n \"remainingTime\": \"\"\n },\n \"reportIndex\": \"\",\n \"reportedProgress\": {\n \"consumedParallelism\": {\n \"isInfinite\": false,\n \"value\": \"\"\n },\n \"fractionConsumed\": \"\",\n \"position\": {},\n \"remainingParallelism\": {}\n },\n \"requestedLeaseDuration\": \"\",\n \"sourceFork\": {\n \"primary\": {\n \"derivationMode\": \"\",\n \"source\": {}\n },\n \"primarySource\": {},\n \"residual\": {},\n \"residualSource\": {}\n },\n \"sourceOperationResponse\": {\n \"getMetadata\": {\n \"metadata\": {}\n },\n \"split\": {\n \"bundles\": [\n {}\n ],\n \"outcome\": \"\",\n \"shards\": [\n {}\n ]\n }\n },\n \"stopPosition\": {},\n \"totalThrottlerWaitTimeSeconds\": \"\",\n \"workItemId\": \"\"\n }\n ],\n \"workerId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus";
let payload = json!({
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": json!({}),
"workItemStatuses": (
json!({
"completed": false,
"counterUpdates": (
json!({
"boolean": false,
"cumulative": false,
"distribution": json!({
"count": json!({
"highBits": 0,
"lowBits": 0
}),
"histogram": json!({
"bucketCounts": (),
"firstBucketOffset": 0
}),
"max": json!({}),
"min": json!({}),
"sum": json!({}),
"sumOfSquares": ""
}),
"floatingPoint": "",
"floatingPointList": json!({"elements": ()}),
"floatingPointMean": json!({
"count": json!({}),
"sum": ""
}),
"integer": json!({}),
"integerGauge": json!({
"timestamp": "",
"value": json!({})
}),
"integerList": json!({"elements": (json!({}))}),
"integerMean": json!({
"count": json!({}),
"sum": json!({})
}),
"internal": "",
"nameAndKind": json!({
"kind": "",
"name": ""
}),
"shortId": "",
"stringList": json!({"elements": ()}),
"structuredNameAndMetadata": json!({
"metadata": json!({
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
}),
"name": json!({
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
})
})
})
),
"dynamicSourceSplit": json!({
"primary": json!({
"derivationMode": "",
"source": json!({
"baseSpecs": (json!({})),
"codec": json!({}),
"doesNotNeedSplitting": false,
"metadata": json!({
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
}),
"spec": json!({})
})
}),
"residual": json!({})
}),
"errors": (
json!({
"code": 0,
"details": (json!({})),
"message": ""
})
),
"metricUpdates": (
json!({
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": json!({
"context": json!({}),
"name": "",
"origin": ""
}),
"scalar": "",
"set": "",
"updateTime": ""
})
),
"progress": json!({
"percentComplete": "",
"position": json!({
"byteOffset": "",
"concatPosition": json!({
"index": 0,
"position": ""
}),
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
}),
"remainingTime": ""
}),
"reportIndex": "",
"reportedProgress": json!({
"consumedParallelism": json!({
"isInfinite": false,
"value": ""
}),
"fractionConsumed": "",
"position": json!({}),
"remainingParallelism": json!({})
}),
"requestedLeaseDuration": "",
"sourceFork": json!({
"primary": json!({
"derivationMode": "",
"source": json!({})
}),
"primarySource": json!({}),
"residual": json!({}),
"residualSource": json!({})
}),
"sourceOperationResponse": json!({
"getMetadata": json!({"metadata": json!({})}),
"split": json!({
"bundles": (json!({})),
"outcome": "",
"shards": (json!({}))
})
}),
"stopPosition": json!({}),
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
})
),
"workerId": ""
});
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}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus \
--header 'content-type: application/json' \
--data '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}'
echo '{
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": {},
"workItemStatuses": [
{
"completed": false,
"counterUpdates": [
{
"boolean": false,
"cumulative": false,
"distribution": {
"count": {
"highBits": 0,
"lowBits": 0
},
"histogram": {
"bucketCounts": [],
"firstBucketOffset": 0
},
"max": {},
"min": {},
"sum": {},
"sumOfSquares": ""
},
"floatingPoint": "",
"floatingPointList": {
"elements": []
},
"floatingPointMean": {
"count": {},
"sum": ""
},
"integer": {},
"integerGauge": {
"timestamp": "",
"value": {}
},
"integerList": {
"elements": [
{}
]
},
"integerMean": {
"count": {},
"sum": {}
},
"internal": "",
"nameAndKind": {
"kind": "",
"name": ""
},
"shortId": "",
"stringList": {
"elements": []
},
"structuredNameAndMetadata": {
"metadata": {
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
},
"name": {
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
}
}
}
],
"dynamicSourceSplit": {
"primary": {
"derivationMode": "",
"source": {
"baseSpecs": [
{}
],
"codec": {},
"doesNotNeedSplitting": false,
"metadata": {
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
},
"spec": {}
}
},
"residual": {}
},
"errors": [
{
"code": 0,
"details": [
{}
],
"message": ""
}
],
"metricUpdates": [
{
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": {
"context": {},
"name": "",
"origin": ""
},
"scalar": "",
"set": "",
"updateTime": ""
}
],
"progress": {
"percentComplete": "",
"position": {
"byteOffset": "",
"concatPosition": {
"index": 0,
"position": ""
},
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
},
"remainingTime": ""
},
"reportIndex": "",
"reportedProgress": {
"consumedParallelism": {
"isInfinite": false,
"value": ""
},
"fractionConsumed": "",
"position": {},
"remainingParallelism": {}
},
"requestedLeaseDuration": "",
"sourceFork": {
"primary": {
"derivationMode": "",
"source": {}
},
"primarySource": {},
"residual": {},
"residualSource": {}
},
"sourceOperationResponse": {
"getMetadata": {
"metadata": {}
},
"split": {
"bundles": [
{}
],
"outcome": "",
"shards": [
{}
]
}
},
"stopPosition": {},
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
}
],
"workerId": ""
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "currentWorkerTime": "",\n "location": "",\n "unifiedWorkerRequest": {},\n "workItemStatuses": [\n {\n "completed": false,\n "counterUpdates": [\n {\n "boolean": false,\n "cumulative": false,\n "distribution": {\n "count": {\n "highBits": 0,\n "lowBits": 0\n },\n "histogram": {\n "bucketCounts": [],\n "firstBucketOffset": 0\n },\n "max": {},\n "min": {},\n "sum": {},\n "sumOfSquares": ""\n },\n "floatingPoint": "",\n "floatingPointList": {\n "elements": []\n },\n "floatingPointMean": {\n "count": {},\n "sum": ""\n },\n "integer": {},\n "integerGauge": {\n "timestamp": "",\n "value": {}\n },\n "integerList": {\n "elements": [\n {}\n ]\n },\n "integerMean": {\n "count": {},\n "sum": {}\n },\n "internal": "",\n "nameAndKind": {\n "kind": "",\n "name": ""\n },\n "shortId": "",\n "stringList": {\n "elements": []\n },\n "structuredNameAndMetadata": {\n "metadata": {\n "description": "",\n "kind": "",\n "otherUnits": "",\n "standardUnits": ""\n },\n "name": {\n "componentStepName": "",\n "executionStepName": "",\n "inputIndex": 0,\n "name": "",\n "origin": "",\n "originNamespace": "",\n "originalRequestingStepName": "",\n "originalStepName": "",\n "portion": "",\n "workerId": ""\n }\n }\n }\n ],\n "dynamicSourceSplit": {\n "primary": {\n "derivationMode": "",\n "source": {\n "baseSpecs": [\n {}\n ],\n "codec": {},\n "doesNotNeedSplitting": false,\n "metadata": {\n "estimatedSizeBytes": "",\n "infinite": false,\n "producesSortedKeys": false\n },\n "spec": {}\n }\n },\n "residual": {}\n },\n "errors": [\n {\n "code": 0,\n "details": [\n {}\n ],\n "message": ""\n }\n ],\n "metricUpdates": [\n {\n "cumulative": false,\n "distribution": "",\n "gauge": "",\n "internal": "",\n "kind": "",\n "meanCount": "",\n "meanSum": "",\n "name": {\n "context": {},\n "name": "",\n "origin": ""\n },\n "scalar": "",\n "set": "",\n "updateTime": ""\n }\n ],\n "progress": {\n "percentComplete": "",\n "position": {\n "byteOffset": "",\n "concatPosition": {\n "index": 0,\n "position": ""\n },\n "end": false,\n "key": "",\n "recordIndex": "",\n "shufflePosition": ""\n },\n "remainingTime": ""\n },\n "reportIndex": "",\n "reportedProgress": {\n "consumedParallelism": {\n "isInfinite": false,\n "value": ""\n },\n "fractionConsumed": "",\n "position": {},\n "remainingParallelism": {}\n },\n "requestedLeaseDuration": "",\n "sourceFork": {\n "primary": {\n "derivationMode": "",\n "source": {}\n },\n "primarySource": {},\n "residual": {},\n "residualSource": {}\n },\n "sourceOperationResponse": {\n "getMetadata": {\n "metadata": {}\n },\n "split": {\n "bundles": [\n {}\n ],\n "outcome": "",\n "shards": [\n {}\n ]\n }\n },\n "stopPosition": {},\n "totalThrottlerWaitTimeSeconds": "",\n "workItemId": ""\n }\n ],\n "workerId": ""\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"currentWorkerTime": "",
"location": "",
"unifiedWorkerRequest": [],
"workItemStatuses": [
[
"completed": false,
"counterUpdates": [
[
"boolean": false,
"cumulative": false,
"distribution": [
"count": [
"highBits": 0,
"lowBits": 0
],
"histogram": [
"bucketCounts": [],
"firstBucketOffset": 0
],
"max": [],
"min": [],
"sum": [],
"sumOfSquares": ""
],
"floatingPoint": "",
"floatingPointList": ["elements": []],
"floatingPointMean": [
"count": [],
"sum": ""
],
"integer": [],
"integerGauge": [
"timestamp": "",
"value": []
],
"integerList": ["elements": [[]]],
"integerMean": [
"count": [],
"sum": []
],
"internal": "",
"nameAndKind": [
"kind": "",
"name": ""
],
"shortId": "",
"stringList": ["elements": []],
"structuredNameAndMetadata": [
"metadata": [
"description": "",
"kind": "",
"otherUnits": "",
"standardUnits": ""
],
"name": [
"componentStepName": "",
"executionStepName": "",
"inputIndex": 0,
"name": "",
"origin": "",
"originNamespace": "",
"originalRequestingStepName": "",
"originalStepName": "",
"portion": "",
"workerId": ""
]
]
]
],
"dynamicSourceSplit": [
"primary": [
"derivationMode": "",
"source": [
"baseSpecs": [[]],
"codec": [],
"doesNotNeedSplitting": false,
"metadata": [
"estimatedSizeBytes": "",
"infinite": false,
"producesSortedKeys": false
],
"spec": []
]
],
"residual": []
],
"errors": [
[
"code": 0,
"details": [[]],
"message": ""
]
],
"metricUpdates": [
[
"cumulative": false,
"distribution": "",
"gauge": "",
"internal": "",
"kind": "",
"meanCount": "",
"meanSum": "",
"name": [
"context": [],
"name": "",
"origin": ""
],
"scalar": "",
"set": "",
"updateTime": ""
]
],
"progress": [
"percentComplete": "",
"position": [
"byteOffset": "",
"concatPosition": [
"index": 0,
"position": ""
],
"end": false,
"key": "",
"recordIndex": "",
"shufflePosition": ""
],
"remainingTime": ""
],
"reportIndex": "",
"reportedProgress": [
"consumedParallelism": [
"isInfinite": false,
"value": ""
],
"fractionConsumed": "",
"position": [],
"remainingParallelism": []
],
"requestedLeaseDuration": "",
"sourceFork": [
"primary": [
"derivationMode": "",
"source": []
],
"primarySource": [],
"residual": [],
"residualSource": []
],
"sourceOperationResponse": [
"getMetadata": ["metadata": []],
"split": [
"bundles": [[]],
"outcome": "",
"shards": [[]]
]
],
"stopPosition": [],
"totalThrottlerWaitTimeSeconds": "",
"workItemId": ""
]
],
"workerId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/jobs/:jobId/workItems:reportStatus")! 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
dataflow.projects.locations.snapshots.delete
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId
QUERY PARAMS
projectId
location
snapshotId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"
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/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"))
.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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
.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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId';
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId',
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId';
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"]
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId",
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
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/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId";
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId
http DELETE {{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")! 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
dataflow.projects.locations.snapshots.get
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId
QUERY PARAMS
projectId
location
snapshotId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"
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/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"))
.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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
.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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId';
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId',
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId';
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"]
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId",
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")
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/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId";
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}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots/:snapshotId")! 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
dataflow.projects.locations.snapshots.list
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots
QUERY PARAMS
projectId
location
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots"
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}}/v1b3/projects/:projectId/locations/:location/snapshots"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots"
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/v1b3/projects/:projectId/locations/:location/snapshots HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots"))
.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}}/v1b3/projects/:projectId/locations/:location/snapshots")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots")
.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}}/v1b3/projects/:projectId/locations/:location/snapshots');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots';
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}}/v1b3/projects/:projectId/locations/:location/snapshots',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/snapshots',
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}}/v1b3/projects/:projectId/locations/:location/snapshots'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots');
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}}/v1b3/projects/:projectId/locations/:location/snapshots'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots';
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}}/v1b3/projects/:projectId/locations/:location/snapshots"]
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}}/v1b3/projects/:projectId/locations/:location/snapshots" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots",
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}}/v1b3/projects/:projectId/locations/:location/snapshots');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/snapshots")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots")
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/v1b3/projects/:projectId/locations/:location/snapshots') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots";
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}}/v1b3/projects/:projectId/locations/:location/snapshots
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/snapshots")! 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
dataflow.projects.locations.templates.create
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates
QUERY PARAMS
projectId
location
BODY json
{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates" {:content-type :json
:form-params {:environment {:additionalExperiments []
:additionalUserLabels {}
:bypassTempDirValidation false
:enableStreamingEngine false
:ipConfiguration ""
:kmsKeyName ""
:machineType ""
:maxWorkers 0
:network ""
:numWorkers 0
:serviceAccountEmail ""
:subnetwork ""
:tempLocation ""
:workerRegion ""
:workerZone ""
:zone ""}
:gcsPath ""
:jobName ""
:location ""
:parameters {}}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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}}/v1b3/projects/:projectId/locations/:location/templates"),
Content = new StringContent("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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}}/v1b3/projects/:projectId/locations/:location/templates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates"
payload := strings.NewReader("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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/v1b3/projects/:projectId/locations/:location/templates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 508
{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates")
.setHeader("content-type", "application/json")
.setBody("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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 \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates")
.header("content-type", "application/json")
.body("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}")
.asString();
const data = JSON.stringify({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates',
headers: {'content-type': 'application/json'},
data: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"environment":{"additionalExperiments":[],"additionalUserLabels":{},"bypassTempDirValidation":false,"enableStreamingEngine":false,"ipConfiguration":"","kmsKeyName":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"serviceAccountEmail":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"gcsPath":"","jobName":"","location":"","parameters":{}}'
};
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}}/v1b3/projects/:projectId/locations/:location/templates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "environment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "bypassTempDirValidation": false,\n "enableStreamingEngine": false,\n "ipConfiguration": "",\n "kmsKeyName": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "serviceAccountEmail": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "gcsPath": "",\n "jobName": "",\n "location": "",\n "parameters": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/templates',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates',
headers: {'content-type': 'application/json'},
body: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
},
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}}/v1b3/projects/:projectId/locations/:location/templates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
});
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}}/v1b3/projects/:projectId/locations/:location/templates',
headers: {'content-type': 'application/json'},
data: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"environment":{"additionalExperiments":[],"additionalUserLabels":{},"bypassTempDirValidation":false,"enableStreamingEngine":false,"ipConfiguration":"","kmsKeyName":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"serviceAccountEmail":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"gcsPath":"","jobName":"","location":"","parameters":{}}'
};
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 = @{ @"environment": @{ @"additionalExperiments": @[ ], @"additionalUserLabels": @{ }, @"bypassTempDirValidation": @NO, @"enableStreamingEngine": @NO, @"ipConfiguration": @"", @"kmsKeyName": @"", @"machineType": @"", @"maxWorkers": @0, @"network": @"", @"numWorkers": @0, @"serviceAccountEmail": @"", @"subnetwork": @"", @"tempLocation": @"", @"workerRegion": @"", @"workerZone": @"", @"zone": @"" },
@"gcsPath": @"",
@"jobName": @"",
@"location": @"",
@"parameters": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'gcsPath' => '',
'jobName' => '',
'location' => '',
'parameters' => [
]
]),
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}}/v1b3/projects/:projectId/locations/:location/templates', [
'body' => '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'gcsPath' => '',
'jobName' => '',
'location' => '',
'parameters' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'gcsPath' => '',
'jobName' => '',
'location' => '',
'parameters' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/templates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates"
payload = {
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": False,
"enableStreamingEngine": False,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates"
payload <- "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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}}/v1b3/projects/:projectId/locations/:location/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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/v1b3/projects/:projectId/locations/:location/templates') do |req|
req.body = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates";
let payload = json!({
"environment": json!({
"additionalExperiments": (),
"additionalUserLabels": json!({}),
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
}),
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates \
--header 'content-type: application/json' \
--data '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}'
echo '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "environment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "bypassTempDirValidation": false,\n "enableStreamingEngine": false,\n "ipConfiguration": "",\n "kmsKeyName": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "serviceAccountEmail": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "gcsPath": "",\n "jobName": "",\n "location": "",\n "parameters": {}\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"environment": [
"additionalExperiments": [],
"additionalUserLabels": [],
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
],
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dataflow.projects.locations.templates.get
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get
QUERY PARAMS
projectId
location
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get"
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}}/v1b3/projects/:projectId/locations/:location/templates:get"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get"
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/v1b3/projects/:projectId/locations/:location/templates:get HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get"))
.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}}/v1b3/projects/:projectId/locations/:location/templates:get")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get")
.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}}/v1b3/projects/:projectId/locations/:location/templates:get');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get';
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}}/v1b3/projects/:projectId/locations/:location/templates:get',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/locations/:location/templates:get',
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}}/v1b3/projects/:projectId/locations/:location/templates:get'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get');
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}}/v1b3/projects/:projectId/locations/:location/templates:get'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get';
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}}/v1b3/projects/:projectId/locations/:location/templates:get"]
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}}/v1b3/projects/:projectId/locations/:location/templates:get" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get",
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}}/v1b3/projects/:projectId/locations/:location/templates:get');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/locations/:location/templates:get")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get")
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/v1b3/projects/:projectId/locations/:location/templates:get') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get";
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}}/v1b3/projects/:projectId/locations/:location/templates:get
http GET {{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:get")! 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
dataflow.projects.locations.templates.launch
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch
QUERY PARAMS
projectId
location
BODY json
{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch");
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 \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch" {:content-type :json
:form-params {:environment {:additionalExperiments []
:additionalUserLabels {}
:bypassTempDirValidation false
:enableStreamingEngine false
:ipConfiguration ""
:kmsKeyName ""
:machineType ""
:maxWorkers 0
:network ""
:numWorkers 0
:serviceAccountEmail ""
:subnetwork ""
:tempLocation ""
:workerRegion ""
:workerZone ""
:zone ""}
:jobName ""
:parameters {}
:transformNameMapping {}
:update false}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch"),
Content = new StringContent("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch"
payload := strings.NewReader("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1b3/projects/:projectId/locations/:location/templates:launch HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 522
{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch")
.setHeader("content-type", "application/json")
.setBody("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch")
.header("content-type", "application/json")
.body("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
.asString();
const data = JSON.stringify({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch',
headers: {'content-type': 'application/json'},
data: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"environment":{"additionalExperiments":[],"additionalUserLabels":{},"bypassTempDirValidation":false,"enableStreamingEngine":false,"ipConfiguration":"","kmsKeyName":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"serviceAccountEmail":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"jobName":"","parameters":{},"transformNameMapping":{},"update":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "environment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "bypassTempDirValidation": false,\n "enableStreamingEngine": false,\n "ipConfiguration": "",\n "kmsKeyName": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "serviceAccountEmail": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "jobName": "",\n "parameters": {},\n "transformNameMapping": {},\n "update": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch")
.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/v1b3/projects/:projectId/locations/:location/templates:launch',
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({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch',
headers: {'content-type': 'application/json'},
body: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch',
headers: {'content-type': 'application/json'},
data: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"environment":{"additionalExperiments":[],"additionalUserLabels":{},"bypassTempDirValidation":false,"enableStreamingEngine":false,"ipConfiguration":"","kmsKeyName":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"serviceAccountEmail":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"jobName":"","parameters":{},"transformNameMapping":{},"update":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"environment": @{ @"additionalExperiments": @[ ], @"additionalUserLabels": @{ }, @"bypassTempDirValidation": @NO, @"enableStreamingEngine": @NO, @"ipConfiguration": @"", @"kmsKeyName": @"", @"machineType": @"", @"maxWorkers": @0, @"network": @"", @"numWorkers": @0, @"serviceAccountEmail": @"", @"subnetwork": @"", @"tempLocation": @"", @"workerRegion": @"", @"workerZone": @"", @"zone": @"" },
@"jobName": @"",
@"parameters": @{ },
@"transformNameMapping": @{ },
@"update": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch"]
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}}/v1b3/projects/:projectId/locations/:location/templates:launch" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch",
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([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'jobName' => '',
'parameters' => [
],
'transformNameMapping' => [
],
'update' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch', [
'body' => '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'jobName' => '',
'parameters' => [
],
'transformNameMapping' => [
],
'update' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'jobName' => '',
'parameters' => [
],
'transformNameMapping' => [
],
'update' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch');
$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}}/v1b3/projects/:projectId/locations/:location/templates:launch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/templates:launch", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch"
payload = {
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": False,
"enableStreamingEngine": False,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch"
payload <- "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch")
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 \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1b3/projects/:projectId/locations/:location/templates:launch') do |req|
req.body = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch";
let payload = json!({
"environment": json!({
"additionalExperiments": (),
"additionalUserLabels": json!({}),
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
}),
"jobName": "",
"parameters": json!({}),
"transformNameMapping": json!({}),
"update": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch \
--header 'content-type: application/json' \
--data '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}'
echo '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "environment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "bypassTempDirValidation": false,\n "enableStreamingEngine": false,\n "ipConfiguration": "",\n "kmsKeyName": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "serviceAccountEmail": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "jobName": "",\n "parameters": {},\n "transformNameMapping": {},\n "update": false\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"environment": [
"additionalExperiments": [],
"additionalUserLabels": [],
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
],
"jobName": "",
"parameters": [],
"transformNameMapping": [],
"update": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/templates:launch")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.locations.workerMessages
{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages
QUERY PARAMS
projectId
location
BODY json
{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages");
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 \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages" {:content-type :json
:form-params {:location ""
:workerMessages [{:labels {}
:time ""
:workerHealthReport {:msg ""
:pods [{}]
:reportInterval ""
:vmBrokenCode ""
:vmIsBroken false
:vmIsHealthy false
:vmStartupTime ""}
:workerLifecycleEvent {:containerStartTime ""
:event ""
:metadata {}}
:workerMessageCode {:code ""
:parameters {}}
:workerMetrics {:containers {}
:cpuTime [{:rate ""
:timestamp ""
:totalMs ""}]
:memoryInfo [{:currentLimitBytes ""
:currentOoms ""
:currentRssBytes ""
:timestamp ""
:totalGbMs ""}]}
:workerShutdownNotice {:reason ""}
:workerThreadScalingReport {:currentThreadCount 0}}]}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages"),
Content = new StringContent("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages"
payload := strings.NewReader("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1b3/projects/:projectId/locations/:location/WorkerMessages HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1096
{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
.asString();
const data = JSON.stringify({
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [
{}
],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {
containerStartTime: '',
event: '',
metadata: {}
},
workerMessageCode: {
code: '',
parameters: {}
},
workerMetrics: {
containers: {},
cpuTime: [
{
rate: '',
timestamp: '',
totalMs: ''
}
],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {
reason: ''
},
workerThreadScalingReport: {
currentThreadCount: 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}}/v1b3/projects/:projectId/locations/:location/WorkerMessages');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages',
headers: {'content-type': 'application/json'},
data: {
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [{}],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {containerStartTime: '', event: '', metadata: {}},
workerMessageCode: {code: '', parameters: {}},
workerMetrics: {
containers: {},
cpuTime: [{rate: '', timestamp: '', totalMs: ''}],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {reason: ''},
workerThreadScalingReport: {currentThreadCount: 0}
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"location":"","workerMessages":[{"labels":{},"time":"","workerHealthReport":{"msg":"","pods":[{}],"reportInterval":"","vmBrokenCode":"","vmIsBroken":false,"vmIsHealthy":false,"vmStartupTime":""},"workerLifecycleEvent":{"containerStartTime":"","event":"","metadata":{}},"workerMessageCode":{"code":"","parameters":{}},"workerMetrics":{"containers":{},"cpuTime":[{"rate":"","timestamp":"","totalMs":""}],"memoryInfo":[{"currentLimitBytes":"","currentOoms":"","currentRssBytes":"","timestamp":"","totalGbMs":""}]},"workerShutdownNotice":{"reason":""},"workerThreadScalingReport":{"currentThreadCount":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}}/v1b3/projects/:projectId/locations/:location/WorkerMessages',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "workerMessages": [\n {\n "labels": {},\n "time": "",\n "workerHealthReport": {\n "msg": "",\n "pods": [\n {}\n ],\n "reportInterval": "",\n "vmBrokenCode": "",\n "vmIsBroken": false,\n "vmIsHealthy": false,\n "vmStartupTime": ""\n },\n "workerLifecycleEvent": {\n "containerStartTime": "",\n "event": "",\n "metadata": {}\n },\n "workerMessageCode": {\n "code": "",\n "parameters": {}\n },\n "workerMetrics": {\n "containers": {},\n "cpuTime": [\n {\n "rate": "",\n "timestamp": "",\n "totalMs": ""\n }\n ],\n "memoryInfo": [\n {\n "currentLimitBytes": "",\n "currentOoms": "",\n "currentRssBytes": "",\n "timestamp": "",\n "totalGbMs": ""\n }\n ]\n },\n "workerShutdownNotice": {\n "reason": ""\n },\n "workerThreadScalingReport": {\n "currentThreadCount": 0\n }\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages")
.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/v1b3/projects/:projectId/locations/:location/WorkerMessages',
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({
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [{}],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {containerStartTime: '', event: '', metadata: {}},
workerMessageCode: {code: '', parameters: {}},
workerMetrics: {
containers: {},
cpuTime: [{rate: '', timestamp: '', totalMs: ''}],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {reason: ''},
workerThreadScalingReport: {currentThreadCount: 0}
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages',
headers: {'content-type': 'application/json'},
body: {
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [{}],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {containerStartTime: '', event: '', metadata: {}},
workerMessageCode: {code: '', parameters: {}},
workerMetrics: {
containers: {},
cpuTime: [{rate: '', timestamp: '', totalMs: ''}],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {reason: ''},
workerThreadScalingReport: {currentThreadCount: 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}}/v1b3/projects/:projectId/locations/:location/WorkerMessages');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [
{}
],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {
containerStartTime: '',
event: '',
metadata: {}
},
workerMessageCode: {
code: '',
parameters: {}
},
workerMetrics: {
containers: {},
cpuTime: [
{
rate: '',
timestamp: '',
totalMs: ''
}
],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {
reason: ''
},
workerThreadScalingReport: {
currentThreadCount: 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}}/v1b3/projects/:projectId/locations/:location/WorkerMessages',
headers: {'content-type': 'application/json'},
data: {
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [{}],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {containerStartTime: '', event: '', metadata: {}},
workerMessageCode: {code: '', parameters: {}},
workerMetrics: {
containers: {},
cpuTime: [{rate: '', timestamp: '', totalMs: ''}],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {reason: ''},
workerThreadScalingReport: {currentThreadCount: 0}
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"location":"","workerMessages":[{"labels":{},"time":"","workerHealthReport":{"msg":"","pods":[{}],"reportInterval":"","vmBrokenCode":"","vmIsBroken":false,"vmIsHealthy":false,"vmStartupTime":""},"workerLifecycleEvent":{"containerStartTime":"","event":"","metadata":{}},"workerMessageCode":{"code":"","parameters":{}},"workerMetrics":{"containers":{},"cpuTime":[{"rate":"","timestamp":"","totalMs":""}],"memoryInfo":[{"currentLimitBytes":"","currentOoms":"","currentRssBytes":"","timestamp":"","totalGbMs":""}]},"workerShutdownNotice":{"reason":""},"workerThreadScalingReport":{"currentThreadCount":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 = @{ @"location": @"",
@"workerMessages": @[ @{ @"labels": @{ }, @"time": @"", @"workerHealthReport": @{ @"msg": @"", @"pods": @[ @{ } ], @"reportInterval": @"", @"vmBrokenCode": @"", @"vmIsBroken": @NO, @"vmIsHealthy": @NO, @"vmStartupTime": @"" }, @"workerLifecycleEvent": @{ @"containerStartTime": @"", @"event": @"", @"metadata": @{ } }, @"workerMessageCode": @{ @"code": @"", @"parameters": @{ } }, @"workerMetrics": @{ @"containers": @{ }, @"cpuTime": @[ @{ @"rate": @"", @"timestamp": @"", @"totalMs": @"" } ], @"memoryInfo": @[ @{ @"currentLimitBytes": @"", @"currentOoms": @"", @"currentRssBytes": @"", @"timestamp": @"", @"totalGbMs": @"" } ] }, @"workerShutdownNotice": @{ @"reason": @"" }, @"workerThreadScalingReport": @{ @"currentThreadCount": @0 } } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages"]
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}}/v1b3/projects/:projectId/locations/:location/WorkerMessages" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages",
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([
'location' => '',
'workerMessages' => [
[
'labels' => [
],
'time' => '',
'workerHealthReport' => [
'msg' => '',
'pods' => [
[
]
],
'reportInterval' => '',
'vmBrokenCode' => '',
'vmIsBroken' => null,
'vmIsHealthy' => null,
'vmStartupTime' => ''
],
'workerLifecycleEvent' => [
'containerStartTime' => '',
'event' => '',
'metadata' => [
]
],
'workerMessageCode' => [
'code' => '',
'parameters' => [
]
],
'workerMetrics' => [
'containers' => [
],
'cpuTime' => [
[
'rate' => '',
'timestamp' => '',
'totalMs' => ''
]
],
'memoryInfo' => [
[
'currentLimitBytes' => '',
'currentOoms' => '',
'currentRssBytes' => '',
'timestamp' => '',
'totalGbMs' => ''
]
]
],
'workerShutdownNotice' => [
'reason' => ''
],
'workerThreadScalingReport' => [
'currentThreadCount' => 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}}/v1b3/projects/:projectId/locations/:location/WorkerMessages', [
'body' => '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'workerMessages' => [
[
'labels' => [
],
'time' => '',
'workerHealthReport' => [
'msg' => '',
'pods' => [
[
]
],
'reportInterval' => '',
'vmBrokenCode' => '',
'vmIsBroken' => null,
'vmIsHealthy' => null,
'vmStartupTime' => ''
],
'workerLifecycleEvent' => [
'containerStartTime' => '',
'event' => '',
'metadata' => [
]
],
'workerMessageCode' => [
'code' => '',
'parameters' => [
]
],
'workerMetrics' => [
'containers' => [
],
'cpuTime' => [
[
'rate' => '',
'timestamp' => '',
'totalMs' => ''
]
],
'memoryInfo' => [
[
'currentLimitBytes' => '',
'currentOoms' => '',
'currentRssBytes' => '',
'timestamp' => '',
'totalGbMs' => ''
]
]
],
'workerShutdownNotice' => [
'reason' => ''
],
'workerThreadScalingReport' => [
'currentThreadCount' => 0
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'workerMessages' => [
[
'labels' => [
],
'time' => '',
'workerHealthReport' => [
'msg' => '',
'pods' => [
[
]
],
'reportInterval' => '',
'vmBrokenCode' => '',
'vmIsBroken' => null,
'vmIsHealthy' => null,
'vmStartupTime' => ''
],
'workerLifecycleEvent' => [
'containerStartTime' => '',
'event' => '',
'metadata' => [
]
],
'workerMessageCode' => [
'code' => '',
'parameters' => [
]
],
'workerMetrics' => [
'containers' => [
],
'cpuTime' => [
[
'rate' => '',
'timestamp' => '',
'totalMs' => ''
]
],
'memoryInfo' => [
[
'currentLimitBytes' => '',
'currentOoms' => '',
'currentRssBytes' => '',
'timestamp' => '',
'totalGbMs' => ''
]
]
],
'workerShutdownNotice' => [
'reason' => ''
],
'workerThreadScalingReport' => [
'currentThreadCount' => 0
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages');
$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}}/v1b3/projects/:projectId/locations/:location/WorkerMessages' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/locations/:location/WorkerMessages", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages"
payload = {
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [{}],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": False,
"vmIsHealthy": False,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": { "reason": "" },
"workerThreadScalingReport": { "currentThreadCount": 0 }
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages"
payload <- "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages")
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 \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1b3/projects/:projectId/locations/:location/WorkerMessages') do |req|
req.body = "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages";
let payload = json!({
"location": "",
"workerMessages": (
json!({
"labels": json!({}),
"time": "",
"workerHealthReport": json!({
"msg": "",
"pods": (json!({})),
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
}),
"workerLifecycleEvent": json!({
"containerStartTime": "",
"event": "",
"metadata": json!({})
}),
"workerMessageCode": json!({
"code": "",
"parameters": json!({})
}),
"workerMetrics": json!({
"containers": json!({}),
"cpuTime": (
json!({
"rate": "",
"timestamp": "",
"totalMs": ""
})
),
"memoryInfo": (
json!({
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
})
)
}),
"workerShutdownNotice": json!({"reason": ""}),
"workerThreadScalingReport": json!({"currentThreadCount": 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}}/v1b3/projects/:projectId/locations/:location/WorkerMessages \
--header 'content-type: application/json' \
--data '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}'
echo '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "workerMessages": [\n {\n "labels": {},\n "time": "",\n "workerHealthReport": {\n "msg": "",\n "pods": [\n {}\n ],\n "reportInterval": "",\n "vmBrokenCode": "",\n "vmIsBroken": false,\n "vmIsHealthy": false,\n "vmStartupTime": ""\n },\n "workerLifecycleEvent": {\n "containerStartTime": "",\n "event": "",\n "metadata": {}\n },\n "workerMessageCode": {\n "code": "",\n "parameters": {}\n },\n "workerMetrics": {\n "containers": {},\n "cpuTime": [\n {\n "rate": "",\n "timestamp": "",\n "totalMs": ""\n }\n ],\n "memoryInfo": [\n {\n "currentLimitBytes": "",\n "currentOoms": "",\n "currentRssBytes": "",\n "timestamp": "",\n "totalGbMs": ""\n }\n ]\n },\n "workerShutdownNotice": {\n "reason": ""\n },\n "workerThreadScalingReport": {\n "currentThreadCount": 0\n }\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"location": "",
"workerMessages": [
[
"labels": [],
"time": "",
"workerHealthReport": [
"msg": "",
"pods": [[]],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
],
"workerLifecycleEvent": [
"containerStartTime": "",
"event": "",
"metadata": []
],
"workerMessageCode": [
"code": "",
"parameters": []
],
"workerMetrics": [
"containers": [],
"cpuTime": [
[
"rate": "",
"timestamp": "",
"totalMs": ""
]
],
"memoryInfo": [
[
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
]
]
],
"workerShutdownNotice": ["reason": ""],
"workerThreadScalingReport": ["currentThreadCount": 0]
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/locations/:location/WorkerMessages")! 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
dataflow.projects.snapshots.get
{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId
QUERY PARAMS
projectId
snapshotId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId"
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}}/v1b3/projects/:projectId/snapshots/:snapshotId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId"
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/v1b3/projects/:projectId/snapshots/:snapshotId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId"))
.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}}/v1b3/projects/:projectId/snapshots/:snapshotId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId")
.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}}/v1b3/projects/:projectId/snapshots/:snapshotId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId';
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}}/v1b3/projects/:projectId/snapshots/:snapshotId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/snapshots/:snapshotId',
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}}/v1b3/projects/:projectId/snapshots/:snapshotId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId');
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}}/v1b3/projects/:projectId/snapshots/:snapshotId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId';
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}}/v1b3/projects/:projectId/snapshots/:snapshotId"]
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}}/v1b3/projects/:projectId/snapshots/:snapshotId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId",
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}}/v1b3/projects/:projectId/snapshots/:snapshotId');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/snapshots/:snapshotId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId")
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/v1b3/projects/:projectId/snapshots/:snapshotId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId";
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}}/v1b3/projects/:projectId/snapshots/:snapshotId
http GET {{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/snapshots/:snapshotId")! 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
dataflow.projects.snapshots.list
{{baseUrl}}/v1b3/projects/:projectId/snapshots
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/snapshots");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/snapshots")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots"
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}}/v1b3/projects/:projectId/snapshots"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/snapshots");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/snapshots"
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/v1b3/projects/:projectId/snapshots HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/snapshots")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/snapshots"))
.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}}/v1b3/projects/:projectId/snapshots")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/snapshots")
.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}}/v1b3/projects/:projectId/snapshots');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/snapshots'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/snapshots';
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}}/v1b3/projects/:projectId/snapshots',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/snapshots")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/snapshots',
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}}/v1b3/projects/:projectId/snapshots'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/snapshots');
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}}/v1b3/projects/:projectId/snapshots'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/snapshots';
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}}/v1b3/projects/:projectId/snapshots"]
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}}/v1b3/projects/:projectId/snapshots" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/snapshots",
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}}/v1b3/projects/:projectId/snapshots');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/snapshots');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/snapshots');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/snapshots' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/snapshots' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/snapshots")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/snapshots"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/snapshots")
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/v1b3/projects/:projectId/snapshots') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/snapshots";
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}}/v1b3/projects/:projectId/snapshots
http GET {{baseUrl}}/v1b3/projects/:projectId/snapshots
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/snapshots
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/snapshots")! 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
dataflow.projects.templates.create
{{baseUrl}}/v1b3/projects/:projectId/templates
QUERY PARAMS
projectId
BODY json
{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/templates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/templates" {:content-type :json
:form-params {:environment {:additionalExperiments []
:additionalUserLabels {}
:bypassTempDirValidation false
:enableStreamingEngine false
:ipConfiguration ""
:kmsKeyName ""
:machineType ""
:maxWorkers 0
:network ""
:numWorkers 0
:serviceAccountEmail ""
:subnetwork ""
:tempLocation ""
:workerRegion ""
:workerZone ""
:zone ""}
:gcsPath ""
:jobName ""
:location ""
:parameters {}}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/templates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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}}/v1b3/projects/:projectId/templates"),
Content = new StringContent("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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}}/v1b3/projects/:projectId/templates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/templates"
payload := strings.NewReader("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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/v1b3/projects/:projectId/templates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 508
{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/templates")
.setHeader("content-type", "application/json")
.setBody("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/templates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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 \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/templates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/templates")
.header("content-type", "application/json")
.body("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}")
.asString();
const data = JSON.stringify({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/templates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/templates',
headers: {'content-type': 'application/json'},
data: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/templates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"environment":{"additionalExperiments":[],"additionalUserLabels":{},"bypassTempDirValidation":false,"enableStreamingEngine":false,"ipConfiguration":"","kmsKeyName":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"serviceAccountEmail":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"gcsPath":"","jobName":"","location":"","parameters":{}}'
};
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}}/v1b3/projects/:projectId/templates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "environment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "bypassTempDirValidation": false,\n "enableStreamingEngine": false,\n "ipConfiguration": "",\n "kmsKeyName": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "serviceAccountEmail": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "gcsPath": "",\n "jobName": "",\n "location": "",\n "parameters": {}\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/templates")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/templates',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/templates',
headers: {'content-type': 'application/json'},
body: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
},
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}}/v1b3/projects/:projectId/templates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
});
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}}/v1b3/projects/:projectId/templates',
headers: {'content-type': 'application/json'},
data: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
gcsPath: '',
jobName: '',
location: '',
parameters: {}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/templates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"environment":{"additionalExperiments":[],"additionalUserLabels":{},"bypassTempDirValidation":false,"enableStreamingEngine":false,"ipConfiguration":"","kmsKeyName":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"serviceAccountEmail":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"gcsPath":"","jobName":"","location":"","parameters":{}}'
};
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 = @{ @"environment": @{ @"additionalExperiments": @[ ], @"additionalUserLabels": @{ }, @"bypassTempDirValidation": @NO, @"enableStreamingEngine": @NO, @"ipConfiguration": @"", @"kmsKeyName": @"", @"machineType": @"", @"maxWorkers": @0, @"network": @"", @"numWorkers": @0, @"serviceAccountEmail": @"", @"subnetwork": @"", @"tempLocation": @"", @"workerRegion": @"", @"workerZone": @"", @"zone": @"" },
@"gcsPath": @"",
@"jobName": @"",
@"location": @"",
@"parameters": @{ } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/templates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1b3/projects/:projectId/templates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'gcsPath' => '',
'jobName' => '',
'location' => '',
'parameters' => [
]
]),
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}}/v1b3/projects/:projectId/templates', [
'body' => '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/templates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'gcsPath' => '',
'jobName' => '',
'location' => '',
'parameters' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'gcsPath' => '',
'jobName' => '',
'location' => '',
'parameters' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/templates');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/templates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/templates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/templates"
payload = {
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": False,
"enableStreamingEngine": False,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/templates"
payload <- "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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}}/v1b3/projects/:projectId/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\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/v1b3/projects/:projectId/templates') do |req|
req.body = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"gcsPath\": \"\",\n \"jobName\": \"\",\n \"location\": \"\",\n \"parameters\": {}\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/templates";
let payload = json!({
"environment": json!({
"additionalExperiments": (),
"additionalUserLabels": json!({}),
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
}),
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": json!({})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1b3/projects/:projectId/templates \
--header 'content-type: application/json' \
--data '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}'
echo '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": {}
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/templates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "environment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "bypassTempDirValidation": false,\n "enableStreamingEngine": false,\n "ipConfiguration": "",\n "kmsKeyName": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "serviceAccountEmail": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "gcsPath": "",\n "jobName": "",\n "location": "",\n "parameters": {}\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/templates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"environment": [
"additionalExperiments": [],
"additionalUserLabels": [],
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
],
"gcsPath": "",
"jobName": "",
"location": "",
"parameters": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/templates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
dataflow.projects.templates.get
{{baseUrl}}/v1b3/projects/:projectId/templates:get
QUERY PARAMS
projectId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/templates:get");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1b3/projects/:projectId/templates:get")
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/templates:get"
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}}/v1b3/projects/:projectId/templates:get"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/templates:get");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/templates:get"
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/v1b3/projects/:projectId/templates:get HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1b3/projects/:projectId/templates:get")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/templates:get"))
.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}}/v1b3/projects/:projectId/templates:get")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1b3/projects/:projectId/templates:get")
.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}}/v1b3/projects/:projectId/templates:get');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v1b3/projects/:projectId/templates:get'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/templates:get';
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}}/v1b3/projects/:projectId/templates:get',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/templates:get")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1b3/projects/:projectId/templates:get',
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}}/v1b3/projects/:projectId/templates:get'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1b3/projects/:projectId/templates:get');
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}}/v1b3/projects/:projectId/templates:get'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/templates:get';
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}}/v1b3/projects/:projectId/templates:get"]
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}}/v1b3/projects/:projectId/templates:get" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/templates:get",
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}}/v1b3/projects/:projectId/templates:get');
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/templates:get');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/templates:get');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1b3/projects/:projectId/templates:get' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/templates:get' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1b3/projects/:projectId/templates:get")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/templates:get"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/templates:get"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/templates:get")
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/v1b3/projects/:projectId/templates:get') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/templates:get";
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}}/v1b3/projects/:projectId/templates:get
http GET {{baseUrl}}/v1b3/projects/:projectId/templates:get
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/templates:get
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/templates:get")! 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
dataflow.projects.templates.launch
{{baseUrl}}/v1b3/projects/:projectId/templates:launch
QUERY PARAMS
projectId
BODY json
{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/templates:launch");
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 \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/templates:launch" {:content-type :json
:form-params {:environment {:additionalExperiments []
:additionalUserLabels {}
:bypassTempDirValidation false
:enableStreamingEngine false
:ipConfiguration ""
:kmsKeyName ""
:machineType ""
:maxWorkers 0
:network ""
:numWorkers 0
:serviceAccountEmail ""
:subnetwork ""
:tempLocation ""
:workerRegion ""
:workerZone ""
:zone ""}
:jobName ""
:parameters {}
:transformNameMapping {}
:update false}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/templates:launch"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/templates:launch"),
Content = new StringContent("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/templates:launch");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/templates:launch"
payload := strings.NewReader("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1b3/projects/:projectId/templates:launch HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 522
{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/templates:launch")
.setHeader("content-type", "application/json")
.setBody("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/templates:launch"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/templates:launch")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/templates:launch")
.header("content-type", "application/json")
.body("{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
.asString();
const data = JSON.stringify({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1b3/projects/:projectId/templates:launch');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/templates:launch',
headers: {'content-type': 'application/json'},
data: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/templates:launch';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"environment":{"additionalExperiments":[],"additionalUserLabels":{},"bypassTempDirValidation":false,"enableStreamingEngine":false,"ipConfiguration":"","kmsKeyName":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"serviceAccountEmail":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"jobName":"","parameters":{},"transformNameMapping":{},"update":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1b3/projects/:projectId/templates:launch',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "environment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "bypassTempDirValidation": false,\n "enableStreamingEngine": false,\n "ipConfiguration": "",\n "kmsKeyName": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "serviceAccountEmail": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "jobName": "",\n "parameters": {},\n "transformNameMapping": {},\n "update": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/templates:launch")
.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/v1b3/projects/:projectId/templates:launch',
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({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/templates:launch',
headers: {'content-type': 'application/json'},
body: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1b3/projects/:projectId/templates:launch');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/templates:launch',
headers: {'content-type': 'application/json'},
data: {
environment: {
additionalExperiments: [],
additionalUserLabels: {},
bypassTempDirValidation: false,
enableStreamingEngine: false,
ipConfiguration: '',
kmsKeyName: '',
machineType: '',
maxWorkers: 0,
network: '',
numWorkers: 0,
serviceAccountEmail: '',
subnetwork: '',
tempLocation: '',
workerRegion: '',
workerZone: '',
zone: ''
},
jobName: '',
parameters: {},
transformNameMapping: {},
update: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/templates:launch';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"environment":{"additionalExperiments":[],"additionalUserLabels":{},"bypassTempDirValidation":false,"enableStreamingEngine":false,"ipConfiguration":"","kmsKeyName":"","machineType":"","maxWorkers":0,"network":"","numWorkers":0,"serviceAccountEmail":"","subnetwork":"","tempLocation":"","workerRegion":"","workerZone":"","zone":""},"jobName":"","parameters":{},"transformNameMapping":{},"update":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"environment": @{ @"additionalExperiments": @[ ], @"additionalUserLabels": @{ }, @"bypassTempDirValidation": @NO, @"enableStreamingEngine": @NO, @"ipConfiguration": @"", @"kmsKeyName": @"", @"machineType": @"", @"maxWorkers": @0, @"network": @"", @"numWorkers": @0, @"serviceAccountEmail": @"", @"subnetwork": @"", @"tempLocation": @"", @"workerRegion": @"", @"workerZone": @"", @"zone": @"" },
@"jobName": @"",
@"parameters": @{ },
@"transformNameMapping": @{ },
@"update": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/templates:launch"]
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}}/v1b3/projects/:projectId/templates:launch" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/templates:launch",
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([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'jobName' => '',
'parameters' => [
],
'transformNameMapping' => [
],
'update' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1b3/projects/:projectId/templates:launch', [
'body' => '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/templates:launch');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'jobName' => '',
'parameters' => [
],
'transformNameMapping' => [
],
'update' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'environment' => [
'additionalExperiments' => [
],
'additionalUserLabels' => [
],
'bypassTempDirValidation' => null,
'enableStreamingEngine' => null,
'ipConfiguration' => '',
'kmsKeyName' => '',
'machineType' => '',
'maxWorkers' => 0,
'network' => '',
'numWorkers' => 0,
'serviceAccountEmail' => '',
'subnetwork' => '',
'tempLocation' => '',
'workerRegion' => '',
'workerZone' => '',
'zone' => ''
],
'jobName' => '',
'parameters' => [
],
'transformNameMapping' => [
],
'update' => null
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/templates:launch');
$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}}/v1b3/projects/:projectId/templates:launch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/templates:launch' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/templates:launch", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/templates:launch"
payload = {
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": False,
"enableStreamingEngine": False,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/templates:launch"
payload <- "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/templates:launch")
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 \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1b3/projects/:projectId/templates:launch') do |req|
req.body = "{\n \"environment\": {\n \"additionalExperiments\": [],\n \"additionalUserLabels\": {},\n \"bypassTempDirValidation\": false,\n \"enableStreamingEngine\": false,\n \"ipConfiguration\": \"\",\n \"kmsKeyName\": \"\",\n \"machineType\": \"\",\n \"maxWorkers\": 0,\n \"network\": \"\",\n \"numWorkers\": 0,\n \"serviceAccountEmail\": \"\",\n \"subnetwork\": \"\",\n \"tempLocation\": \"\",\n \"workerRegion\": \"\",\n \"workerZone\": \"\",\n \"zone\": \"\"\n },\n \"jobName\": \"\",\n \"parameters\": {},\n \"transformNameMapping\": {},\n \"update\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/templates:launch";
let payload = json!({
"environment": json!({
"additionalExperiments": (),
"additionalUserLabels": json!({}),
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
}),
"jobName": "",
"parameters": json!({}),
"transformNameMapping": json!({}),
"update": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1b3/projects/:projectId/templates:launch \
--header 'content-type: application/json' \
--data '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}'
echo '{
"environment": {
"additionalExperiments": [],
"additionalUserLabels": {},
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
},
"jobName": "",
"parameters": {},
"transformNameMapping": {},
"update": false
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/templates:launch \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "environment": {\n "additionalExperiments": [],\n "additionalUserLabels": {},\n "bypassTempDirValidation": false,\n "enableStreamingEngine": false,\n "ipConfiguration": "",\n "kmsKeyName": "",\n "machineType": "",\n "maxWorkers": 0,\n "network": "",\n "numWorkers": 0,\n "serviceAccountEmail": "",\n "subnetwork": "",\n "tempLocation": "",\n "workerRegion": "",\n "workerZone": "",\n "zone": ""\n },\n "jobName": "",\n "parameters": {},\n "transformNameMapping": {},\n "update": false\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/templates:launch
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"environment": [
"additionalExperiments": [],
"additionalUserLabels": [],
"bypassTempDirValidation": false,
"enableStreamingEngine": false,
"ipConfiguration": "",
"kmsKeyName": "",
"machineType": "",
"maxWorkers": 0,
"network": "",
"numWorkers": 0,
"serviceAccountEmail": "",
"subnetwork": "",
"tempLocation": "",
"workerRegion": "",
"workerZone": "",
"zone": ""
],
"jobName": "",
"parameters": [],
"transformNameMapping": [],
"update": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/templates:launch")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
dataflow.projects.workerMessages
{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages
QUERY PARAMS
projectId
BODY json
{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages");
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 \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages" {:content-type :json
:form-params {:location ""
:workerMessages [{:labels {}
:time ""
:workerHealthReport {:msg ""
:pods [{}]
:reportInterval ""
:vmBrokenCode ""
:vmIsBroken false
:vmIsHealthy false
:vmStartupTime ""}
:workerLifecycleEvent {:containerStartTime ""
:event ""
:metadata {}}
:workerMessageCode {:code ""
:parameters {}}
:workerMetrics {:containers {}
:cpuTime [{:rate ""
:timestamp ""
:totalMs ""}]
:memoryInfo [{:currentLimitBytes ""
:currentOoms ""
:currentRssBytes ""
:timestamp ""
:totalGbMs ""}]}
:workerShutdownNotice {:reason ""}
:workerThreadScalingReport {:currentThreadCount 0}}]}})
require "http/client"
url = "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages"),
Content = new StringContent("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages"
payload := strings.NewReader("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1b3/projects/:projectId/WorkerMessages HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1096
{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages")
.setHeader("content-type", "application/json")
.setBody("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages")
.header("content-type", "application/json")
.body("{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
.asString();
const data = JSON.stringify({
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [
{}
],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {
containerStartTime: '',
event: '',
metadata: {}
},
workerMessageCode: {
code: '',
parameters: {}
},
workerMetrics: {
containers: {},
cpuTime: [
{
rate: '',
timestamp: '',
totalMs: ''
}
],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {
reason: ''
},
workerThreadScalingReport: {
currentThreadCount: 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}}/v1b3/projects/:projectId/WorkerMessages');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages',
headers: {'content-type': 'application/json'},
data: {
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [{}],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {containerStartTime: '', event: '', metadata: {}},
workerMessageCode: {code: '', parameters: {}},
workerMetrics: {
containers: {},
cpuTime: [{rate: '', timestamp: '', totalMs: ''}],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {reason: ''},
workerThreadScalingReport: {currentThreadCount: 0}
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"location":"","workerMessages":[{"labels":{},"time":"","workerHealthReport":{"msg":"","pods":[{}],"reportInterval":"","vmBrokenCode":"","vmIsBroken":false,"vmIsHealthy":false,"vmStartupTime":""},"workerLifecycleEvent":{"containerStartTime":"","event":"","metadata":{}},"workerMessageCode":{"code":"","parameters":{}},"workerMetrics":{"containers":{},"cpuTime":[{"rate":"","timestamp":"","totalMs":""}],"memoryInfo":[{"currentLimitBytes":"","currentOoms":"","currentRssBytes":"","timestamp":"","totalGbMs":""}]},"workerShutdownNotice":{"reason":""},"workerThreadScalingReport":{"currentThreadCount":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}}/v1b3/projects/:projectId/WorkerMessages',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "location": "",\n "workerMessages": [\n {\n "labels": {},\n "time": "",\n "workerHealthReport": {\n "msg": "",\n "pods": [\n {}\n ],\n "reportInterval": "",\n "vmBrokenCode": "",\n "vmIsBroken": false,\n "vmIsHealthy": false,\n "vmStartupTime": ""\n },\n "workerLifecycleEvent": {\n "containerStartTime": "",\n "event": "",\n "metadata": {}\n },\n "workerMessageCode": {\n "code": "",\n "parameters": {}\n },\n "workerMetrics": {\n "containers": {},\n "cpuTime": [\n {\n "rate": "",\n "timestamp": "",\n "totalMs": ""\n }\n ],\n "memoryInfo": [\n {\n "currentLimitBytes": "",\n "currentOoms": "",\n "currentRssBytes": "",\n "timestamp": "",\n "totalGbMs": ""\n }\n ]\n },\n "workerShutdownNotice": {\n "reason": ""\n },\n "workerThreadScalingReport": {\n "currentThreadCount": 0\n }\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages")
.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/v1b3/projects/:projectId/WorkerMessages',
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({
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [{}],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {containerStartTime: '', event: '', metadata: {}},
workerMessageCode: {code: '', parameters: {}},
workerMetrics: {
containers: {},
cpuTime: [{rate: '', timestamp: '', totalMs: ''}],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {reason: ''},
workerThreadScalingReport: {currentThreadCount: 0}
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages',
headers: {'content-type': 'application/json'},
body: {
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [{}],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {containerStartTime: '', event: '', metadata: {}},
workerMessageCode: {code: '', parameters: {}},
workerMetrics: {
containers: {},
cpuTime: [{rate: '', timestamp: '', totalMs: ''}],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {reason: ''},
workerThreadScalingReport: {currentThreadCount: 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}}/v1b3/projects/:projectId/WorkerMessages');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [
{}
],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {
containerStartTime: '',
event: '',
metadata: {}
},
workerMessageCode: {
code: '',
parameters: {}
},
workerMetrics: {
containers: {},
cpuTime: [
{
rate: '',
timestamp: '',
totalMs: ''
}
],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {
reason: ''
},
workerThreadScalingReport: {
currentThreadCount: 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}}/v1b3/projects/:projectId/WorkerMessages',
headers: {'content-type': 'application/json'},
data: {
location: '',
workerMessages: [
{
labels: {},
time: '',
workerHealthReport: {
msg: '',
pods: [{}],
reportInterval: '',
vmBrokenCode: '',
vmIsBroken: false,
vmIsHealthy: false,
vmStartupTime: ''
},
workerLifecycleEvent: {containerStartTime: '', event: '', metadata: {}},
workerMessageCode: {code: '', parameters: {}},
workerMetrics: {
containers: {},
cpuTime: [{rate: '', timestamp: '', totalMs: ''}],
memoryInfo: [
{
currentLimitBytes: '',
currentOoms: '',
currentRssBytes: '',
timestamp: '',
totalGbMs: ''
}
]
},
workerShutdownNotice: {reason: ''},
workerThreadScalingReport: {currentThreadCount: 0}
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"location":"","workerMessages":[{"labels":{},"time":"","workerHealthReport":{"msg":"","pods":[{}],"reportInterval":"","vmBrokenCode":"","vmIsBroken":false,"vmIsHealthy":false,"vmStartupTime":""},"workerLifecycleEvent":{"containerStartTime":"","event":"","metadata":{}},"workerMessageCode":{"code":"","parameters":{}},"workerMetrics":{"containers":{},"cpuTime":[{"rate":"","timestamp":"","totalMs":""}],"memoryInfo":[{"currentLimitBytes":"","currentOoms":"","currentRssBytes":"","timestamp":"","totalGbMs":""}]},"workerShutdownNotice":{"reason":""},"workerThreadScalingReport":{"currentThreadCount":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 = @{ @"location": @"",
@"workerMessages": @[ @{ @"labels": @{ }, @"time": @"", @"workerHealthReport": @{ @"msg": @"", @"pods": @[ @{ } ], @"reportInterval": @"", @"vmBrokenCode": @"", @"vmIsBroken": @NO, @"vmIsHealthy": @NO, @"vmStartupTime": @"" }, @"workerLifecycleEvent": @{ @"containerStartTime": @"", @"event": @"", @"metadata": @{ } }, @"workerMessageCode": @{ @"code": @"", @"parameters": @{ } }, @"workerMetrics": @{ @"containers": @{ }, @"cpuTime": @[ @{ @"rate": @"", @"timestamp": @"", @"totalMs": @"" } ], @"memoryInfo": @[ @{ @"currentLimitBytes": @"", @"currentOoms": @"", @"currentRssBytes": @"", @"timestamp": @"", @"totalGbMs": @"" } ] }, @"workerShutdownNotice": @{ @"reason": @"" }, @"workerThreadScalingReport": @{ @"currentThreadCount": @0 } } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages"]
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}}/v1b3/projects/:projectId/WorkerMessages" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages",
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([
'location' => '',
'workerMessages' => [
[
'labels' => [
],
'time' => '',
'workerHealthReport' => [
'msg' => '',
'pods' => [
[
]
],
'reportInterval' => '',
'vmBrokenCode' => '',
'vmIsBroken' => null,
'vmIsHealthy' => null,
'vmStartupTime' => ''
],
'workerLifecycleEvent' => [
'containerStartTime' => '',
'event' => '',
'metadata' => [
]
],
'workerMessageCode' => [
'code' => '',
'parameters' => [
]
],
'workerMetrics' => [
'containers' => [
],
'cpuTime' => [
[
'rate' => '',
'timestamp' => '',
'totalMs' => ''
]
],
'memoryInfo' => [
[
'currentLimitBytes' => '',
'currentOoms' => '',
'currentRssBytes' => '',
'timestamp' => '',
'totalGbMs' => ''
]
]
],
'workerShutdownNotice' => [
'reason' => ''
],
'workerThreadScalingReport' => [
'currentThreadCount' => 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}}/v1b3/projects/:projectId/WorkerMessages', [
'body' => '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'location' => '',
'workerMessages' => [
[
'labels' => [
],
'time' => '',
'workerHealthReport' => [
'msg' => '',
'pods' => [
[
]
],
'reportInterval' => '',
'vmBrokenCode' => '',
'vmIsBroken' => null,
'vmIsHealthy' => null,
'vmStartupTime' => ''
],
'workerLifecycleEvent' => [
'containerStartTime' => '',
'event' => '',
'metadata' => [
]
],
'workerMessageCode' => [
'code' => '',
'parameters' => [
]
],
'workerMetrics' => [
'containers' => [
],
'cpuTime' => [
[
'rate' => '',
'timestamp' => '',
'totalMs' => ''
]
],
'memoryInfo' => [
[
'currentLimitBytes' => '',
'currentOoms' => '',
'currentRssBytes' => '',
'timestamp' => '',
'totalGbMs' => ''
]
]
],
'workerShutdownNotice' => [
'reason' => ''
],
'workerThreadScalingReport' => [
'currentThreadCount' => 0
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'location' => '',
'workerMessages' => [
[
'labels' => [
],
'time' => '',
'workerHealthReport' => [
'msg' => '',
'pods' => [
[
]
],
'reportInterval' => '',
'vmBrokenCode' => '',
'vmIsBroken' => null,
'vmIsHealthy' => null,
'vmStartupTime' => ''
],
'workerLifecycleEvent' => [
'containerStartTime' => '',
'event' => '',
'metadata' => [
]
],
'workerMessageCode' => [
'code' => '',
'parameters' => [
]
],
'workerMetrics' => [
'containers' => [
],
'cpuTime' => [
[
'rate' => '',
'timestamp' => '',
'totalMs' => ''
]
],
'memoryInfo' => [
[
'currentLimitBytes' => '',
'currentOoms' => '',
'currentRssBytes' => '',
'timestamp' => '',
'totalGbMs' => ''
]
]
],
'workerShutdownNotice' => [
'reason' => ''
],
'workerThreadScalingReport' => [
'currentThreadCount' => 0
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages');
$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}}/v1b3/projects/:projectId/WorkerMessages' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1b3/projects/:projectId/WorkerMessages", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages"
payload = {
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [{}],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": False,
"vmIsHealthy": False,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": { "reason": "" },
"workerThreadScalingReport": { "currentThreadCount": 0 }
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages"
payload <- "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages")
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 \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1b3/projects/:projectId/WorkerMessages') do |req|
req.body = "{\n \"location\": \"\",\n \"workerMessages\": [\n {\n \"labels\": {},\n \"time\": \"\",\n \"workerHealthReport\": {\n \"msg\": \"\",\n \"pods\": [\n {}\n ],\n \"reportInterval\": \"\",\n \"vmBrokenCode\": \"\",\n \"vmIsBroken\": false,\n \"vmIsHealthy\": false,\n \"vmStartupTime\": \"\"\n },\n \"workerLifecycleEvent\": {\n \"containerStartTime\": \"\",\n \"event\": \"\",\n \"metadata\": {}\n },\n \"workerMessageCode\": {\n \"code\": \"\",\n \"parameters\": {}\n },\n \"workerMetrics\": {\n \"containers\": {},\n \"cpuTime\": [\n {\n \"rate\": \"\",\n \"timestamp\": \"\",\n \"totalMs\": \"\"\n }\n ],\n \"memoryInfo\": [\n {\n \"currentLimitBytes\": \"\",\n \"currentOoms\": \"\",\n \"currentRssBytes\": \"\",\n \"timestamp\": \"\",\n \"totalGbMs\": \"\"\n }\n ]\n },\n \"workerShutdownNotice\": {\n \"reason\": \"\"\n },\n \"workerThreadScalingReport\": {\n \"currentThreadCount\": 0\n }\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages";
let payload = json!({
"location": "",
"workerMessages": (
json!({
"labels": json!({}),
"time": "",
"workerHealthReport": json!({
"msg": "",
"pods": (json!({})),
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
}),
"workerLifecycleEvent": json!({
"containerStartTime": "",
"event": "",
"metadata": json!({})
}),
"workerMessageCode": json!({
"code": "",
"parameters": json!({})
}),
"workerMetrics": json!({
"containers": json!({}),
"cpuTime": (
json!({
"rate": "",
"timestamp": "",
"totalMs": ""
})
),
"memoryInfo": (
json!({
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
})
)
}),
"workerShutdownNotice": json!({"reason": ""}),
"workerThreadScalingReport": json!({"currentThreadCount": 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}}/v1b3/projects/:projectId/WorkerMessages \
--header 'content-type: application/json' \
--data '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}'
echo '{
"location": "",
"workerMessages": [
{
"labels": {},
"time": "",
"workerHealthReport": {
"msg": "",
"pods": [
{}
],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
},
"workerLifecycleEvent": {
"containerStartTime": "",
"event": "",
"metadata": {}
},
"workerMessageCode": {
"code": "",
"parameters": {}
},
"workerMetrics": {
"containers": {},
"cpuTime": [
{
"rate": "",
"timestamp": "",
"totalMs": ""
}
],
"memoryInfo": [
{
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
}
]
},
"workerShutdownNotice": {
"reason": ""
},
"workerThreadScalingReport": {
"currentThreadCount": 0
}
}
]
}' | \
http POST {{baseUrl}}/v1b3/projects/:projectId/WorkerMessages \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "location": "",\n "workerMessages": [\n {\n "labels": {},\n "time": "",\n "workerHealthReport": {\n "msg": "",\n "pods": [\n {}\n ],\n "reportInterval": "",\n "vmBrokenCode": "",\n "vmIsBroken": false,\n "vmIsHealthy": false,\n "vmStartupTime": ""\n },\n "workerLifecycleEvent": {\n "containerStartTime": "",\n "event": "",\n "metadata": {}\n },\n "workerMessageCode": {\n "code": "",\n "parameters": {}\n },\n "workerMetrics": {\n "containers": {},\n "cpuTime": [\n {\n "rate": "",\n "timestamp": "",\n "totalMs": ""\n }\n ],\n "memoryInfo": [\n {\n "currentLimitBytes": "",\n "currentOoms": "",\n "currentRssBytes": "",\n "timestamp": "",\n "totalGbMs": ""\n }\n ]\n },\n "workerShutdownNotice": {\n "reason": ""\n },\n "workerThreadScalingReport": {\n "currentThreadCount": 0\n }\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1b3/projects/:projectId/WorkerMessages
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"location": "",
"workerMessages": [
[
"labels": [],
"time": "",
"workerHealthReport": [
"msg": "",
"pods": [[]],
"reportInterval": "",
"vmBrokenCode": "",
"vmIsBroken": false,
"vmIsHealthy": false,
"vmStartupTime": ""
],
"workerLifecycleEvent": [
"containerStartTime": "",
"event": "",
"metadata": []
],
"workerMessageCode": [
"code": "",
"parameters": []
],
"workerMetrics": [
"containers": [],
"cpuTime": [
[
"rate": "",
"timestamp": "",
"totalMs": ""
]
],
"memoryInfo": [
[
"currentLimitBytes": "",
"currentOoms": "",
"currentRssBytes": "",
"timestamp": "",
"totalGbMs": ""
]
]
],
"workerShutdownNotice": ["reason": ""],
"workerThreadScalingReport": ["currentThreadCount": 0]
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1b3/projects/:projectId/WorkerMessages")! 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()